Object shadows disappearing too early

Hi All,

I’ve been attempting to solve this issue for a few hours, and can’t seem to fix it up. Have followed a few different directions from threads such as:



But have not not had any luck solving the problem. Many threads I’ve looked at suggest out-of-date solutions (from early-late 2014) that do not seem to work for my case.

So, the gist of the problem is that for certain objects, the shadows they create from a directional light disappear very suddenly when the camera is not very far away. The two images below showing a small zoom-out illustrate the issue:

As you can see, the shadow cuts off instantly at a certain distance.

I’ve been fiddling with the directional light settings (shown below), and no manner of tweaking any of these values helps. Only one value seems to actually affect the problem (“Dynamic Shadow Distance StationaryLight”), which makes the issue worse when it’s lower than a few thousand.


I also tried using various console commands both in-game and in-editor, such as lowering “r.Shadow.RadiusThreshold=0.01” which did not seem to do anything.

I changed the “Static Lighting Resolution” of the landscape from 1 to 2, and it had no effect on the draw distance for the object shadow. Similarly, I changed the sphere’s mesh setting “Min Lightmap Resolution” and “Distance Field Resolution Scale” to higher/lower values which also had no effect on the problem.

I additionally tried turning on the project setting “Generate Mesh Distance Fields”.

According to the second thread I linked at the top, the problem was meant to have been fixed by the addition of “far shadows”, but as mentioned above none of the far shadow settings seem to have any effect.

I’m really at quite a loss for how to solve this - seems like none of the settings have any effect on the draw distance for the shadows on some objects. Any ideas on what I can do?

Dynamic shadow view distance limit comes from two and only two parameters. The first is dynamic shadow distance. According to your screenshot, the objects, beyond 20000 range the only source of dynamic shadow you will have is far cascade, that is stretched from 20000 to 300000. That low resolution cascade is simply incapable of displaying a shadow for a such small objects. It will be filtered out.

Secondly, there is a feature, where objects, smaller than certain threshold on screen, will not cast shadow. It is controlled by r.Shadow.RadiusThreshold. In your case, it means that anything, that occupies less than 1 percent of the screen, will not cast shadow. Feel free to reduce it by a few orders of magnitude.

That is it.

Thanks for the clarification, it turns out I had not set r.Shadow.RadiusThreshold correctly. The lack of clarity on the subject led me to give up on that avenue too easily - so I really appreciate your concise, clear answer as it prompted me to look more deeply into it. Cheers!

There is a much simpler solution, i had the problem myself after i increased the “Negative and Positive Bounds Extension” in the Static Mesh itself the shadows fade out at a much larger distance

1 Like

I have the same problem if you could help me too

yes this works. And its by far the easiest solution.

When we say % of screen, is it taking into account FOV, CameraFrustrum ?
Meaning that if i have 30° FOV Angle from camera the % will be computed based on the actual 30° view ?

Or another arbitrary value ?