Difference between "DistanceField Shadow Distance" and "DistanceField Trace Distance"

Hi,
I can’t get the difference between those two parameters “DistanceField Shadow Distance” and “DistanceField Trace Distance” in the Distance Field Shadows section (for Ray Traced shadows) of the details panel’s Directional Light.
I read the hover tooltip in UE4 and see that DistanceField Shadow Distance change something but still don’t see what is DistanceField Trace Distance for.

Could someone enlight me about it ?

Thanks a lot.

Hi Mush.,

Distance Field Shadow Distance is the farthest distance any shadows can cast from the camera. This is the same as Cascaded Shadow Map Distance. For example, with the default shadow distance of 30k units, shadowing for Mesh Distance Fields will shadow up to this point and not any further.

For Distance Field Trace Distance, this is how far any individual shadow can cast from any shadow caster. So for instance, think of a really tall tree that is casting a long shadow from a low light angle (like near sunrise or sunset). If the Trace Distance is set to something like 1500 units, the shadow will only ever cast as far as 1500 units away from the shadow caster. So in the case of the tree, it will not really show the top of the tree’s shadow stretching far away. Keep in mind that this value does not affect the DF Shadow Distance, only how far shadows can cast from objects.

make sense?

p.s.

I’ve recently worked a lot of this into my rework of documentation for Distance Fields and some DF How-To’s that should help too. Hopefully, these should be available soon for everyone.

Hi,

Thanks a lot ! Couldn’t be clearer and quicker !
Yes, I already read some docs from you about soft shadows and else :wink: It was helpful ! Can’t wait for that new doc then !

Sorry about the double post by the way. I thought it didn’t work, I couldn’t see my new post in the forum so I tried twice.

Good luck for that new writing !