Dynamic shadow offset from casting surface

Greetings all,

Relatively new here, and my learning so far has been focused on render quality – specifically lighting/shading, feeling out what (this awesome) engine can do before adding any texturing or materials.

This is a test scene with one skylight and one directional light, indirect lighting is baked and the directional light/shadows are dynamic distance field raytraced. The distance field resolution scale for each of the meshes is set to 25. Setting it higher had no effect. The problem I am having is with the dynamic shadows and some kind offsetting. The distance field setting for “ray start offset depth scale” seems to control the issue I’m having. The higher the number the greater the offset, but when set to 0 there is still an offset, as shown below:

Set to 0, there is still an offset. I even tried setting the offset depth scale to negative values, which actually did move the shadow in further, but also resulted in some weird artifacts. Any tips on what is causing this and/or ways to fix it?

Many thanks.

would love to know the answer too ;(

I was running into the same issue and the problem and though I can’t seem to recreate the problem now I might be able to offer some hints to help anyone else that runs into this. I started with models in 3ds Max 2017. These models in turn were imported from 3rd party CAD data which were groups of multiple parts. The first export from 3ds Max and import into UE4 ran into the same shadow offset problem above, but it was a simpler scenario where the object was above the floor in a default scene and the shadow was offset by a significant margin.

One key thing I noticed was that when moving my model around with the widget and hitting “End” on my keyboard, the object should align with the floor, but in my case, it would pass through the floor, but the shadow was correctly aligned with the floor. So the issue may have something to do with the origin. I also tried playing with scaling factors on import/export, but the shadow offset also scaled proportional to the model scale.

I ultimately got it work when I started cleaning up my model. I was actually getting a “Failed to import…” message, due to duplicate names. It seems that if you create two boxes in 3ds Max and call both of them Box001, then internally it still treats them as uniquely named objects. However, for the CAD data that I imported where the grouped objects had duplicate names, the FBX export process did not reassign them unique names and the UE4 import partially failed. It still created all the objects it could hence I was able to add parts to my scene, but perhaps that was the source of the problem. Once I removed the duplicate names, then after removing all the prior imported models and processed assets from my scene and re-importing, everything came in cleanly.

Now having said that, even when I remove all the content from my project, I can’t reproduce the error with my original file again, so perhaps it is completely unrelated, but maybe someone else will be able to add to the evidence so far.