Download

Distance Field Ambient Occlusion disappears with camera distance

Hi everyone,

I’m using Distance Field Ambient Occlusion for my school project. As you can see in the video below, my problem is that it disappears with camera distance.

I checked “Distance Field Indirect Shadow” on all of my meshes, to make my skylight affect my AO. This changes a lot how my DFAO looks like.

I also checked Far Shadow but it doesn’t look like it does anything at all.

I obviously tried checking and unchecking everything I could, but nothing seemed to affect the fact that it disappears with camera distance.

We also tried with my teacher to recreate a very basic scene with Starter Content meshes, and the DFAO also disappeared at the same camera distance. How exactly are we supposed to setup this with large landcapes ?

Everything in my scene is set on movable (lights and meshes).

Here’s the video :
[video]https://youtu.be/-oxpeODsyLU[/video]

0bfd09ac8e9243082da83ca666e3b6f6728c412c.jpeg
5f9001c4e7f84d52a5b6690e291eaf3694fe1df1.jpeg

If you have any idea about this…

Thanks :slight_smile:

“Distance Field Ambient Occlusion disappears with camera distance”
yep that’s basically how they work. it’s an optimization to prevent it from being extremely costly

try this on the console: r.AOMaxViewDistance=50000
play with the value to your desired result. note that the bigger you make it, the less resolution it will appear to have.
you can tweak the close/far resolution relationship with this: r.AOStepExponentScale=0.5 (play around with the value)

and watch out for your performance.

Also have a look at the two related settings under Rendering in the World settings panel:

ce0c96120d6557482b633767f1d509394e9ef438.png

Thank you for answering.

I’ve tried everything you said, but nothing affected my issue. DFAO still disappears at the same camera distance.

I also noticed with the “Mesh DistanceFields” visualize tool that the Distance Field meshes themselves also disappear at about the same camera distance.

“Fade Out Distance” in the “ambiant occlusion” panel of the post process does not affect the DFAO either.

post process ambient occlusion is just SSAO, it’s never meant to affect DFAO

the other things we suggested is what should work really

Yeah I know but at this point I’m just trying everything.