Depth of Field effect (aka Focal Blur)

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly.

Focal blur can add a significant amount of realism to any scene. With Blender's support of compositing, creating a focal blur effect can be extremely simple. This video will demonstrate the following steps to create the focal blur effect.

  • Begin by pressing F11 to render your scene. This is an important step to ensure that the Node editor displays the proper images in viewers and composite nodes.
  • Click on the Window Type combination box and choose the Node Editor window type. To make editing easier, you can press Ctrl-Up in the Node Editor window to maximize the current window.
  • In the Node Editor window, click on the tiny picture to switch to Composite Nodes mode. Additional buttons should now appear.
  • Click on Use Nodes and two default nodes should appear, Render Layers and Composite.
  • Click on Add and choose Vector -> Map Value to add a Map Value node.
  • Connect the Z connector (output) from the Render Layers to the Value connector (input) of the Map Value node.
  • Click Add again and choose Filter -> Blur.
  • Connect the Value connector (output) of the Map Value node to the Size connector (input) of the new Blur node.
  • Connect the Image connector (output) of the Render Layers node to the Image connector (input) of the Blur node.
  • Connect the Image connector (output) of the Blur node to the Image connector (input) of the Composite node.
  • For testing, we will also add a new Viewer so that we can tweak the effect. Click Add and choose Output -> Viewer.
  • Connect the Value connector (output) of the Map Value node to the Image connector (input) of the new Viewer node. This will allow you to see the effects of the changes you will make to the Map Value node.
  • Modify the Size field of the Map Value node. The smaller the value, the greater the range of the effect. For smaller scenes, a value of 0.1 to 0.5 should achieve good results.
  • Modify the Offset field of the Map Value node as well. This determines the offset of the effect from the camera. A negative value will start the effect further from the camera. For smaller scenes, a value of -2 to -4 should work well.
  • It may be necessary to play with the Offset and Size values of the Map Value node. You will want to validate the results using the Viewer node. Objects that appear completely black will have no blur effect giving them the appearance that they are in focus. Anything that appears in white will have the maximum blur effect applied making them appear completely out of focus. Areas of grey will have a varying amount of the effect applied.
  • When you are happy with your results, modify both the X and Y fields of the Blur node to set the maximum blur effect. A value of 10-15 should achieve a nice effect.
  • Now that you have the focal blur effect configured, you must tell Blender to enable compositing. Bring up the Render window and ensure that the Do Composite button is depressed.
  • The final step is simply to render your scene. You will see the scene rendered normally at first. Once the entire scene has been rendered, the blur effect will be applied. Enjoy.
Share this
Your rating: None Average: 1 (1 vote)

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <p> <br> <pre> <table> <tr> <td> <th> <span>
  • Lines and paragraphs break automatically.

More information about formatting options