Compositor Layering Question

Sorry for such a simple question, but I don’t seem to know enough to even google for the answer. :flushed: In 2.83.2 I’ve got two render layers, one of foreground items with a transparent background, the other a backdrop that I’m hitting with a bit of blur. All I want to do it put the foreground render layer on top of the background render layer, which would be ridiculously easy in GIMP, but I can’t figure out how to do it in Blender’s Compositor.

Here’s the blendfile:
SuzanneStargazing_010.blend (1.1 MB)

Pretty sure your looking for the Alpha Over Node.

https://docs.blender.org/manual/en/latest/compositing/types/color/alpha_over.html

That’s one of the things I tried, but it didn’t work . . . because I’d flipped the inputs (according to the manual – thanks for the link! – the back layer goes in the top input, the front layer goes in the bottom input. Talk about counter-intuitive . . . ) Appreciate your help!

Actually it is intuitive. :smiley: You just have to get used to thinking in 0 and 1 instead of layers.

You have to think of the Image inputs as 0 and 1 and the Fac(tor) input as a mask that mixes the two Images together.
Everything that is 0 or black in the mask is output from the first image input and everything that is 1 or white in the mask is output from the second image.

Since you use the alpha of your second image as the mask, everything that is white in this alpha will output the second image while the rest will output the first image.

Even so, it’d be nice if the inputs to that node were renamed to be more descriptive.

Not just that node. All the nodes with two image inputs are like this, just “Image” and “Image” – even in the manual that gets confusing! Just labeling them “0 Image” and “1 Image” would make it clearer which was favored by which side of the 0-to-1 Factor field (and get away from “Call them front & back!” “No, top & bottom!” arguments).

Thinking about it, that would also be pretty easy to implement – wouldn’t take up much space on the node, might even be feasible to write a script to update the code rather than do it by hand. Be a bit of a slog to update the manual though.