Distance fields stop working for a mesh if I increase the DF resolution.

I have been experimenting with Distance Field AO and Raytraced shadows but I’m running into a strange issue where if I increase the DF resolution of a mesh it completely stops drawing distance fields for that mesh. Returning it to the default value of 1 remedies the issue.

My second issue is that I can’t seem to combine a directional light using cascaded shadow maps with an ambient light that uses shadow casting DFAO. Are they mutually exclusive? I was under the impression that the Kite demo used both at the same time but I don’t seem to be able to set mine up correctly.

Thanks,

ook

Hi ook,

For the DF Resolution, make sure that you’re adjusting the Distance Field Resolution Scale and NOT the Distance Field Bias. If the DF Bias is adjusted higher the mesh will either not render or render less of the mesh.

If that’s not the issue you’re seeing, make sure that you’ve got the Engine Scalability set to EPIC or HIGH for DF Shadowing. Screenshots would likely be helpful as well for the Mesh Distance Field visualization with the various DF Resolutions that work (Show > Visualize > Mesh Distance Fields).

CSM and DFAO are not mutually exclusive. You can use these together because not everyone will want to use DF Shadowing for their directional light, but they may want DFAO from their movable skylight. one quick way to check is by adjusting the Occlusion Tint to an obvious color and you can see the areas that are getting occlusion more easily.

-Tim

This is not the issue I am having. The project is set up correctly for distance fields and all other objects display normally. The distance fields stop displaying for any mesh I change the DF resolution of and I have to re-import the mesh for it to start displaying the distance fields again.

You can see in the images below the fields disappear completely in the debug mode.

Before resolution change:

Before resolution change distance field debug:

After distance field resolution change to 2 and “Apply Changes”

After distance field resolution change to 2 “Apply Changes” Distance field debug

After re-import mesh distance fields reappear at the new resolution.

Regarding the issue with using cascaded shadow maps, as soon as I disable “raytraced dynamic shadows” on my directional light all directional shadows disappear and any attempts to enable cascaded shadow maps seems to have no effect.

(FIXED)

I looked into this again on my end and it seems to be working now? Not sure what I changed. Original issue still exists above.

I’m having this same issue with meshes between my different perforce accounts as well for some reason. I sync on my other machine and for some reason some of my meshes no longer cast distance fields till I re import them on that machine.

(SOLVED)

I dug into this more and discovered that somehow I managed to import the meshes with no material slots ie: no “Elements”. I have been working with UE professionally since 2.5 and I didn’t even know this was possible. At any rate since they were being used as HISMCs and getting assigned a material in Blueprint they would for some reason draw but the engine thought they had no “elements” so they wouldn’t cast shadows I assume because there’s a flag inside each Element for cast shadow that was probably null. Anyways that appears to be at the root of all my issues. I still need to figure out why the meshes were importing like that but I assume user error. Sorry for the confusion.

This bug is not fixed 3 years later. Reimporting the mesh (a tree) doesn’t fix it.
The mesh generates distance field in the visualizer when added alone in an empty level. Then when you open a map with this mesh, the distance field visualizer shows nothing.
It only happens with meshes with “distance field resolution scale” set anything higher than 1. No need to go crazy high, setting it to 2 makes the mesh to stop using distance field.