Raytraced Distant Field shadows flicker with Far Shadow

I don’t recall, but this may have happened before. I’ve been trying over the course of using UE4 to have Raytraced shadows with Direct lights in conjunction with Landscapes. The documentation is very confusing as it mentions settings for some things but don’t specific which one as there are far shadow cascades and regular cascades.

That said, I’ve never understood why it says to use Raytraced Distant field and Casades both together as every time I did it, the shadows flickered between the raytrace and cascades. Sometimes the Raytrace shadows don’t show up all together no matter the distance or whatnot.

I don’t understand how the documention is suppose to work. You can’t set up far shadow cascades without having regular cascades, which in turn cause the Raytraced Shadows to flicker.

Am I missing something? No need for screenshots as it does I can use default values with a direct like to get the flickering.

Hi sbnewsom,

Couple of things to look at here and keep in mind when looking at issues with Cascaded shadows and Distance Field shadows.

  • Landscapes do not currently support casting Distance Field Shadows
  • Far Cascades are enabled on Landscapes by default, but not for a mesh, so this shouldn’t affect any static meshes unless it has been enabled, but this will negate distance field shadows for the most part.
  • There is a limitation of the number of assets that can support Distance Fields per scatter tile in the scene view. This essentially means that if you’re having something like grass or bushes type foliage will blow out max number and cause some flickering. Make sure things like Grass and other small foliage have “Affect Distance Field Lighting” disabled.

A step you could take to better diagnose distance field issues, such as the flicker, is to disable your Dynamic Shadow distance for the cascades. You can do this by selecting the light source and setting the Dynamic Shadow Distance MovableLight value to 0. This will now only show Distance Field Lighting when it has been enabled for the Light Source.

Far Cascades have only been around for a couple of versions, and you are correct, they do not require any cascades to have a value. These will be the ones for closer to the camera while the far is just setting ones that will be handled for the farther distance set for Far Shadow Distance.

I hope this helps.

Tim

I would like to add my own experience. I had flickering cascade shadows from a dynamic sunlight, but only from certain angles. The fix was to remove an emissive channel from decal projections which I was using. It seemed this was a bad idea, overall. The HDRI/exposure compensation seems to rely on the brightness of the overall screen/material. Emissive on decals (there were many of them on one large structure) was confusing the engine.