Simple scene:
- A floor
- A sphere above it
- A directional light
The floor and the sphere has the “Lightmap static” enabled.
*
-
Case A: The “Mode” property of the light is set to “Baked”.
As per the docs, we now have only lightmap on the two objects. This works perfectly whereever I go with my camera. -
Case B: The “Mode” property of the light is set to “Realtime”.
As per the docs, we now have only realtime shadow that is visible only within a given distance. So I have to approach the objects and look at them closely enough to see the realtime shadows. Despite they are marked as “Lightmap static”, Unity renders realtime shadows for them. -
Case C: The “Mode” property of the light is set to “Mixed”.
Here my problems come. As per the docs, this way a single light is able to take care of both static and dynamic objects shadows. However if I use this option, the shadow of my static objects is only visible from a close distance. Why? I realized that actually it renders only the realtime shadows for the static objects too.
To be honest I don’t really understand this approach. Let’s say I have a few buildings on a terrain and a character that I control from a 3rd person camera.
My questions
-
How can I set up my scene, to see both the cheap static lightmap on the ground even from greater distances and the more expensive shadows of the dynamic objects that are close to the camera?
-
Is it possible with a single directional light?
-
Why is it called mixed, if it’s not using the baked lightmap, but the dynamic shadow map only?
I really appreciate your help. I might seem to be a beginner and you are totally right, so I hope the solution is just a few easily understandable sentence.