Depth of Field / Bokeh Shader (mental ray)

Lets you control a camera's depth of field, as well as the blurring in areas of the image that are out of focus.

The depth of field controls is that part of the scene that is in focus, based on distance from the camera lens. The bokeh effect is the pattern of those areas of the image that are out of focus.

A scene with no depth of field applied

A scene with depth of field

Focal plane set to the middle distance.

Interface

Depth of Field Parameters rollout

Enabled
When on, enables the Depth Of Field / Bokeh shader. Default=on.
Focus Plane
Sets the focal plane of the camera. This is a distance from the camera lens. Default=100.0.
Radius of Confusion
Sets the radius of the circle of confusion for the lens. For most purposes, this value should not be larger than one 3ds Max unit (1 inch). Default=1.0.

Increasing the Radius Of Confusion increases the amount of blur.

Samples
Sets the number of rays used to sample the image. Increasing this value decreases graininess, at a cost of rendering time. Default=4.

Increasing Samples decreases the graininess of the blur.

Bokeh (Blur Shape) Parameters rollout

Bias (1.0 = uniform)
Biases the way the circle of confusion is sampled. Values less than 1.0 bias the sampling toward the center of the circle, creating a smooth bokeh. Values greater than 1.0 bias the sampling toward the edge of the circle, creating a bokeh with circular artifacts. Default=1.0.

Decreasing Bias smoothes out areas of blur.

Increasing Bias gives edges to areas of blur.

Blade Count
Sets a number of edges for the circle of confusion. At the default value of 0, the circle of confusion is a perfect circle. Default=0.

Setting Blade Count to 4 makes circles of confusion into squares.

Blade Rotation
Sets an angle of rotation for the circle of confusion. If Blade Count equals 0, this value has no effect. A Blade Rotation of 0.0 equals 0 degrees, and a Blade Rotation of 1.0 equals 360 degrees. Default=1.0.
Use Custom Bokeh Map
Turn on to use a map for the bokeh effect. The map replaces the circle of confusion with a pattern. (A map that is a white circle on a black background is equivalent to the standard circle of confusion.) While a map is active, the Bias, Blade Count, and Blade Rotation settings have no effect.

Bokeh Map Click to open a file dialog that lets you assign a bokeh map.