This tutorial demonstrates how to render a background image using Blender 2.8 using a Camera Background Image. It also demonstrates how to create and apply a shadow catcher object. Combined these techniques can be used to superimpose a 3D object onto a flat image background with a shadow that aligns to the background image.
* Please note… I have recently written a newer tutorial that demonstrates how to render a background image in Blender 2.8 using the document world settings. This technique is a lot simpler in that it doesn’t require any work with nodes, and has the added bonus of the background image being able to be reflected in reflective 3D objects. In most ways I think this technique is generally more intuitive. However the technique outlined here, using the camera settings is potentially more suitable if you want your background image to function like a layer of film, such as in video compositing.
Part 1 – Render a Background Image Using Blender 2.8.
1. In the Outliner panel click on the camera object to select it.
2. In the Properties panel click on the camera properties to select it.
3. Select the checkbox for Background Images, then click on the Add Image button.
4. Note that the Background Source should be set to Image by default. Then click on the Open button.
5. Locate and select your background image.
6. Click on the button to open the image.
7. In the background images settings set the Alpha to 1 and select the Frame method. (In this example I am using the Crop frame method, however you may prefer one of the other options. Note the frame method that you use as this will be required in a later step).
8. In the viewport click on the camera view button. Note that the background image is now visible when viewing through the camera.
9. Select the compositing workspace and the Use Nodes checkbox.
10. Click and drag leftwards in the red area of the Render Layers node to create some space between the nodes.
11. In the Add menu select Color – Alpha Over. (You can also use the keyboard shortcut shift-a to ‘add’).
12. Click and drag the Alpha Over node over the connecting line between the Render Layers and Composite nodes. It should connect the nodes. Then click and drag on the end point of Image to Image connection that is within the Alpha Over node to connect it to the bottom Image option.
13. Add and Input Image node.
14. Connect the Image ode to the Alpha Over node and click in the drop down menu at the bottom of the Image node and select your background image.
15. Add Distort – scale node.
16. Connect the Scale node the Image Input and Alpha Over nodes as shown. Select Render Size and select the same option as selected in step 7.
17. In the properties panel select the rendering properties and under Film select the checkbox for Transparent.
18. Now render an image. Here I have clicked on the Layout workspace button and then from the Render menu selected Render Image.
19. The render should include the background image.
Part 2 – Create Shadow Catcher Object Using Blender 2.8.
1. In the layout view click on the cube object and press x on the keyboard and then select Delete to delete it.
2. In the layout press n on the keyboard to open the viewport properties tools. Make sure that the Camera is selected in the Outliner. Then click on the tab for view and select the checkbox to Lock Camera to View.
3. Add Mesh – Plane.
4. With the plane selected press s on the keyboard to scale the plane. Scroll the angle of the view (On a Mac I scroll on the mouse). Also adjust the location properties (X,Y,Z) to position the plane object.
5. In the properties panel render settings, set the render engine to Cycles.
6. With the plane selected in the properties click on Object properties and under visibility select the Shadow Catcher checkbox.
7. Select the Rendered viewport shading option. Here I added a monkey object, positioned it, under Object I set it to Shade Smooth. I also added a subdivision surface modifier to smooth it a bit more. Then it is a matter of adjusting the position of the object and the shadow catcher plane. Depending on your background image you may also need adjust the position of the light.
8. Now if you render the image the plane object will be invisible yet the shadow will remain.
Of course this tutorial only outlines the main relevant steps involved in terms of rendering a background image and using a shadow catcher object to superimpose a 3D object over a flat image background. Naturally a lot of fine tuning can be required to achieve a specific result that this tutorial does not cover.
Just in case you are interested my youtube channel includes a lot of similar tutorials. Please feel welcome to get in touch via firstname.lastname@example.org or leave a comment on my youtube channel if anything is unclear or I have missed anything important.
If you would like to stay in the loop when I publish new tutorials you might want to consider subscribing to my Youtube Channel, or if you use RSS you can find feeds available for any or all of my tutorial categories.