Simple Fog/Mist in Cycles

Hi, Nothing special, just a simple underwater scene. The background is too much in focus. How do I add fog/mist to the scene so the background is more out of focus? Using Cycles. I have looked at a number of tutorials (all too complicated for what I need) I see there is a “Mist” option under the camera.

Can someone please tell me how to setup “Mist” option for Cycles as even the WIKI doesn’t explain it for cycles. :frowning:

You might also be interested by this tutorial:

The method explained supports everything, especially depth of field and motion blur. So far, it’s the best and easiest trick I’ve found.

Exept alpha transparancy and thats my big problem with cycles an mist!
Anyone know how to solve this without setting up the exact same alpha masked materials for blender internal?

The best material to be used as material override that gives “mist” is the one below. This is my personal experience. If anyone knows anything better - just let me know.

However you are talking about defocus not mist. Those two are completely different phenomena.

Works really great i made a test render with alpha materials.
No problems with defocus or shadows.
Only problem, you have to add a transparent node with the rigth alpha mask to every different masked material.
But i think it´s the best solution so far.
Thank you very much :slight_smile:

Here is something similar for Blender Internal.


266_z_based_noise_mist.blend (178 KB)

Thanks everyone for your examples. I had previously seen two of the posted examples but found them to be too complex or maybe it’s just my lack of knowledge in the node department I will try your examples though to see if I can get them to work. It doesn’t seem there is a simple solution for mist in cycles. I am looking for the simplest solution. Bartek yes you are correct I am looking for a “Mist’ option not DOF or Defocus.

Bartek, can you please tell em do I need to select the “Mist” option in the camera to use this? Also is this node setup for the compositor? Just want to be clear on a few things. Would love to see an example of this node setup with a rendered file if you have one. I will give these nodes a try and see how it goes.

No this is a material setup. You’ll find detailed explanation of this technique in my tutorial on blendercookie. Link below:

Thanks Barek. I watched your tutorial. Very Good!

I want to set up the nodes for my scene just like in the image below but when I render my scene and look in the nodes the “Render Layers” node (see top image) does not include IndexMA. I only see (Image, Alpha and Z)

How do I get the IndexMA in my “Render Layers” node?

Under the Layers tab in Render Settings, flip on “Material Index”

I didn’t even realize MA was enabled in the Render tab. Thanks. One last thing. I can’t find “glow efect” like in the node example below. Is it named something else?

This is a node group that I made. Select it and press [Tab] to see what’s inside. [Tab] again to collapse. Node groups are very handy to reduce the clutter… and they can be appended directly from file to file.

BTW, nice to see somebody likes my street lights. :wink:

Kaluura, hi, thanks for the tips. Yes your misty scene may help me learn this better. Thanks.