---
title: "ZDepth"
canonical: "https://documentation.chaos.com/space/VRAYNUKE/110625185/ZDepth"
format: markdown
---
The ZDepth Render Element is a grayscale image that renders each pixel based on its distance from the camera in the view. 

 

## **Overview**

---

 

---

 

UI Path: ||Toolbar|| **> V-Ray Menu icon > Render > VRayRenderElement > Type: ZDepth**

** **  
** **

## **Properties**

---

 

![image](media://3e76c64a-8cfe-4e08-a56f-4a1dd4860cfb)

 

 

**Use depth from the camera** – Specifies whether to use to camera clip boundaries as the minimum and maximum ZDepth distance. Enabling this option disables the **Depth Black** and **Depth White** parameters.

**Depth Black** – Objects further than this distance from the camera will render as black. This option is available only when **Use depth from the camera** is disabled.

**Depth White** – Objects up to this distance from the camera will render as white. This option is available only when **Use depth from the camera** is disabled.

**Depth Clamp** – Clamps the ZDepth colors to a linear 0-1 range.

**Filtering** – Applies the image filter to this channel. Image filter settings are in the [Image Sampler ](https://docs-chaos.atlassian.net/wiki/spaces/VRAYNUKE/pages/110625377)tab in the [VRayRenderer ](https://docs-chaos.atlassian.net/wiki/spaces/VRAYNUKE/pages/110625451)properties.

 

## **Setting Depth**

---

 The Z-Depth Render Element parameters for minimum and maximum depth, **Depth Black** and **Depth White**, can be set to various values to provide different ranges of depth in the render element. In these examples, **Depth Clamp ** is enabled.

 

 

---

 

## **Common Uses**

---

The Z-Depth Render Element is useful for adding depth of field to the final image in post production within a compositing application without the need for re-rendering. It can also be used to create basic fog by overlaying it on the composite in Add mode or Screen mode, with color correction as needed.

Note: In the example below the depth of field effect has been exagerated for the purposes of clarity.