Cascaded Shadow Maps and Static Shadows

Static shadows on static objects disappear inside the cascaded shadow range from a stationary directional light. Is this how it is supposed to work? I have read all the documentation and I cant figure out whether this is by design or a bug.

Please advise.

Yellow cubes have static and dynamic shadows on. Red cubes have only static shadows on.

Hello Tarandus,

I have been looking into your issue and It seems that you may have uncovered a bug. Just to be sure that I am being thorough would you mind answering a few quick questions?

  1. What version of the editor are you using?
  2. If you are able would you mind listing which settings have been adjusted regarding lighting.

Thanks,

I am using 4.7.2. but I noticed this first in some preview of 4.7 (cant remember wich one).

This scene has no parameters adjusted for lighting. This is the default scene when you create a new level except I added a skylight.There is one directional light and one skylight, both with default parameters. I just put the objects in the scene, turned off dynamic shadows on the red cubes and hit “build lighting”.

…and I set the Dynamic Shadow Distance for Cascaded Shadow Maps to 500 to see the effect clearly in this screenshot.

Hi Tarandus,

Thank you for reporting this. I’ve entered a ticket for this issue (UE-12005) along with this posts information. Once a fix or solution has been submitted and verified I’ll update this post.

Thank you!

Tim

I wanted to update here that is actually is “By Design” after speaking with one of the developers.

This is what he had to say, “The UI is somewhat confusing because it makes the two shadow techniques look like independent systems. They don’t work like that, the CSM distance blend is a deferred pass and it cannot consider per-object properties. So it’s best to think of it as a single discrete state, thus to work properly it requires shadow casters have the corresponding setup too.”

I’ve since put in a request to update this tool tip to make this more evident since this is considered a single state of lighting and cannot be considered as two independent shadowing systems.

I hope this helps explain it better in the mean time until we get the updated tool tip.

Tim

Hey, Tim, I’m so glad I found this thread; I was so confused as to why the shadows would disappear as described above. What makes it even more confusing, is it works correctly in ES2, even with Dynamic Shadow disabled for a static mesh (albeit, you have to have “Inset Shadows For Movable Objects” unchecked for movable object shadows to show on ES2, not on SM5 for some reason).

However, I’m wondering if having “Dynamic Shadow” switched on for a static object like the landscape just so the shadow won’t disappear in SM5 will cause performance issues?

And now that I finally have non-disappearing “dynamic” shadows working in SM5, I’m wondering why they look so banded and blocky compared to the static shadows as shown below? Is there a way to remedy this? Thanks so much for any tips you can provide!

202544-cacadedshadowmapsettings.png

EDIT: I was able to get rid of the nasty shadows by turning “Dynamic Shadow Distance Stationary” to 0. Does this mean the stationary light is still correctly acting as a stationary light, though, and not as fully dynamic? If so, that’s great!