How to improve dynamic shadow resolution and distance?

Hello, so basically I’m trying to port my RTS project from Unity Pro to UE4, and I have noticed one thing: the shadow (that comes from a moveable directional light) has a really poor quality from above (~16 meters), and after ~32meters (I guess?) it starts to fade away. So I searched around if there’s a way to improve that and didn’t find anything useful.
Is there a way to improve that distance and quality?

The main parts of a shadow’s quality are set through the scalability of your project. So first of all, are you using the Epic settings?

There is a file in the Engines Config folder called BaseScalability which holds some information about shadow quality based on the scalability you have chosen. You will find things like r.ShadowQuality=2, r.Shadow.MaxResolution=1024 and r.Shadow.RadiusThreshold=0.03 useful to try and change. I have found changing the Radius threshhold to a lower number makes the shadows stay on screen for a longer distance to camera.

You can open the console command at run time and try these commands (r.shadow.somethinghere) with different values to see if they have any effect. Once you have a good setting for your shadows, you can change the base scalability config file so that you don’t have to do it each time you run the game.

1 Like

Thanks! Also I’ve tried to change Dynamic Shadow Distance to 4096 and Cascade Distribution Exponent to 1 in Directional Light Properties/Details and it looks much better now with r.Shadow.MaxResolution=2048.

2 Likes

This commentary helps me thank you very much : D