Quantcast
Channel: Latest Questions by MolluskJesse
Viewing all articles
Browse latest Browse all 22

Unity Lightmapping, Layers, & Multiple-Terrains

$
0
0
Our team (which is basically me on engineering) has been dancing and struggling with the Beast Lightmapper for a while now regarding this issue. We have a fairly complex Unity scene where we're using the layer system to limit the parts of the level the lights are affecting. We also have multiple terrain instances in our scene. Now, when we try to use the vanilla Beast lightmapper and just ask it to bake the scene, it doesn't appear to respect the layer culling in the lights. Lights in our "Dark" layer cause shadows to appear on items in our "Light" layer when the Dark lights, when operating in realtime, don't illuminate that geometry at all. We got around this issue with a bit of code I wrote I've been playfully calling the BeastWrangler. This code is breaking the scene up into sections and running light backs on individual areas, sometimes even individual rooms to ensure that we don't get shadow-bleeding between light layers. This all works well and good until we get to Unity's terrain system. While the system works well when there is a single terrain in one of our levels, multiple terrains seems to lead to some strange misbehavior where the terrains are being influenced by all the lights, no matter what I do with the BeastWrangler code. So, the base question is this. What can I do to get Unity's Beast Lightmapper to output the correct shadows in a more complicated scene? I'm attaching pictures of an example scene that demonstrates the struggles I am having. 1) What the scene looks like with realtime lighting. This is what I'm expecting as a result from the shadow bake. ![alt text][1] 2) The result I'm currently getting out of my Beast Wrangler script. As you can see, the meshes in the scene bake with their lighting correctly. The terrains, however, are not at all correct. ![alt text][2] [1]: /storage/temp/34781-beast_issue_right.png [2]: /storage/temp/34782-beast_issue_wrong.png

Viewing all articles
Browse latest Browse all 22

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>