Rendering Depth of field

Depth of field is an effect seen in a film camera, where objects in the foreground or background are out of focus. This is also called depth of focus.

Turning on depth of field

You can turn on depth of field by turning on Enable Depth of Field on the Sampling sub-tab of the Properties tab in the parameter editor of a render node.

Controlling depth of field

There are four parameters that control depth of field. The Focal Length parameter is on the View tab of the camera node. The Focus Distance, F-Stop, and Bokeh parameters are on the Sampling tab of the camera node.

Focal Length

Camera focal length (zoom).

Focus Distance

The lens focal distance and distance from the camera at which objects will be in focus. If the fstop channel is also used, objects outside this distance will be blurred.

F-Stop

Determines blurriness of depth-of field effects.

Bokeh

The quality of the depth of field. It can use either box or radial filtering; however, radial filtering is suggested since box filtering will result in axis oriented artifacting.

Changing F-Stop

The following images show the effect of changing F-Stop. The Focus Distance is set at 12, and the Focal Length is set at 200mm.

The F-Stop in this example is set at 1.3.

The F-Stop in this example is set at 0.8.

The F-Stop in this example is set at 5.0.

Changing focus

The following images show the effect of changing the focus. The Focal Length is set at 200mm, and the F-Stop is set at 1.

The Focal Distance in this example is set at 7.

The Focal Distance in this example is set at 20.

The Focal Distance in this example is set at 3.

Depth of field and motion

The Motion Factor parameter on the render node can be used with extreme depth of field. This allows you to decrease the Shading Quality based on how blurred the object is. Objects that are not out of focus will have their specified shading quality. Objects that are heavily out of focus will have their shading quality decreased. This will affect render times with little perceptual loss in image quality.