Procedural Compositing with Batch > Batch: Node Reference > 3D Blur Node >
Simulating a Depth of Field Effect

Depth blur effects control the amount of blur based on a depth of field matte. Depth blur settings are displayed in the Depth-O-Gram tab.

A depth of field map (Z-depth map) can be connected to the node. Black portions of the map are in focus. White portions display the highest level of blur. Note that a Z-depth map imported from another application may use the opposite convention and may need to be inverted.

(a) Z-depth map(b) Front View(c) Blurred portion in Result View

Image courtesy of Jean-Marc Belloncik

Depth Map settings can be used to invert colour values in the Z-depth map for reuse with the 3D Blur node.

Use Z-Depth button
  Enable depth-of-field controls and apply the effect to the image.
White Value box
  Select whether white pixels represent the furthest point or nearest point on the Z-axis.
Slopes field
  Displays the gamma curve level applied to the Z-depth map before it is used.
Gain field
  Displays the white balance value applied to the Z-depth map before it is used.
Max Blur field
  Displays the maximum total horizontal and vertical blur by the entered amount. The cumulative effect of the high blur amount (Basic tab), and gamma and gain correction applied to the Depth map (Depth tab) may result in very large values, which greatly increases the processing time. Use the Max Blur amount to clamp the value and avoid some unnecessary processing.
Blur Z-Depth button
  Enable to allow pre-blurring of the Z-Buffer. Disable to increase performance time.
Edge Blur field
  Displays the minimum blur value of “in focus” pixels. In some instances, an out-of-focus object that appears closer to the camera (that is, in front of the focus plane) can have hard edges. In this case, increase the value in the field to add a blur to these edges.

Use the Depth-O-Gram settings to refine focus values.

Focus Plane
  Set the distance of your focus point, that is, the point at which there is no blur on the image.
Focus Offset
  Set the distance between the focus plane and the near offset represented as a percentage of the total offset range. Select 50% to make the near and far offsets equidistant from the focus point.
Focus Range
  Set the distance between the near and far offset.
Frame option box
  Choose how you want to frame the histogram.
Zoom field
  Select a vertical zoom value for the histogram display. You can also zoom horizontally by pressing Ctrl+spacebar and dragging left or right in the histogram.
Z Plot button
  Activates the pick cursor. Use to select a pixel in the image to display its depth.
Z Plot colour pot
  Select the colour that indicates the plane on which the plotted value is located.

Use On-Screen Widgets section in the Setup menu to define display settings.

Near/Far button
  Enable to display the focus offset plane in the image window.
Near and Far colour pots
  Select the colours that indicate the nearest and furthest points of focus.
Focus Plane button
  Enable to display the plane on which the focus point lies in the image window.
Focus Plane colour pot
  Select the colour that indicates the plane on which the focus point is located.

#### Topics in this section

- Modifying Depth of Field Gesturally