Learn 3D Graphics

Blender Compositing

Learn the basics of compositing in Blender.

After rendering an image sequence, but before rendering that sequence to video, the rendered images can be enhanced with a large variety of effects. Depending on the effects you want to add, there are differing levels of preparation before rendering initially.

View Layers (sometimes called render layers) control what is visible or hidden in a render. In certain image formats, we can render multiple layers in a single frame. Collection visibility can be enabled or disabled for each view layer. View layers (for certain image formats) can also keep track of additional data (called passes), which gives more flexibility when compositing.

  1. Creating View Layers:
    1. In the very top right of the Blender workspace, click on the new layer icon to add a new view layer The image is missing
    2. Double-click on the layer to rename descriptively (ie. Lights)
    3. Create a separate view layer for each collection (or group of collections) that you would like to make individual adjustments to and one view layer where everything is visible
  2. Setup Collection Visibility for each layer:
    1. Use the layer dropdown to change between view layers The image is missing
    2. In the Outliner, "check" each collection that should be visible in that layer
    3. In the Outliner, "uncheck" each collection that should be visible in the render
    4. When using multiple view layers, it is helpful to have a collection that contains any lights - the light collection should be checked on all view layers
    The image is missing

Passes can be enabled for each View Layer to save additional data with each layer. That data can then be adjusted independently of the image in the compositing stage. Passes can allow lighting, shadows, materials and more to be adjusted.

Available passes vary dependent upon the render engine. Certain passes (and hence certain effects) can only be enabled with the Cycles engine. If a pass is missing, switch to Cycles in the Render properties.

Passes add greater flexibility to compositing but also add to render time. Only enable the passes you need for each layer.

  1. Default Passes:
    1. Combined - all passes included together
    2. Z - distance to visible surfaces
    The image is missing
  2. Enable Passes:
    1. Select a View Layer in the top right of the program window
    2. In the "View Layer" tab of the properties panel, under "Passes", check or press any additional values
    3. Repeat as needed for each View Layer (view layers sometimes have different passes enabled)

It is important to make a test render in case you end up needing to make adjustments to your view layers, passes or etc. A test render could just show a single frame or a small range of frames. This way you don't waste time rendering a full sequence multiple times if you need changes.

Also, always make sure to composite in a separate file. The compositor overrides whatever objects are in the scene. Making changes later to the scene or render settings is easier if the animation and composting files are kept separate.

  1. In your animation file:
    1. Create collections for each area that you want to make individual adjustments for (including a collection for lights)
    2. Create view layers as needed The image is missing
    3. Enable and disable collections as needed for each view layer (if a collection is not checked for any view layer, it will not be visible in the render) The image is missing
    4. Enable additional passes for each view layer as needed
    5. Adjust the output settings:
      1. Create and select an output directory for the renders (do not use the temp folder)
      2. Change the image format to OpenEXR multilayer (this format saves layer and pass data)
      3. Shorten the start/end frame numbers to just a few frames (1-3) where the desired effect will be visible (ie. where something is moving if the camera for a motion blur effect)
      The image is missing
    6. Save your changes
    7. Render the animation (Render → Render Animation)
  2. In a new general file (Ctrl+N):
    1. Switch to the "Compositing" workspace The image is missing
    2. Check "Use Nodes" The image is missing
    3. Select (right-click) and delete (X) the "Render Layers" node The image is missing
    4. Add input (Image) and output (Viewer) nodes
    5. Add additional nodes inbetween (see the other tabs for specifics) The image is missing
    6. Adjust and/or animate settings as needed
    7. Save changes
  3. If needed, make adjustments if needed to the original scene and render the test frames again
  4. Once the compositing effect(s) are perfected, render the full sequence in the original scene
  5. In the compositing file, update the image source to use the full sequence then render to a video format

