How to composit background image into render

I have locked a camera’s position and created an object that lines up with a background image. When I render, the background image is left out. In “film” I have turned on transparency, so I get a PNG file that I can overlay onto the image in Photoshop. However, I would like to do this in the compositor using the right nodes, but I can find no info on this. I have searched through the forums for “render background image” and still haven’t found the answer, though there is much discussion.

Thanks for any clues.

Input / Image node to load in the background image, then a Color / Alpha Over node to overlay your render over the background image

Thanks, Richard. There must be something I don’t know about connecting these nodes. Here’s a screen shot of what I have so far.

Attachments


The image goes into the top yellow socket, and the 3D element goes into the bottom. It’s the opposite of what a lot of people expect it to be. They think it should be like Photoshop layers with the background on the bottom.

Steve S

Thanks much, Steve S. That worked. However, I am faced with a new problem: The scale of either the Blender Object (the sign) or the photo (the building) shifted. You can see the difference in the attached screen shot. The upper window is the render (and the sign is too large); the lower window is the 3d window.

Thank, again for the help.

Attachments


SOLVED.

I just figured out that the resolution of the render must match the pixel dimensions of the background image and the render must be set at 100% (in the dimension panel).

One thing you can do is have the Image node output go directly into a Scale node. Set the Scale node to Render Size. Then, if you decide to change the render size, the background image will automatically scale.

Steve S