1

I have a 3D object in the empty scene. I can click on the "transparent" checkbox to make a render with a transparent background. How can I render depth (or any other) pass with transparent background the same way?

Maybe I can use the alpha channel as a mask in compositor? What is the best way to do it?

Rumata
  • 2,697
  • 7
  • 34
  • 70
  • https://blender.stackexchange.com/questions/27044/compositing-fog-destroys-png-alpha-in-images-as-planes-when-using-cycles – Serge L Apr 26 '19 at 15:24

1 Answers1

4

Yes, you need to use the alpha channel as a mask since transparency is not taken into consideration in the depth pass.

This is how I have done it:

I used the node called "Set alpha". I Plugged the depth into te "image" and the alpha pass into the "Factor" the normalize is optional but helps to see the depth better.

enter image description here

DrachenSeele
  • 724
  • 4
  • 17