In this tutorial, we’ll learn how to perform basic compositing in Blender. This will cover how to use view layers, separate objects, and merge them together with compositing nodes to create a clean final render..
Step 1: Create New Collections
Start by organizing your scene with different collections to separate the objects you want to composite later.
1. Right-click on Scene Collection and select New Collection – make as many Collections as needed and rename them appropriately
2. Select the Objects you want to move to a collection
3. Use the M-key to move the selected Object to the collection
4. If you then hide the Collection, it will be easier to see what has been moved and if you have missed anything
5. You can also add a Plane and use an image for the Material to be used as a background and place it in its own Collection
6. Set up your lights and camera in a separate Collection
Step 2: Create New View Layers
1. To create different view layers for each collection, click on the View Layer Properties
2. If you choose New, it will create a layer with no specific settings
3. Copy Settings duplicates your current layer’s settings
4. Blank will hide all the Collections
5. For this tutorial, we’ll use the New option
6. Select each Collection and make a New View Layer – naming it appropriately
7. Uncheck the Exclude from View Layer boxes for each of the other Collections (not including the camera or lights)
8. You can use the dropdown menu to view each View Layer individually
9. Open the Render Settings and under the Film tab, check the Transparent option to make sure you have a transparent background
10. Make sure you see everything through the Camera and have the Main View Layer selected
11. Use F12 to Render the scene or go to Render > Render Image
Step 3: Compositing
1. Switch to the Compositing workspace
2. Enable Use Node (if you are using any versions before 5.0)
3. Click on the New button at the top of the workspace to set up the required Compositing nodes
4. You will see a Render Layers node which allows you to render a View Layer
5. The Group Output node determines the final output of the node group
6. The Viewer node allows you to see the output in the background
7. I have 4 View Layers so I will need to Duplicate the Render Layers node 3 times
8. If you use the dropdown menu for View Layer, you can change the specific View Layer for that Render Layer node
9. It is important to start with the View Layer that is the background first – these View Layers can always be changed later
10. To combine these View Layers, you will need to add an Alpha Over node
11. Combine two of the View Layers – one Background and one Foreground
12. Duplicate the Alpha Over and connect the remaining View Layer nodes
13. The final Alpha Over will then be connected to the Group Output and View nodes
14. You can now reorder the View Layers as needed – for example, if I switch the Sky View Layer to the Foreground of the Alpha Over node and the Background View Layer to the Foreground of the Alpha Over node, notice that the Sky is now in front of the Background
*NOTE: This is very useful for very large and/or complicated scenes and animations
15. Adjusting the Factor will determine the amount of mixing between the two Render Layers nodes – for example, if I wanted to add a bit of haze to the Background, I can lower the Factor of the Alpha Over node that connects the Sky and Background
Step 4: Adding Effects and Color Corrections
1. With all layers combined, you can add effects or adjust each layer independently
2. I can for example, add a Blur node to the Background View Layer and blur just that Render Layer
3. I can also make Color Correction changes by adding an RGB Curves node to the Foreground View Layer and adjust the colors
4. I can also add a Glare Effect to the Midground View Layer
Step 5: Render the Result
1. Once you’re happy with your compositing result, make sure everything is connected properly, and render the final image
Conclusion In this tutorial, we explored the power of Blender’s Compositor and how to effectively use view layers and compositing nodes to combine separate elements in your scene. By setting up different collections and rendering each object on its own view layer, we gained fine control over each element’s visibility and treatment in the final composite.