Object shadows disappearing too early
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?
asked Sep 17 '17 at 08:53 AM in Rendering
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.
answered Sep 17 '17 at 09:55 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here