In Blender Cycles a Z pass can be automatically normalized with a Normalize node. A Mist pass is anti-aliased and have smooth shading.

How to get automatically normalized and anti-aliased depth map?

I tried the method with Ray Length input, normalizing works fine but I got an unsatisfied result with compositing — the thin gray background that I have to add to normalize the image:

enter image description here

The Mist pass can't be automatically normalized properly, because all the space behind the object is equal 1.

enter image description here

Or should I do it in the other proper way?


  • $\begingroup$ Could you clarify how the mist pass isn't meeting your needs? $\endgroup$ – JtheNinja Jul 8 '17 at 0:30
  • $\begingroup$ @JtheNinja thanks for your comment, I updated the question. $\endgroup$ – Ilya Kanatov Jul 8 '17 at 2:26

Ok, I finally solve it. The normalized mist pass node group with and without alpha mask:

enter image description here enter image description here


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.