Turn off Distance Field Ambient Occlusion for landscape only

I would love to have Distance Field Ambient Occlusion enabled for our game, but at the moment it causes a dark line artefact around the landscape component. Please see the snow-covered mountains at the top of the attached images.

Is it possible to disable Distance Field Ambient Occlusion for landscape objects only? I can’t find a way to set the DistanceFieldResolutionScale to 0 on the landscape’s mesh.

DFAO enabled:

DFAO disabled:

Are there any thoughts on this or what might be causing it?

Hey there, idk if you found a workaround for this yet, but here’s my solution. Basically a depth fade from camera distance for Ambient Occlusion on landscape materials. Actually what I’m doing is turning UP the AO in the distance. I’m not sure exactly how the math pans out but that divide node is just using the distance I want it to fade out at, “100000.0” which is written as 1e+05 on the node description

I posted a question about this issue on answerhub almost two years ago, got no replies. Ray traced DF shadow black line artifact on landscape - World Creation - Unreal Engine Forums

Quite positive that you can disable landscape contributing to global distance field in newer engine versions. If not, you can just remove few lines of shader code, that composite landscape distance field into global distance field.

Yeah iirc, there is a cvar for this now. I don’t have the engine open in front of me right now, but if you press tilde, you can search for it.

Nope, not true.

That setting is no longer a console variable. It’s actually exposed on the landscape:

BUT it won’t help. It will actually turn on all the good DFAO contribution from the landscape, but it will keep that ugly black line there. :confused: It’s literally ruined my project at this point.

Your solution also does not work. Ambient Occlusion slot in the material does **not **affect DFAO. It has no effect. Even if you plug constant value of 0 directly in that slot, it will have no effect on that black horizon line.

It’s still a console variable, but you’re right, it’s a checkbox on the Landscape now. In 4.21, I’m not seeing a black line between rocks and the terrain. Unchecking(or setting the cvar and moving the camera to rebuild the global distance fields) shows most of the occlusion along the intersection being reduced or removed completely.