5

In Cycles there are two different render passes which seem to give some kind of depth information: the Mist pass and the Z-Buffer pass. I know that the z-buffer gives the actual distance (thus producing values >1) while the mist pass's range is [0,1]. But even after normalizing the z-buffer pass the two are still not the same, the mist pass is darker.

Here is a comparison (starting with the standard render).

enter image description here
enter image description here
enter image description here

So what is the mathematical difference between a mist pass and a normalized z-buffer?

PGmath
  • 25,106
  • 17
  • 103
  • 199

1 Answers1

15

Some differences:

  • The Mist pass is antialiased. The Z pass is not.

  • The range for the mist pass is set independently of the camera's clip point.

    enter image description here enter image description here

    (To visualize the mist pass select the camera and enable mist on the Viewport display settings)

    enter image description here

    Start sets the black (0) portions of the image. Depth sets the range in which the mist pass will convert the distance to a grayscale. Past that range everyting is white (1).

    enter image description here

  • The falloff on the mist pass can be changed to quadratic, linear or Inverse Quadratic. The Z pass is always linear.


Comparison

If you set the clip distance and a mist pass to the same range and set the falloff to linear, the only difference is the antialiasing.

enter image description here

susu
  • 14,002
  • 3
  • 25
  • 48