AO and self-shadows disappearing in exponential height fog

I have this problem:

Gif quality is not the best, but I think you can see the problem. The Ambient Occlusion and the shadow on the cube and stone seem to get invisible once they are inside of the exponential height fog. The upper side of the cube and stone does not really change it’s appearance in the fog, but the side where the directional light is not directly shining at is getting a lot brighter in the fog, and the AO is disappearing too.

This looks quite ugly, so how can I fix that?

That’s how the fog is supposed to work. The fog “picks up” light from the “surroundings” and when there is a longer distance to the object, there is more fog, and more light is picked up on the way from the object to the camera.

I think you have not really understood my problem :slight_smile: It’s about the AO and shadows disappearing where no direct light is reaching the mesh.

Inscatter is easiest to see in dark sections. To actually fix this problem you would need proper volumetric shadows. But even then indirect inscatter would “fade” out those shadow areas.

Yeah this would require shadowed fog, that’d be pretty tough / costly to do.

First, yes, you’d need volumetric shadow (“shadowed fog”) for the last few inches of realism.

Second, in the gif you are posting, there are fog particles in the air between the mesh and the camera, and those fog particles are hit by light (and scattering,) and thus will tend to soften out the effects of lighting on the mesh itself.
I assume you’re talking mostly about the area where the ground meets the mesh, where the non-fogged bit has a nice AO effect, and as it gets fogged, that seems to fade out. One reason for this is likely that the shadow on the ground is too soft compared to the shadow on the dark side of the rock.

Again, I’m not saying you’re wrong to noticing the effect, but I’m also not surprised the effect is there.