1
$\begingroup$

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?

$\endgroup$
4
$\begingroup$

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

$\endgroup$
  • 2
    $\begingroup$ Could you please explain how can I do it, what should the node tree look like? $\endgroup$ – Rumata Apr 29 at 20:42
  • 1
    $\begingroup$ Just like it's there, that's all there is to it $\endgroup$ – DrachenSeele Jun 23 at 15:35
  • $\begingroup$ Thank you very much, that's what I was looking for! $\endgroup$ – Rumata Jun 23 at 17:33

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.