2
$\begingroup$

enter image description here

Hi everyone! I'm trying to figure out how to adjust the mist pass but it doesnt work well to begin with. I either get a completely white pass or it looks like this. enter image description here Could someone better explain to me what the settings are that control the mist and depth passes?

$\endgroup$
2
$\begingroup$

The depth pass is not normalized, so the colors represent the actual distance to your camera. The values between 0 and 1 will be represented by a grayscale gradient, but everything above 1 will be white.

In order to get a normalized output, you need to map the value in relation to the greatest value, that is to say the furthest element in your scene.

That is what the mist pass does. The values will be mapped to the [0;1] interval so it should render as grayscale.

But then, due to the interpolation which is quadratic by default, elements which are far from the camera will be so close to the upper bound that they will be unrecognizable from the pure white value.

You can change the default distances in the world settings, under the Mist Pass panel :

enter image description here

A solution is to restrict the range, not to [0,1] but to [0,x] where x is a value you can tweak with a math divide node.

enter image description here

| improve this answer | |
$\endgroup$
  • 2
    $\begingroup$ The Mist Pass 0 and 1 distances are set in the World tab, if the pass is enabled in the View Layer > Passes panel. The interpolation is set by the user: LInear / Quadratic / Inverse Quadratic. It can be displayed by the camera. One of those.. all over the place. $\endgroup$ – Robin Betts Apr 5 at 19:30
  • 2
    $\begingroup$ @RobinBetts Alright, the more you know ! $\endgroup$ – Gorgious Apr 6 at 7:50
  • 1
    $\begingroup$ This is awesome thank you so much! $\endgroup$ – LeroyTPDias May 4 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.