Use the Z Depth Render Element in V-Ray for SketchUp to control depth of field and add fog when compositing.
Overview
The Z Depth Render Element records each object's distance from the camera in the current view. It measures the distance for each pixel separately, so pixels on the same object can have different greyscale values. The closest objects or parts of objects appear white, and the furthest appear black. Pixels between these points appear in shades of grey. Lighter pixels are closer to the camera.
You most often use the Z Depth Render Element to control depth of field when compositing.


UI paths
||V-Ray Asset Editor|| > Render Elements (right-click) > Z Depth
||V-Ray Asset Editor|| > Create Asset (left-click) > Render Elements > Z Depth
Parameters
Depth From Camera controls whether Z Depth uses the Camera Clipping boundaries. Enable it to use these boundaries and invert the black and white values. Disable it to set the distances manually with the Near and Far Distance options.
Near Distance sets the distance from the camera up to which objects render as white. This option is available only when Depth From Camera is disabled.
Far Distance 1 sets the distance from the camera beyond which objects render as black 2. This option is available only when Depth From Camera is disabled.

Example: Invert Z Depth
Enable Depth From Camera to invert the black and white values in the Z Depth Render Element. If Depth From Camera is disabled, swap the Near and Far values to invert the result.


Common uses

Depth of field applied to a composite using the Z Depth Render Element

Original Beauty Composite

Basic fog applied to a composite using the Z Depth Render Element
Footnotes
- The distance is calculated in inches, the default SketchUp unit.
- To restore the Input Number Slider's default value, right-click the slider and select Reset from the context menu.