How do I increase shadow draw distance on a movable mesh?

Hello again, I have another problem regarding shadows. This time, shadows generated from meshes with mobility set to Movable start to disappear as I distance myself from them.

Up close

A little bit farther

Even farther

At first I thought this was an optimization feature of the engine, but the shadows disappear, or lose their detail (for some other meshes) while I’m still considerably close to them, making stuff look really bad.
Increasing the light’s Self Shadowing Accuracy to something like 1.0 seems to fix the issue, however I can’t use this because it creates lots of artifacts.

Is this a problem I’m having or is this normal?

1 Like

Yep same Problem here, my shadows from a pointlight disappear completely after about 500units. 500units for shadow visibility is not really great. Would be interesting to know, how to increase shadow draw distance.

Hey Risojo -

Thank you for your report. What you are seeing is a rather extreme version of how the Stationary lights switch from dynamic shadows to static shadows. There is a way to check if that is the case is to switch your point light to Moveable and rebuild your lighting. The shadows now should be entirely dynamic so you will not see the switch between shadows. This is not ideal however because all dynamic lighting will add up processor wise while running your game.

I do want to get a little bit information from you to make sure I can reproduce this accurately. In the level that your fan is in, what is the Lightmap resolution of the ceiling in which your shadow is casting? If it is 32 try upping it to 64 or even 128 and see if that helps the shadow resolution as well.

Let me know,
Eric Ketchum

I’m having a similar issue. Seems like if the camera is too far the shadows cast from my movable meshes disappear.

I took the Rolling BP template, and tried dramatically increasing the distance on the camera Spring Arm in the ball blue print, and even on Production Quality lighting the ball casts no shadows. Once I bring the distance lower on the camera spring arm, the shadows become visible again.

Hey Eric, not sure if this is the same issue, but I posted a topic here on the forums (Shadows disappear with increased camera distance - Rendering - Unreal Engine Forums) where my shadows completely disappear once my camera is beyond about 6500 units.

Hey Risojo and jwfitt -

In the Lights Detail panel you can adjust the distance that the shadows form a light go from Dyanmic to Static buy adjust the “Dynamic Shadow Distance Stationary Light” under Cascaded Shadow Maps. Try this setting and let me know if it still is not producing the effect you are wanting.

Eric Ketchum

Thanks for the suggestion Eric. I tried tweaking those values to both extremes (as well as other Cascaded Shadow Maps values) to no avail. It’s strange because it seems to be primarily affecting the shadow cast from the movable character in my scene (the ball), and as soon as I bring my camera distance closer it pops right back to displaying its shadows.

I am going to close this post for tracking purposes, but if the problem persist or returns please feel free to post again.

Thank You

Eric Ketchum

Hey Eric, DanielW posted a few suggestions on the forums (like tweaking the
r.Shadow.FadeResolution or the r.Shadow.MinResolution), but the problem still persists in many cases.

It seems like there is a direct correlation to the size of the movable mesh and its distance from the camera when using a stationary or movable direction light.

Resolved this issue finally (thanks to some help from the forums):

Some gathered notes that help me solved this problem (thanks everyone!):

When using Stationary or Movable Lights on a movable mesh (not static) the shadow visibility of that movable mesh is dependent upon the size of the mesh and its distance from the camera.

Command Line Values to Tweak:

r.Shadow.FadeResolution - controls how big the light has to be on the screen before it starts to fade out.
- Default Value: 64
- Can lower this value to keep shadows from fading out at further distances

r.Shadow.MinResolution - controls how big the light has to be on the screen before it finishes fading out, at which point it no longer has cost.
- Default Value: 32
- Lower values seem to increase shadow visibility.

r.Shadow.TexelsPerPixel - Causes a higher resolution to be assigned and then it should fade out less aggressively
- Default Value: 1.27324
- Can increase this value to improve shadow rendering visibility & quality

r.Shadow.RadiusThreshold
- Default Value: 0.03
- A lower value of 0.02 or 0.01 greatly increases shadow visibility at far camera distances (seems to have the most impact of all the console commands).

Useful Link:
https://docs.unrealengine.com/latest/INT/Engine/Rendering/Scalability/ScalabilityReference/index.html

1 Like