- Home /
real-time shadows casting through lightmapped objects
I'm just getting started with light mapping in unity, and after baking a scene with the default settings, I'm seeing strange behavior with dynamic shadow casters. The shadow appears to be rendering through all lightmapped objects (in this case, the wall). This appears to be true for all dynamic shadow casters (tested with default cube too).
Using forward rendering with a single directional light, Single Lightmaps mode & Unity Pro. Hoping it's something simple for someone more familiar with light mapping.
Thanks!
EDIT: For anyone else who finds this thread, more info here:
http://forum.unity3d.com/threads/beast-dynamic-shadows-passing-through-objects.196701/ http://forum.unity3d.com/threads/directional-lightmaps-realtime-shadows-and-light-probes.140387/
Answer by RLin · May 04, 2015 at 10:35 AM
Use the layers. Make sure the light mapped objects are on one layer, and the nonlightmapped should be on another. On the directional light, set the culling mask to not include the layer of lightmapped objects.
Unfortunately, this seems to prevent the light mapped objects from receiving any dynamic shadows (so in the above picture, now the white floors don't receive any shadows from the blue cube).
Your answer
Follow this Question
Related Questions
Blotchy Squares in lightmaps (Progressive lightmapper) 2 Answers
Lightmap bake not including all meshes (Pics included) 0 Answers
How do I proplery set up my scene and settings with light mapping to get the effect I want? 0 Answers
Inconvenient splotchy lightmaps/ UV Overlap in URP 0 Answers
Lightmap keeps on having black spots 0 Answers