cannot render a composite image

I have made a composite image in the node editor.
It consist of a 3d scene which functions as a mask for an alpha channel and an 2D image onto which the mask is applied.

However rendering does not show the composite, but only the 3D scene.

How can I fix this?

Have you selected ‘Do Composite’ in the render settings ?

You must also have a Composite output node as the final node in your chain.

I do have a composite node as the final node of my chain.

When I enable Do Composite (Anim tab) and press F12 the render window shortly shows the 3D scene and then replaces it with the 2D image. The Render window does not show the composite result.

So what am I doing wrong?

Post a screen shot of your noodle (node setup) and it will help in the troubleshooting.

I have attached my noodle.

Attachments


Not sure exactly what you’re trying to accomplish here, but given the noodle you’re using, the rendered result should be just the 2D image, plus an alpha channel made from the 3D scene if you save the file in a format that includes alpha. But that alpha channel will not affect the appearance of the rendered image at all, its just an alpha channel, the “A” of RGBA (RGB is the visible part) in a 32-bit image.

So your rendered image is being “masked” (an alpha channel is a form of masking) according to how you have it set up, but probably not how you want it. But how you want it isn’t 100% clear.

I tried to cut out a part of the 2D image by means of a mask (3D cube). It’s not artistic, just quick and dirty try-out. I expect the render window to show the same image as the Composite node.
Now the render window just shows the 3D image.

This is the result I wanted (after saving the render window as a png image).

Why does the alpha channel not show in the render while it’s there once you save it?

Attachments


second try, my image was changed from png to jpg for some reason

Attachments


Given your node setup, that’s the expected result.

Maybe you misunderstand the nature & function of an alpha channel.

The visible image is made of up of 3 color channels, red, green and blue (RGB), each with 8-bit data size for a total of 24 bits of color info per pixel. Adding an alpha channel adds another 8-bit data structure (each pixel now represented by 32 bits). This channel does not affect color, but instead determines the transparency of any part of the image based on the 8-bit value in the A (alpha) channel. The usual scheme is for solid black to represent total transparency and solid white to be fully opaque. The 8-bits of the alpha channel data allow for a 256-step grayscale range to determine transparency.

When saving the render, you need to make sure you choose the options that also saves the alpha channel with the RGB data. If you don’t, there will be no transparency or “masking,” only the color image.

To see the effect of an alpha channel you also need to save the image in a format that can display the transparency – not all image formats can do this. I believe PNG is one that will but whether or not it shows in the displayed image also depends on the viewer being used – some viewers may not recognize the alpha channel and will display only RGB (though these are not the usual case nowadays). Not sure if Blender’s render window automatically displays the alpha masking after a render.

So make sure you’ve enabled the RGBA option in the Format panel of the Scene>Render context, choose a format the can show alpha masking “natively,” and then also make sure you view the resulting image in a viewer that can account for the alpha channel.

It doesn’t. You can see alpha channel in Blender’s UV/Image editor if you activate the alpha option, and in the nodes as the OP observed. But you’ll have to open the image in the GIMP or Photoshop or similar to see the real masking.

I get the picture now. The render window just ignores the alpha channel while viewing the render image.

(I used GIMP for viewing the saved png)