I can’t find a good tutorial for this. I would like to do this not as a post process, but part of the render. I’m also interested in pockets that have thickness. I’m not sure if volumetric smoke is what I would use.
Long answer: There are some really good tricks to do distance fog in post-production… but they can’t do irregular thickness. If you want some better fog without post-processing, you’ll have to wait for volumetrics to be implemented in Cycles.
Just put all objects on a new renderlayer and set the material override to that material.
Also, you can use a camera data node in place of the ray length and math nodes.
Imma going to try that setup and see how it compares to the setup I was using.
I know I was having problems using instanced trees and I wound up with a hard line in the mist at the ground plane. It wasnt putting the fog around teh trees properly.