Table of Contents

This page provides information on the Z-Depth Node in V-Ray for Blender.

 

Overview


The Z-Depth Render Node 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 Z-Depth is as a control for depth of field in the composite.

 

UI Path


 

||Node Editor|| > Add > Render Channels > Z-Depth

 

Node


Black Distance – In a Z-depth element a black distance is the distance closest to the camera. This parameter allows you to specify how far from the camera the z-depth element starts.

White Distance – In a Z-depth element a white distance is the distance farthest away from the camera. This parameter allows you to specify how far from the camera the z-depth element ends.

Depth From Camera – When enabled, the Black Distance and White Distance are taken from the far and near clipping plane of the camera.

Depth Clamp – Allows you to enable or disable the the sampling of the current render channel for antialiasing.

Filtering – Enables or disables the AA filtering for the current render channel.

 

 



Parameters


 

 Name – The name of the render channel.

 

 

 

Black Distance and White Distance


The Z-Depth Render Channel parameters for minimum and maximum depth, Black Distance/Depth Black and White Distance/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.

 

 

Black = 368, White = 31900

Black = 1552, White = 31900

Black = 0, White = 17740

Black = 0, White = 4090

Depth from camera turned on

 



Common Uses


The Z-Depth Render Element is useful for adding depth of field to the final image in post production using a compositing application without the need for re-rendering.

 

 


Z-Depth Render Element

 


Original Beauty Composite

 

 

 


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

 

 

Notes


  • The Z-Depth Render Element will always be written as a 32-bit channel for multichannel .exr files. Even when outputting a 16-bit multichannel .exr, the Z-Depth channel will be 32-bit while the other channels will be 16-bit.