Blender Mist Pass Tutorial

The mist pass in Blender, some love it, and others don’t even know about it. In this post, we’ll look at how to utilize this pass in several different ways. Not only for creating moody and atmospheric renders but for some other purposes as well.

What is the mist pass?

The mist pass is a separate render layer of your scene that calculates depth. Other software usually calls it a depth pass, so if you know what that is, you’ll have no problem understanding Blender’s take on it. The mist pass is most often used instead of volumetric fog inside of Blender because it’s way faster.

To enable the mist pass, you have to go into the View Layer Properties and look for the ” Mist ” checkbox. At first glance, it doesn’t change anything in your scene and this is because this is a “View Layer”, meaning it’s a separate layer of your render which can be used for compositing later on.

This is where the mist pass is enabled.

For convenience sake, I have already a scene loaded up in Blender and got my mist pass enabled. When pressing the render button, nothing seems to be changed, yet again. This is because Blender defaults to viewing the “composite”, we need to switch from composite to ViewLayer.

Composite > ViewLayer > Combined > Mist
Left is the normal render, and right shows the mist pass.

The above scene is a render I just finished, it’s a stylized take on the Old Town of Stockholm. I think it looks quite nice even without the mist, but the mist pass gives it another vibe completely. Let’s jump onto the next step and figure out how to actually combine the two with each other (and some other fun tricks). If you don’t like the way the mist is looking, see how to solve it down below.

Controlling the depth of the mist

You might check out the mist pass and realize that your scene is either completely white or black. In other words, it doesn’t look like a mist pass at all. In this case, we need to jump into World Properties and find the tab called “Mist Pass”. Here you’ll be able to change the distance and what type of falloff it should have.

There’s a neat little trick that you can use to preview how the mist pass is going to look in real-time. Jump into your viewport > Select material preview (number 2 on your keyboard) > Press the downward arrow beside the Viewport Shading tabs > Find Render Pass at the bottom > Choose Mist.

Here’s how to preview the mist pass in real-time.

Now if you jump back into the World Properties and play around with the setting you’ll see that the mist updates in real-time. Much easier than having to re-render your scene just to see what the mist is going to look like.

How to use the mist pass

Ok now we know how to enable the mist and how to view it, but how do you actually use it? There are two ways you could use it:

  1. Save both the render and mist pass individually and use your composite software of choice
  2. Use the built-in compositing tool in Blender

Because we like Blender, we’ll stick to using the built-in compositor. We can find it in the tabs at the top where we have modeling, sculpting, UV editing, etc. If you enter the compositing tab and you see nothing, make sure the checkbox labeled “View Nodes” is checked. The navigation inside the compositor doesn’t work the same as in the viewport, using the mouse to navigate will just move the nodes. To change the size and position of the image, we can press N, find the “View” tab, and from there move and rescale our image. I recommend moving it to the right and keeping your nodes to the left.

This is how your compositor window should look, at least somewhat (I have removed the composite node here).

If you know how to use the nodes inside of the shader editor, this is pretty much the same. Viewing the node called “Render Layers”, we’ll be able to see all the passes we have enabled for this render. If you’ve done everything correctly, you should see an output labeled “mist”. If you drag this into the View node, you’ll see the mist pass, but you’ll also replace the normal render.

Mixing the mist pass with the render

If you’re a node master, you probably know what we need to do next. We need to mix these two together. And to do so we use the “Mix” node, do note that inside the compositor it’s called just “Mix”, instead of “Mix RGB” or “Mix Shader”.

By plugging the Mist Pass into the Factor (Fac), we can use the second image input as the color control.

Tweaking the depth of the mist

Changing the color is cool, but how do actually control the thickness or depth of the mist? For this we need to add another node, there are several ways you could control it, but I like doing it with a ColorRamp node. The ColorRamp should be plugged between the Mist output and the Mix node. When working with this color ramp, don’t think about colors but rather the black and white values. White means more mist, while black means less mist. Here’s what I settled on:

In the adjusted color camp, I have neither black nor white, but rather light and dark greys.

Bonus tip: If you want to have better control of the color of the mist, use a ColorRamp plugged into the second Image input.

As far as using the mist for creating a moody atmosphere, this is all you need to know. Now we’re not completely done with the mist pass because it can be used for some other things as well.

Fake depth of field

The mist pass can also be used to create a fake depth of field effect. There’s a node called “Bokeh Blur” in the compositor, by plugging in the image and mist pass into it, you get a nice way of controlling the focus of your scene. You can even control the bokeh shape by plugging in a node called “Bokeh Image” into the input called “Bokeh”. See how I set up my nodes:

Save time by compositing the DoF instead of doing it with the camera.

Parallax effect

Last but not least, there’s a neat little way trick Ian Hubert talked about. By using some math nodes combined with the Displace node and the mist pass, you can get a decent-looking parallax effect. See my node setup down below:

By keyframingthe value node you can create a parallax effect.

And this is how the final result looks:

Is this the best animation you’ve ever seen or what?

Leave a Reply

Your email address will not be published. Required fields are marked *