Cameras can generate depth-of-field effects. Depth of field is a multi-pass effect. Enable it on the Parameters rollout for cameras. Depth of field simulates a camera's depth of field by blurring areas of the frame at a distance from the camera's focal point (that is, its target or target distance).
Multi-pass depth of field
Top: Focus is in the middle distance, near and far objects are blurred.
Bottom left: Focus on near objects, far objects are blurred.
Bottom right: Focus on far objects, near objects are blurred.
You can preview depth of field in viewports; however, progressive rendering must be disabled first.
Previewing multi-pass depth of field in a shaded and a wireframe viewport
Attention: This effect is for the default scanline renderer. Other renderers have their own depth-of-field effect.
Tip: To reduce the visible effect of multiple camera passes, try setting the antialiasing filter to Blend, with a Width value in the range 4.0 to 5.0, and a Blend value in the neighborhood of 0.1. (You choose the antialiasing filter and adjust its settings on the Default Scanline Renderer rollout.) Also, try reducing the Dither Strength value, in the effect's Pass Blending group, to the neighborhood of 0.2.
Note: There is also a depth-of-field rendering effect.
Note: The multi-pass depth-of-field parameters are animatable.
Focal Depth group
- Use Target Distance
- When on, uses the camera's target distance as the point about which to offset the camera for each pass. When off, uses the Focal Depth value to offset the camera. Default=on.
- Focal Depth
- When Use Target Distance is off, sets the depth from which the camera is offset. Can range from 0.0 to 100.0, where 0.0 is at the camera's location and 100.0 is in the extreme distance (effectively, infinity). Default=100.0.
Low values of the Focal Depth give wildly blurry results. High Focal Depth values blur the distant portions of the scene. In general, using Focal Depth instead of the camera's Target Distance tends to blur the entire scene.
Sampling group
- Display Passes
- When on, the rendered frame window displays the multiple rendering passes. When off, the frame window displays only the final result. This control has no effect on previewing depth of field in camera viewports. Default=on.
- Use Original Location
- When on, the first rendering pass is in the camera's original location. When off, the first rendering pass is offset like all subsequent passes. Default=on.
- Total Passes
- The number of passes used to generate the effect. Increasing this value can increase the effect's accuracy, but at a cost of rendering time. Default=12.
- Sample Radius
- The radius by which the scene is shifted to generate blurriness. Increasing this value increases the overall blurriness of the effect. Decreasing it reduces the blurriness. Default=1.0.
- Sample Bias
- Weights the blurring toward or away from the Sample Radius. Increasing this value increases the magnitude of depth-of-field blurring, giving a more even effect. Decreasing it decreases the magnitude, giving a more random effect. Can range from 0.0 to 1.0. Default=0.5.
Pass Blending group
The multiple depth-of-field passes are blended by dithering, which you can control by the parameters in this group.
These controls apply only to renderings of the depth-of-field effect, not to previews in viewports.
- Normalize Weights
- Passes are blended with random weighting to avoid artifacts such as streaking. When Normalize Weights is on, the weights are normalized, giving a smoother result. When off, the effect is a bit sharper but usually grainier. Default=on.
- Dither Strength
- Controls how much dithering is applied to the rendered passes. Increasing this value increases the amount of dithering, and can make the effect grainier, especially at the edges of objects. Default=0.4.
- Tile Size
- Sets the size of the pattern used in dithering. This value is a percentage, where 0 is the smallest tile, and 100 is the largest. Default=32.
Scanline Renderer Params group
These controls let you disable antialiasing or antialias filtering when you render the multi-pass scene. Disabling these rendering passes can improve render time.
These controls apply only to renderings of the depth-of-field effect, not to previews in viewports.
- Disable Filtering
- When on, disables the filtering pass. Default=off.
- Disable Antialiasing
- When on, disables antialiasing. Default=off.