I know that in Cycles Z pass is not anti-alisased while Mist pass is normalized anti-aliased. I need the real depth of each pixel (like the Z pass) but with anti-aliased. I don't know if getting that from the Z-pass (by making it anti-aliased) or from the Mist pass (making it not normalized) would be feasible and easier?

The real problem is when looking at the output Z pass, the pixels around thin objects like branches, grass stocks, are kinda sparse and missing. I doubt that could be because anti-aliasing is not on. I wouldn't want to post-process that with filtering, since they may create artifacts. So I am trying to get better anti-aliased depth image.


You can easily extend the mist pass again.

When measuring pixel values with ⎈ CtrlLMB LMB, be sure to set the display color color management to None otherwise your values will not be read linear.
enter image description here

  • Define an infinity limit, a value which is the maximum distance from the camera. Infinity will assume this value as well, objects beyond will clamp to this value. I used 1000. Set the mist depth to this value.
  • Set the mist start to 0.

Render a separate mist pass.

In Compositing:

  • Invert the Mist pass (1 - Mist).
  • Multiply it with the depth limit.

enter image description here

Remember to save as an .exr to retain values > 1.

  • $\begingroup$ In the figure, the depth multiplier, on the left (1000) and one on the right (100.00) are different. I thought they should be the same of 1000. Are they typos or done purposely? $\endgroup$
    – AugLe
    May 15 '18 at 8:43
  • $\begingroup$ It's a little different in my case: (1) My Mist pass only has "Start" and "Depth" (no "minimum" and "height") (not sure if it's the problem of version: I'm using Cycles with Blender 2.78a); (2) The results are mismatched if I do 1-Mist, but it's better to stay with just Mist*Depth, do you have any idea why? $\endgroup$
    – AugLe
    May 15 '18 at 9:20

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.