Fog rendering problem

I have a problem that when I set the fog concentration distribution according to the Gaussian formula (pictured), theoretically, if it exceeds a certain range, the fog will be completely invisible, but in the picture you can see that there is fog within the range of the camera. (The shooting range is about two kilometers in diameter) Could it be an issue with the unit? Is the unit calculated in the node defaulting to m?

fog3

Shouldn’t this be: if it goes below a certain distance then…

But you have fog in the background and even at the lowest part of the image there is some distance… and so some fog visible… so you see: fog.

If this would be shot from the ground then there would be “no fog” direclty before the fee dof the viewer…

Not sure what you want to achieve by using object coordinates it will be centric to the cube objects origin. Your camera position isnt interfering here at all, so I’d suggest you change to camera so that its in camera space. And are you talking of exponential squared fog here? Then the formula is wrong.

But your main problem is that you are feeding the result into the density of the principled volume. Its not the same as rendering fog in a rasterizer there its a weight between the org color and the fog color. Thats different from the density in the principled volume. Constant values already lead to fading in the distance.