Lightmapping Bugs

  1. After lightmapping a terrain or static object once, you can no longer see dynamic cast shadows. Even if you clear the lightmaps and turn lightmapping mode off the shadows do not display, even though they will still be baked in if you light bake again. This can be fixed on static objects by reimporting the mesh after baking, but with terrains there is no way to do this. I have troubleshooted these following settings to fix the problem with no avail:

-Layer and Culling Mask are the same.

-Terrain Settings ‘Cast Shadows’ is checked.

-Lightmap Shadow Distance and Quality Settings Shadow Distance are both set to a high distance.

It seems like some kind of node is being attached to previously lightmapped objects that ignores cast shadows after baking, even if the lightmaps are cleared.

  1. Setting the lightmapping mode on a light to ‘realtime only’ does not affect lightbaked objects with normal maps unless that light is duplicated. The objects were baked with dual lightmapping as well.

You can see the real-time shadows again if you change the “Lightmap Index” value to 255 in the Atlas
(Lightmapping window > Object).

If the object has an index in the Lightmapping Atlas then the real-time shadows are not visible for that object. But you should assign the old value again if you need to calculate the lightmap again (or clear and bake).

Joel