Distance Field Shadows not working at all

Distance Field Shadows are not working at all for me. My engine is 4.16. I’m getting really bad shadow quality and shadows keep disappearing when the camera is a bit far away.

  • I’ve enabled Generate Mesh Distance Fields in project settings and the editor restarts. It generates mesh distance field in background.
  • I’ve enabled Generate Mesh Distance Fields in static mesh setting of the mesh and set the distance field resolution scale to even 100.
  • I placed it in the level and it is Static.
  • I placed a directional light and make it movable and enabled RayTraced Distanced Field Shadows.
  • I played around with Distance Field Shadow Distance
  • Engine Render Quality is set to Epic, Cinematic.

But nothing changes at all from the start. Not even a single thing changes as I enable the settings and played around with it. Shadows are still bad and keeps disappearing when far away.
Am I doing something wrong? Thanks.


Here is “Mesh Distance Field” Visualizer

Your distance field shadows will ONLY come on between 20k and 30k units away. Below 20k, it will use CSMs. If you want to use your DFSs sooner, then lower the CSM range down. Personally, for outdoor scenes, I prefer to keep CSMs within 3 or 4k and use DFSs beyond that. If you would like to solely use DFSs, then set the CSM cascades to zero; to disable them.

Thank you for your help. I’ve set the** Num Dynamic Shadow Cascade** and a new shadows appear but the quality is really really bad. I’ve set the** Distance field resolution scale** of the mesh to 10, 100 but shadows are really bad like in the picture. How can I achieve good quality sharp dynamic shadows with directional light (using DFS)?


The problem is with your meshes. They are really thin and that doesn’t tend to work well with DFSs. Just look at that picture you posted of the mesh distance field and you can’t even see the rails in it. Were they modeled in a 3d package or did you piece them together with primitives in UE? Distance fields don’t play well with meshes that have been non-uniformly scaled.