Help me create fog for my movie.

Help me create fog for my movie. I suffer for three weeks, I can’t make a smooth transition so that the fog is only in the distance of the landscape.
I cannot use planes with fog because the camera is moving. I also can not use the scatter for the world because I need a clear sky.
I came up with only such an option - snap a large cube to the camera (Copy Location), which only moving along the X and Y axis. Next, I mix two gradients in the material, a Linear gradient for a smooth transition into the sky and a Spherical gradient in the center of the cube because there should be no fog near the camera.
It seems simple, but in the end I get a dark scene or a sharp circle without fog in the center. Help adjust the transducers so that the fog matches the gradient and looks natural. How to make the most distant objects of the landscape completely in the fog, which gradually passes into the sky?
Blender 2.82 file in Dropbox (IronDump_fog.zip 56.5MB)- https://www.dropbox.com/s/abw6hz2q409bwxo/IronDump_fog.zip?dl=0

Question: Is the ground the only object that needs to fade into the background? Because then you could apply your spherical gradient to its transparency…

Yes, there will still be more objects and a large cube with volume is probably the only option. I also tweeted https://twitter.com/sb_artsphere/status/1245101625829662720

Seems like you got a tiny contradiction-- you want there to be fog, but also there should be clear sky. Essentially you need the fog to become the sky as the distance from the camera increases. I think this can be achieved in two ways:

Delete the big fog cube. Use the mist pass. Separate the scene into two view layers-- one for stuff, and one for sky. In your compositing nodes, the mist pass can be the amount that the the sky layer replaces the stuff layer.

OR:

Make the big fog box a simple low density emission volume. At first, it will occlude the sky, but then you can map its emission color to the camera angle so that it becomes the sky. This might not work.

OR:

Just say screw it and make your fog box a scatter volume with a density gradient that fades away at the top. This will cause the horizon to fade into the fog color and not the sky, which is not quite what you wanted but it’s more like how fog works anyway.

EDIT: that was three ways, not two. You got a bargain

Although I believe he wants haze (distance) and fog (elevation), a thin fog layer close to ground can cause that effect. Looking horizontally you’ll see through the entire length of the patch, but lookup up you see very little effect because it is thin - interpolated by view angle. It’s an effect pilots are very aware of; circling above you can see everything, but on final everything disappears - not a great situation.

The project was setup with all kinds of issues. Extreme clamping, no textures packed, ray visibility issues, volume settings, wrong shading setup, active frame not suitable. I haven’t done much more than tweak those and nurtured the values a bit, and added a map range to avoid full 0 and a basic division for more control accuracy. I set it so that the top of the mountains peaks over the fog/mist, just to make it a bit more interesting. I also use white volume scatter.

If I can afford it wrt rendertime, I would increase max steps and volume sampling, especially if there was some noise to it. Step rate is probably too low, but note that volume rendering is not something I normally have to bother with so I have absolutely zero experience with that. Here is a screenshot with scatter and tweaked values, but probably not what OP wants. He should provide a file that works.