Render Layer Alpha Channel

I am having a problem with regards to setting the alpha channel on an image. I have a render layer and I want to be able to make a random alpha channel using a black and white clouds texture. However, whenever I do this it sets everything in the image to have the alpha channel, including the world background. I have tried both using the ‘set alpha’ node with my texture as the factor as well as splitting the RGBA channels, then combing them again but this time using the texture as the alpha channel, but both of these affect the channel of the whole image, not just the render layer. Is there something I’m missing?

Not sure I understand your intent – do you want to apply the random alpha to only the Scene elements present on the Render Layer, and also preserve the Render Layer’s alpha (combine alphas)? If so, you can pipe the RL alpha channel to a Math node, pipe the random alpha image to the Math node’s other input, and then either Add, Subtract or Multiply depending on the nature of the random alpha. The Math node output will be a combination of the alpha images that can then be used to Set Alpha for the Image output from the Render Layer, thereby adding the random alpha to that. You may need to clamp the Math node output, though, to the range 0 to 1.0.

Mathematical hacking with nodes. Breakfast of Champions. :smiley: Any ol’ darkroom trick you can think of, minus the darkness and chemicals. (And they tell us how “real” it looks. :wink: Just like how someone once told O. Winston Link how “lucky” he was. He just smiled.)