Static and Stationary light shadows do not look the same at all

Hi all,

I currently have a problem I’ve been bashing my head against for a week now. I started a new project and I wanted to design the first level. My goal is to bake as many static shadows as possible to maximize performance, while also leaving dynamic shadows for my character.
I know that you can do this using a stationary light. However, I noticed a HUGE difference between the built shadows from static and stationary lights.

The first picture shows a sample level lit using a lightmap. I am using a single static directional light. Here, the pillar casts a fair, smooth and good-looking shadow, as you would expect to see with a lightmap.

However, the second picture shows the same scene, but lit using a stationary light. The shadows are much sharper, and have round corners. They do not correspond at all to the shadows from the first picture. Static and stationary lights both use a lightmap to render shadows on, don’t they? And if they do, why are the resulting shadows so different?

Any help is appreciated.
Thanks.

One difference is the direct shadow the light source is casting. While in Static mode, every shadow gets baked. In Stationary mode, the first shadow, the direct one, remains ‘Moveable’, while every other bounce of the light, and therefore all the indirect shadows are getting baked. That way all the objects that are set to Moveable cast the same kind of shadow into the scene as the Static objects around them.

That difference is hard to see in a scene with only one object standing around. If you build a more complex one, like a simple building with a window you’ll see the difference.

Oh, I get it (I think). Static and stationary lights both use the same algorithm for calculating shadows. But the way the lightmaps are reused for the final render depends on the light’s mobility, right?

In that sense, the lighting information from the shadow maps are used to generate sharp shadows for stationary lights so that dynamic and static shadows look the same (so that it doesn’t seem graphically weird to the player when you put the two shadows side by side).

Is that it? Am I correct? And if I am, please I’d like to know how I can make the stationary shadows look exactly like the static ones. I just don’t like the display and I need to be able to render dynamic shadows for movable objects, so using stationary for my lights is mandatory.

Sounds like it. If you want crisp shadows, realtime would be less hassle. If you need crisp, baked shadows then the lightmap resolution would need to be cranked up so the resolution of the shadow map texture has enough pixels to support it.

Stationary is not completely realtime. As the name indicates, it cannot move, but it can change color and turn off and on. Stationary will bake some information into lightmaps, but it’s handled a little different because it can change values.

Found the solution!

I just looked up “smooth stationary shadows” and found out about the Use Area Shadows for Stationary Light option under the Lightmass category. I just ticked it, rebuilt lighting and all of a sudden, my stationary lights had smooth shadows, just as if I had built them with a static light.

Thanks for your help! I’m all good now.

2 Likes