Shadow flickering DFAO

I’ve used DFAO for this scene.
How can I fix this shadowing artifacts? Even if I increase the Distance field shadow resolution scale insanely high like 100. I’m still getting the error…
Whats the possible fix to it?

That parameter isnt for DFAO as far as i know. You can use the console command r.aorecordradiusscale 0.1(or some other variable) to increase the resolution. It affects the performance though and i dont know how smaller you can go so you’ll have to give it a try and see for yourself.

Recently there have been some significant improvements with Distance Field AO to smooth out the “artifacts” that you’re referencing.

There have been improvements with this method in 4.8, but 4.9 so far has seen the biggest improvement.

Here is an example:

4.7

4.8

4.9

When troubleshooting DFAO or any distance field mesh issues, it’s best to use the visualization modes from the viewport. You can do this by going to Viewport > Show > Visualize >

Use these for looking at Distance Field issues:

  • Mesh Distance Fields: ideal for seeing the mesh generated for the distance field. DIrectly correlates to the Distance field resolution you were setting in the Static Mesh build settings.
  • Distance Field Ambient Occlusion: allows you to see only the AO that is being used in the scene with distance fields. As pictured above
  • Distance Field Global Illumintation: Allows you to see the bounce lighting generated from distance fields if enabled. This is a new feature in 4.8 and is considered experimental at this stage.

Some things to keep in mind when using Distance Fields is that your mesh should be broken up into modular pieces. Distance Fields work best with this. Larger meshes will not scale well with Distance Fields and can lead to issues with AO and Shadowing using DFs.

With regards to DF resolution you shouldn’t really need to go very high on the resolution scale to get good results if everything has been setup with best practices for DFs. In most cases, using a resolution of 10 is as high as I’ve personally used as a test. On average the majority of meshes I use with it enabled use the default resolution.

I hope this helps.

Tim