---
title: "Z Depth"
canonical: "https://documentation.chaos.com/space/VSKETCHUP/109777199/Z+Depth"
format: markdown
---
This page provides information on the Z Depth rollout in the Render Elements.

 

## **Overview**

---

The Z Depth Render Element provides information about each object's distance from the camera in the current view. Each pixel representing the object is evaluated for distance individually; different pixels for the same object can have different grayscale values. In this render element, objects (or portions of objects) closest to the camera appear as white while those furthest away appear black. Objects between the furthest and nearest points are rendered in varying shades of gray. The lighter the gray, the closer an object pixel is to the camera.

The most common usage of the Z Depth Render Element is as a control for depth of field in the composite.


![image](media://43b4558b-9f17-4b56-a305-927255a9e5c3)


![image](media://321d00ef-f5c4-4a83-9751-e120035c9832)


 

 

## **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 **– Specifies whether to use the [Camera Clipping](https://docs-chaos.atlassian.net/wiki/spaces/VSKETCHUP/pages/109789413/Camera#Clipping) boundaries. When enabled, the black and white values are inverted. When disabled, the distance can be set manually by the Near and Far Distance options.

**Near Distance** – Objects up to this distance from the camera render as white. This option is available only when** Depth From Camera** is disabled.

**Far Distance** <sup>[1](#Footnotes)</sup> – Objects further than this distance from the camera render as black <sup>[2](#Footnotes)</sup>. This option is available only when** Depth From Camera** is disabled.

![image](media://6a9633f2-ed4c-47d7-8a99-a36f341e0154)

 

### **Example: Invert Z Depth**

---

The black and white values in the Z Depth Render Element can be inverted by enabling the **Depth From Camera** option. If disabled, an inverted result could also be achieved by swapping the Near and Far values.

 

![image](media://43b4558b-9f17-4b56-a305-927255a9e5c3)


![image](media://c374eca6-3d31-4e23-9935-65d038152799)


 

 

## **Common Uses**

---

![image](media://20716d3c-2e23-46e0-9dfb-565bbc820bb5)

Depth of field applied to composite using Z Depth Render Element

![image](media://321d00ef-f5c4-4a83-9751-e120035c9832)

Original Beauty Composite

![image](media://7cc6e841-3be7-4125-a421-3807c5a860e7)

Basic fog applied to composite using Z Depth Render Element


 

 

## **Footnotes**

---

1. Calculated in the default SketchUp unit - inches.
2. <span style="color: #000000"> You can reset the Input Number Slider's value to its default value by right-clicking on the slider and selecting the </span>**Reset**<span style="color: #000000"> context menu option.</span>