4
$\begingroup$

I have a scene to be rendered with Cycles with multiple passes like AO, diffuse dir-indir, normals etc.

Now the problem arises over here that I'm getting only the beauty render (i.e. the combined final render) with alpha/transparency, but I want all of my render passes to be transparent where there's no background.

$\endgroup$
3
  • $\begingroup$ For a quick solution upload your .blend to blend-exchange.giantcowfilms.com $\endgroup$
    – WhatAMesh
    Commented Sep 14, 2018 at 8:54
  • $\begingroup$ Your question doesn't make a lot of sense. Alpha channel/transparency can be considered a render pass. It can not be integrated into a color channel by itself(The "beauty render" as you call it consists of 3 color channels and the alpha channel). You can use the compositor to add the alpha channel to a different pass, but it will always stay a separate channel. If you save the final image as a multi channel object it will already be included. If you need to composit different render passes you have access to the alpha channel from the input image node socket "alpha". $\endgroup$ Commented Sep 14, 2018 at 8:57
  • $\begingroup$ Welcome to the site :) I've taken the liberty of editing your question to try and make it clearer. If you disagree with my edits, please feel free to roll them back and/or write additional edits. That said, can I ask why you want to do this? It's certainly doable (apply the alpha channel with the Set Alpha node with no anti-aliasing to avoid halos), but there might be an easier way to composite your render, if that is indeed your goal. $\endgroup$
    – gandalf3
    Commented Sep 14, 2018 at 9:17

1 Answer 1

3
$\begingroup$

Rendered passes should be treated as RGB and added/multiplied together (passes are light emissions from each component, therefor they have to be added together, with a few exceptions that require multiplication, like color and AO passes).

Up to that point, it's better to leave alpha alone, as you're dealing with the emissive aspect of the image.

Once you have your plate emissions composited properly, it's time to take care of the occlusion (provided by the alpha channel).

Blender has a handy node for that: The Set Alpha node. Just plug the result of the combined passes to the first socket (Image), then plug the rendered alpha channel to the second socket (Alpha).

The result will be a properly associated alpha image, with all the passes combined.

DON'T DISSOCIATE ALPHA using an Alpha Convert node! You want to keep it associated, so you can composite your image over a background using a Alpha Over node straight away.

Simple pass compositing with alpha

$\endgroup$
2
  • 1
    $\begingroup$ That's the proper way to combine passes and produce a result with alpha. If you're thinking about pulling passes with alpha for whatever reason (like having a AO pass with alpha to be used with the multiply node on a composite, I'd recommend you to think twice. That can sound handy, but it's a recipe for halos and image artifacts you most likely want to avoid, unless you're absolutely familiar with alpha association/dissociation and know exactly what you're doing. If you think you do and have a good example of why would you need that instead a proper pass compositing, please post an example $\endgroup$
    – Gez
    Commented Dec 17, 2018 at 22:09
  • 1
    $\begingroup$ Also a friendly reminder to avoid using the "Backdrop" function for anything that has alpha, as Blender fails to render associated alpha properly (both in the image viewer and with the backdrop function). Until it's fixed, god knows when, it's always better to use an alpha over node with a solid background to evaluate alpha in Blender's compositor. $\endgroup$
    – Gez
    Commented Dec 17, 2018 at 22:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .