- Home /
Baked LightMap issues
This is an interesting combination of issues I have found here.
Until before this point I haven't used baked lights and lived with the strange lighting effects you get if you reach your pixel light count limit.
But that was annoying, so today I set my current scene up for baking lightmaps. All meshed objects imported were set to "Generate Lightmap UVs", lights were set to Baked mode. I went to the Lighting tab and created my lightmaps.
The first issue came up and it seams to relate to my terrain. I get this error if I bake the lightmap with my terrain enabled:
Assertion failed on expression: 'terrainInstanceHashes.find (instances[i].instanceID) != terrainInstanceHashes.end ()'
I cancelled the baking, disabled the terrain to see if the lightmaps are created properly and discovered the second error I get:
Assertion failed on expression: 'si.atlasOffsetX > systemInfo.atlasOffsetX || si.atlasOffsetY > systemInfo.atlasOffsetY'
If I go and bake the lightmaps now, the procedure doesn't take much time but interestingly gives me the first error seven and the second one three times. And there are two more strange things happening here:
Every map generated for global illuination is equal in objects shown, except for the Directionality one, I guess that the error originates here:
The problem with the rest of these maps is, that most of the objects are ignored in the baking process, here is how the scene looks like in shaded mode:
The whole cathedral for example is ignored completely. It contains the lights that are the reason for baking the lights, standing in the cathedral now means: No lights anywhere except for the realtime moonlight.
It would be really interesting to find out what is causing these issues because that is really frustrating. Thanks for all answers, Manu
Was this ever resolved? I'm facing the same issue right now.
Answer by Acreates · May 23, 2017 at 05:39 PM
Was this ever resolved? I'm facing the same issue right now.
Answer by cavalier67 · Sep 16, 2017 at 03:58 AM
I have the same issue. Anyone know what is going on?
Answer by parikshit123 · Mar 31, 2018 at 07:17 PM
@ShardsOfPast Past Did you set all the objects including the cathedral as static ? Lighting is only baked for static game objects.
Also, if you placed those trees using the terrain tree tool, they won't cast shadows using light maps so you need to place them manually.
Your answer
![](https://koobas.hobune.stream/wayback/20220612110329im_/https://answers.unity.com/themes/thub/images/avi.jpg)