Multiple view layers can be used to render more complex scenes when you do not have enough processing power. They can also be beneficial if you need to rerender

  1. In the Outliner window of your animation file:
    1. Create collections for each area that needs individual adjustments (ie. Lights, Foreground, Background)
      1. Name the collections descriptively (ie. Lights, Foreground, Background)
      2. Drag and drop items into their collections
    2. Create view layers for each area that needs individual adjustments:
      1. In the very top right of the Blender workspace, click on the new layer icon to add a new view layer
      2. Double-click on the layer to rename descriptively (ie. Foreground, Background)
    3. Enable and disable collections as needed for each view layer
      1. Select a view layer in layer drop down on the top right of the window
      2. Hide collections from the layer: uncheck the collections in the Outliner
      3. Hide a collection from the layer while keeping shadow/reflections interactions: keep the collection checked and right-click on the selection → View Layer → Set Indirect Only
      4. Mask out a collection so that unnecessary areas of overlap do not render on the layer: keep the collection checked and right-click on the selection → View Layer → Set Holdout
      5. Repeat for each view layer as necessary
    4. Enable additional passes for each view layer as needed
      1. For the view layer that conains the background (ie. the ground), in thw View Layer tab, under "Light" check "environment"
    5. Adjust the output settings:
      1. Create and select an output directory for the renders (do not use the temp folder)
      2. Change the image format to OpenEXR multilayer
      3. Shorten the start/end frame numbers to just a few frames where the desired effect will be visible for a test render
    6. Adjust the render settings:
      1. Under "Film", check "Transparent"
    7. Save your changes
    8. Render the animation (Render → Render Animation)
  2. In the a new general file (Ctrl+N): Multiple layers nodes example is missing
    1. Switch to the "Compositing" workspace
    2. Check "Use Nodes" The image is missing
    3. Select (right-click) and delete (X) the "Render Layers" node The image is missing
    4. Add and customize input nodes:
      1. Add an "Image" node (Shift+A → Input → Image) and place it to the left:
        1. Click on the folder icon and select your render folder
        2. Select all of the renders (A - select all or B - box select
        3. Click on "Open Image" in the top right
        4. Towards the bottom of the Image node, next to "Layer", select a view layer
      2. Duplicate the image node once for each view layer (Shift+D) - make sure to select a different view layer for each node
    5. Add AlphaOver nodes (Shift+A → Color → AlphaOver), placing them between the Image nodes and the Composite node:
      1. 2 view layers + 1 environment pass = 2 AlphaOver nodes
      2. 3 view layers + 1 envirnoment pass = 3 AlphaOver nodes
    6. Connect the AlphaOver nodes to the Image nodes:
      1. Start with the backmost view layer node and progress to the closest view layer node:
        1. Click and drag to connect the environment socket (Env) to the top left "Image" socket of the first AlphaOver node
        2. Connect the "Combined" socket to the bottom left "Image" socket of that same AlphaOver node
      2. Connect the same AlphaOver's right "Image" socket to the top left "Image" socket of the next AlphaOver node
      3. Connect the "Combined" socket of the next view layer (the) to the bottom left socket of the 2nd AlphaOver node
      4. Repeat the last 2 steps as necessary for any additional view layers
    7. Add a "Viewer" node in order to see the output (Shift+A → Output → Viewer)
    8. Connect both the Viewer and the Composite nodes to the last AlphaOver node by clicking and dragging from the right Image socket from AlphaOver to the left Image sockets of both output nodes
    9. Adjust and/or animate settings as needed
    10. Add additional nodes as needed
    11. Save changes

Bloom is a standard FX added in post processing because it can make objects really pop visually. It adds a more dramatic glow effect to emission materials. It is most effective when emission materials exist.

To setup for a bloom effect, add at least one emission material to something within the view of the camera.

  1. Make sure the render engine is set to "Cycles"
  2. In the "View Layer" tab of the properties panel, under "Passes → Data", check:
    1. Combined
    2. Z
  3. In the "View Layer" tab of the properties panel, under "Passes →Light", check "Emission"
  1. Setup a compositing file:
    1. Open a new general file (Ctrl+N)
    2. Switch to the "Compositing" workspace
    3. Check "Use Nodes" The image is missing
    4. Select (right-click) and delete (X) the "Render Layers" node The image is missing
  2. Add an "Image" node (Shift+A → Input → Image) and click on the folder icon to select your render(s)
  3. Add a "Viewer" node (Shift+A → Output → Viewer)
  4. Click and drag to connect the "Combined" socket of the Image node with the "Image" socket of the Viewer node The image is missing
  5. Add a "Glare" node (Shift+A → Filter → Glare) - hover over the connection between the image and viewer nodes before releasing to place the node (it should automatically connect to the image and viewer nodes)
  6. Adjust the glare settings:
    1. Glare type - Ghost, Streaks, Fog Glow, Simple Star
    2. Glare Quality - Low, Medium, High
    3. Threshold - may need to be raised or lowered dependent on your image
    4. Other settings vary dependent on the glare type and can be changed as needed
  7. Click and drag to connect from the right "Image" socket of the Glare node to the "Image" socket of the "Composite" node

Use this method if you have other light areas in your scene that you do not want to glow.

Bloom nodes example is missing
  1. Setup a compositing file:
    1. Open a new general file (Ctrl+N)
    2. Switch to the "Compositing" workspace
    3. Check "Use Nodes" The image is missing
    4. Select (right-click) and delete (X) the "Render Layers" node The image is missing
  2. Add an "Image" node (Shift+A → Input → Image) and click on the folder icon to select your render(s)
  3. Add a "Viewer" node (Shift+A → Output → Viewer)
  4. Click and drag to connect the "Combined" socket of the Image node with the "Image" socket of the Viewer node The image is missing
  5. Add a "Mix" node (Shift+A → Color → Mix) - hover over the connection between the image and viewer nodes before releasing to place the node (it should automatically connect to the image and viewer nodes)
  6. Add a "Glare" node (Shift+A → Filter → Glare)
  7. Connect the Glare node to the Image and Mix nodes:
    1. Click and drag from the Image node's emission socket (Emit) to the left "Image" socket of the Glare node
    2. Click and drag from the Glare node's right "Image" socket to the bottom left "Image" socket of the Mix node
    3. Lower the factor (Fac) of the Mix node to something like .2
  8. Adjust the glare settings:
    1. Glare type - Ghost, Streaks, Fog Glow, Simple Star
    2. Glare Quality - Low, Medium, High
    3. Threshold - may need to be raised or lowered dependent on your image
    4. Other settings vary dependent on the glare type and can be changed as needed
  9. If needed, increase or decrease the Mix node's factor (Fac)
  10. Click and drag to connect from the Mix node's right "Image" socket to the "Image" socket of the Composite" node

Depth of Field (DOF) allows you to control what is in or out of focus in your image. There are many approaches to changing the DOF, both directly in the camera and through compositing. If complex changes in focus will be animated, it is best to control that directly in the camera. For basic DOF, using the Compositer results in a faster render.

  1. Make sure the render engine is set to "Cycles"
  2. In the "View Layer" tab of the properties panel, under "Passes → Data", check:
    1. Combined
    2. Z
Dof nodes example is missing
  1. Setup a compositing file:
    1. Open a new general file (Ctrl+N)
    2. Switch to the "Compositing" workspace
    3. Check "Use Nodes" The image is missing
    4. Select (right-click) and delete (X) the "Render Layers" node The image is missing
  2. Add an "Image" node (Shift+A → Input → Image) and click on the folder icon to select your render(s)
  3. Add a "Viewer" node (Shift+A → Output → Viewer)
  4. Click and drag to connect the "Combined" socket of the Image node with the "Image" socket of the Viewer node The image is missing
  5. Add a "Defocus" node (Shift+A → Filter → Defocus) - hover over the connection between the image and viewer nodes before releasing to place the node (it should automatically connect to the image and viewer nodes)
  6. Add a "Math" node (Shift+A → Converter → Math) and change the mode to "Subtract"
  7. Connect the Math/Subtract node to the Image and Defocus nodes:
    1. Click and drag from the Image node's "Depth" socket to the top left "Value" socket of the Subtract node
    2. Click and drag from the Subtract node's right "Value" socket to the left "Z" socket of the Defocus node
  8. Duplicate the Subtract node (Shift+D) and connect it between the original Subtract node and the Defocus node
  9. Change the mode of the new Subtract node to "Absolute"
  10. Adjust the defocus settings:
    1. Max Blur - the maximum amount the image will blur
    2. Threshold - controls the amount of blur distance between pixels
    3. Z-scale - controls the amount of blur added (increasing this value will have the biggest result)
  11. To change the focal point:
    1. Increase the value of the subtract node
  12. Adjust nodes further as needed
  13. Click and drag to connect from the Defocus node's right "Image" socket to the "Image" socket of the Composite" node

Mist is a visual representation of mist/fog. It will apply across the entire image. Before compositing mist, it's important to set the mist depth and location.

  1. In the "Camera" properties, under "Viewport Display" check "Mist" (a yellow-orange line should display in front of the camera - it represents the position/depth of the mist) Image is missing
  2. In the "World" properties, under "Mist Pass", set the "Start" and "Depth" values:
    • Start - the place where the mist begins to be visible
    • Depth - the distance from the starting point to where the mist becomes solid (at this point nothing is visible behind the mist)
    Image example is missing
  1. In the "View Layer" tab of the properties panel, under "Passes → Data", check:
    1. Combined
    2. Z
    3. Mist
    Image example is missing
Mist nodes example is missing
  1. Setup a compositing file:
    1. Open a new general file (Ctrl+N)
    2. Switch to the "Compositing" workspace
    3. Check "Use Nodes" The image is missing
    4. Select (right-click) and delete (X) the "Render Layers" node The image is missing
  2. Add an "Image" node (Shift+A → Input → Image) and click on the folder icon to select your render(s)
  3. Add a "Viewer" node (Shift+A → Output → Viewer)
  4. Click and drag to connect the "Combined" socket of the Image node with the "Image" socket of the Viewer node The image is missing
  5. Add an "AlphaOver" node (Shift+A → Color → AlphaOver) - hover over the connection between the image and viewer nodes before releasing to place the node (it should automatically connect to the image and viewer nodes)
  6. Add a "Math" node (Shift+A → Converter → Math) and change the mode to "Multiply"
  7. Connect the Math/Subtract node to the Image node:
    1. Click and drag from the Image node's "Mist" socket to the top left "Value" socket of the Multiply node
  8. Add a "Vector Curves" node (Shift+A → Vector → Vector Curves) between the Multiply node and the AlphaOver node
  9. Connect the Vector curves node to the Multiply and AlphaOver nodes:
    1. Click and drag from the Multiply node's right "Value" socket to the left "Vector" socket of the Vector Curves node
    2. Click and drag from the right "Vector" socket of the Vector Curves node to the "Fac" socket of the AlphaOver node
  10. Increase the Multiply value to exaggerate the mist
  11. Click and drag on multiple points of the Vector Curve to make the mist coverage more realistic
  12. Click on the color of the AlphaOver node to adjust the mist color if needed
  13. Click and drag to connect from the right "Image" socket of the AlphaOver node to the "Image" socket of the "Composite" node

Motion blur allows a directional blur to be added to moving objects. This can really emphasize the speed that something is moving. Obviously something in the scene must be moving for motion blur to be added.

  1. Make sure the render engine is set to "Cycles"
  2. In the "View Layer" tab of the properties panel, under "Passes → Data", check:
    1. Combined
    2. Z
    3. Vector
    4. Mist (optional - sometimes gives a better result than the Z pass for transparent materials)
Motion blur nodes example is missing
  1. Setup a compositing file:
    1. Open a new general file (Ctrl+N)
    2. Switch to the "Compositing" workspace
    3. Check "Use Nodes" The image is missing
    4. Select (right-click) and delete (X) the "Render Layers" node The image is missing
  2. Add an "Image" node (Shift+A → Input → Image) and click on the folder icon to select your render(s)
  3. Add a "Viewer" node (Shift+A → Output → Viewer)
  4. Click and drag to connect the "Combined" socket of the Image node with the "Image" socket of the Viewer node The image is missing
  5. Add an "AlphaOver" node (Shift+A → Color → AlphaOver) - hover over the connection between the image and viewer nodes before releasing to place the node (it should automatically connect to the image and viewer nodes)
  6. Add a "Vector Blur" node (Shift+A → Filter → Vector Blur)
  7. Connect the Vector Blur node to the Image node:
    1. Click and drag from the Image node's "Mist" or "Depth" socket to the "Z" socket of the Vector Blur node
    2. Click and drag from the Image node's "Vector" socket to the "Speed" socket of the Vector Blur node
    3. Click and drag from the Image node's "Combined" socket to the left "Image" socket of the Vector Blur node
  8. Connect the Vector Blur node to the AlphaOver node by clicking and dragging from the Vector Blur's right "Image" socket to the AlphaOver's bottom left "Image" socket
  9. Add a "Vector Curves" node (Shift+A → Vector → Vector Curves) between the Multiply node and the AlphaOver node
  10. Adjust and/or animate blur values as needed
  11. Click and drag to connect from the right "Image" socket of the AlphaOver node to the "Image" socket of the "Composite" node

For more complex motion blurs, using multiple view layers can be beneficial.

In order to composite in sun beams, the animation needs an additional collection with objects that represent the base of the sun beams.

  1. Create a collection to contain the sunbeams source:
    1. In the "Outliner", right-click on "Scene Collection" to create a new collection
    2. Double-click on the new collection to name it descriptively (ie. Sunbeams)
  2. With the sunbeam collection selected, create a plane (or other mesh shape) for each sunbeam
    1. In "Object mode", use "Shift+A → Mesh → Plane" to create the planes
    2. Arrange the planes in view of the camera, where the light beams should begin
    this image is missing

Sunbeams require the use of multiple "View Layers". One layer is required for normal objects in the scene. One layer is required for the sunbeams.

  1. Create and setup 2 View Layers:
    1. View Layer 1:
      1. Uncheck the sunbeam collection (unless the sunbeam source should be visible)
      2. All other collections should be checked this image is missing
      3. In the "View Layer" tab of the properties panel, under "Passes →Light", check "Environment" this image is missing
    2. View Layer 2:
      1. Rename descriptively (ie. Sunbeam)
      2. Leave only the sunbeam collection checked
      3. All other collections should be unchecked (however if the sunbeam source should remain visible, leave the light collection checked) this image is missing
    3. It can be helpful to leave a 3rd View Layer with everything visible in case you want to do some adjustment. In this case, turn off rendering for the "everything" layer this image is missing
  2. Make sure the render engine is set to "Cycles"
  3. For both layers, in the "View Layer" tab of the properties panel, under "Passes → Data", check:
    1. Combined
    2. Z
  4. In the "Render" properties, under "Film", check "Transparent"
Sun nodes example is missing
  1. Setup a compositing file:
    1. Open a new general file (Ctrl+N)
    2. Switch to the "Compositing" workspace
    3. Check "Use Nodes" The image is missing
    4. Select (right-click) and delete (X) the "Render Layers" node The image is missing
  2. Add an "Image" node (Shift+A → Input → Image) and click on the folder icon to select your render(s)
  3. Add a "Viewer" node (Shift+A → Output → Viewer)
  4. Click and drag to connect the "Combined" socket of the Image node with the "Image" socket of the Viewer node The image is missing
  5. Add an "AlphaOver" node (Shift+A → Color → AlphaOver) - hover over the connection between the image and viewer nodes before releasing to place the node (it should automatically connect to the image and viewer nodes)
  6. Duplicate the "AlphaOver" node (Shift+D) and connect it between the first AlphaOver node and the Viewer node:
    1. Connect the right "Image" socket of the 1st AlphaOver node with the top left "Image" socket of the 2nd AlphaOver node
    2. Connect the right "Image" socket of the 2nd AlphaOver node with the top left "Image" socket of the Viewer node
  7. Set the Viewlayer for the image node to the viewlayer that contains everything (except the sunbeam source collection - assuming it is not visible)
  8. Connect the "Combined" socket to the bottom left "Image" socket of the 1st AlphaOver node
  9. Click and drag to connect from the environment (Env) socket to the top left to the top left "Image" socket of the 1st AlphaOver
  10. Make sure that the image's "Combined" socket connects to the bottom left "Image" socket of the 1st AlphaOver
  11. Duplicate the image node (Shift+D) and change the selected View Layer to the sunbeams layer
  12. Add a "Lens Distortion" node (Shift+A → Distort → Lens Distortion) and connect its left "Image" socket to the "Combined" socket of the 2nd image node (the distortion makes the sunn=beams look more natural and less perfect)
  13. Add a "Sun Beams" node (Shift+A → Filter → Sun Beams) and connect its left "Image" socket to the right "Image" socket of the lens distortion node
  14. Add a "Blur" node (Shift+A → Filter → Blur) and connect its left "Image" socket to the right "Image" socket of the sun beams node (this softens the hard edges of the sun beams)
  15. Click and drag to connect from the right "Image" socket of the Blur node to the bottom left "Image" socket of the 2nd AlphaOver node
  16. Adjust the node settings as needed:
    1. Lens distortion: increase or decrease at least 1 distortion value and leave "Jitter" checked
    2. Sun Beams:
      1. Top values control the sun beam position/angle
      2. Ray length controls the length of the sun beams
    3. Blur: increase the X & Y values and keep the size at 1
  17. Click and drag to connect from the right "Image" socket of the right AlphaOver node to the "Image" socket of the "Composite" node