Depth of Field

Depth of Field (DOF) is the simulation of lens focus on the subject of the scene. This effect emphasizes on the subject by blurring everything ahead and behind the subject. In the blurred region, all the tiny highlights expand to exhibit shapes called Bokeh.

The Defocus node

Blender provides a Defocus node to simulate DOF. The following screenshot depicts the result of the DOF application as a postprocess in Blender Compositor. From the following screenshot, it can be observed that the emphasis is on the red block, blurring the other blocks and simulating the focus effect. This node requires an image and corresponding Z Depth inputs.

The Defocus node

The Bokeh type

The Bokeh type can be set to modify the shape of the Bokeh, emulating a circle, triangle, square, pentagon, hexagon, heptagon, or octagon. Beyond octagon, there will not be any significant difference, as compared to the circle mode. The following screenshot shows different Bokeh shapes on the blue block:

The Bokeh type

Angle

Angle adds a rotational offset, in degrees, to the chosen Bokeh shape.

Gamma correct

Gamma correct accentuates the Bokeh shape by brightening the out-of-focus areas of the image.

FStop

FStop is a very important parameter that gives control over the focal blur amount. FStop simulates the aperture in a real lens, preserving the luminosity of the image. Similar to a real camera, the smaller the FStop number, the higher the lens iris opening time, and the shallower the Depth of Field. At a default value of 128, everything is in perfect focus, which is assumed as infinity. Half of this value will double the blur amount. This button is available only when enabling Use Z Buffer.

Maxblur

Maxblur limits the blur amount of the most out-of-focus regions of the image. Since the Defocus node gets slower to process as the blur amount increases, this value helps limit the maximum blur radius allowed. With a default value of zero, there will not be any limit to the maximum blur amount.

Threshold

When an object that is in-focus overlaps a very far defocused background, aliased edges can be observed. The number of artifacts increases with the increase in distance between the overlapped objects. This value can be used to set how large that blur difference can be, to consider it safe and thereby prevent the occurrence of aliased edges.

Preview

The Preview mode calculates the result a lot faster compared to the Normal mode, using a limited number of (quasi) random samples. This mode also introduces grain, which is the noise in the image (though the noise reduces with more samples). This option should be disabled before rendering.

Use Z-buffer

Enabling the Use Z-Buffer option uses the focal point set in the render camera of the 3D Blender scene, as shown in following screenshot. Enabling this option disables Z-Scale.

Use Z-buffer

Z-Scale

Using Z-Scale, focus points can me manually adjusted to the required object in the image.

The Bilateral Blur node

The Bilateral Blur node implements a high quality adaptive blur on the source footage. This node can be used to soften a grainy ray-traced Ambient Occlusion pass, smoothing the output from various unbiased renderers. Many heavy performance effects, such as blurry refractions, reflections, and soft shadows can be attained with this node. Its components are as follows:

  • Image: This is the input image that is to be blurred.
  • Determinator: This is a source that defines the edges/borders for the blur in the image.
  • Iterations: This specifies how many times the filter will perform the operation on the image. This actually defines the radius of the blur.
  • Color Sigma: This specifies the threshold for which the differences of color in the image should be considered as edges.
  • Space Sigma: This is a fine-tuning variable for the blur radius.

The following screenshot illustrates its application to smoothen a rendered shadow's information without blurring the object shape, by routing the Depth and Normal data to the determinator:

The Bilateral Blur node

The Blur node

The Blur node can be used as an alternate and fast solution to defocus an image; the effect will not be as appealing as the Defocus node though. Using one of the seven blur modes, this node adds blur to the image, as shown in following screenshot. The radius of the blur is defined by the X and Y number buttons. Blur is perceived on the image when a value higher than the default zero is used. The Size input node can restrict the blur radius as a mask. The values must be mapped between the range of 0-1, as they will be multiplied with the X and Y number button values.

The Blur node

The X and Y values signify the number of pixels over which the blur effect can spread.

The Bokeh button will force the blur node to use a circular blur filter. This node gives a higher quality output, but with higher render times when using the Bokeh option. Enabling Gamma does gamma correction on the image before blurring it.

Different blur effects can be achieved using different filter types that can be chosen as per the requirement. The following is a list of the types of filter, followed by a screenshot illustrating the blur types:

  • Flat: This shows everything as uniformly blurred
  • Tent: This performs a linear falloff by preserving the high and the lows better
  • Quadratic and Catrom: These makes the sharp-contrast edges crisp
  • Cubic and Mitch: These preserve the highs but give an almost out-of-focus blur while softening sharp edges
The Blur node
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset