How can I make a fog or mist using Cycles?

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.

Can someone please help with this?

Short answer: No can do. :no:

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.

Ok, thanks - that says it all. I’ll keep an eye on the upcoming feature lists and play around with BI until then.

You can use “ray length” value to make fog in Cycles, the problem is you need to hack every material in scene with that trick.

something like that work as fog:

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.