Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
Column
width60%

The Z-Depth Render Element is a grayscale image that renders each pixel based on its distance from the camera in the view. It 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 black while those furthest away appear white. Objects between the furthest and nearest points are rendered in varying shades of gray. The lighter the gray, the further away an object pixel is from the camera. (Image is inverted.)

The most common usage of the Z-Depth Render Element is as a control for depth of field in the composite. Depth of field can be challenging to do correctly within 3ds Max, requiring many tweaks and re-renders; using the Z-Depth Render Element in a composite is usually much faster, and allows easier and faster adjustment than trying to get it exactly right within the render from 3ds Max.

 

UI Expand
titleUI Path: ||Render Setup window|| > Render Elements tab > Add button > VayZDepth

 

Column
width5%
 
Column
width35%
Image Removed

Image Added

 

Parameters

...

Section
Column
width60%

This render element is enabled through the Render Elements tab of the Render Setup window in 3ds Max and displays its parameters in a rollout at the bottom of the window:

VRayVFB – When enabled, the Z-Depth pass appears in the V-Ray Frame Buffer.

Deep output – Specifies whether to include this render element in deep images.

Zdepth use camera clip boundaries – Specifies whether to use to camera clip boundaries as the minimum and maximum Z-Depth distance. Enabling this option disables the Zdepth min and Zdepth max parameters.

Zdepth min – Objects up to this distance from the camera render as black. This option is available only when Zdepth use camera clip boundaries is disabled.

Zdepth max – Objects further than this distance from the camera render as white. This option is available only when Zdepth use camera clip boundaries is disabled.

Clamp zdepth – Clamps the Z-Depth colors to a linear 0-1 range.

Invert zdepth – Inverts the colors of the Z-Depth render element. Objects closest to the camera render as white, while those furthest away are black.

Don't filter environment – When enabled, only outlines of overlaying objects are filtered.

Column
width5%

 

Column
width35%

...

Z-Depth Minimum and Maximum

...

The ZThe Z-Depth Render Element parameters for minimum and maximum depth, Zdepth min and Zdepth max,  can can be set to various values to provide different ranges of depth in the render element. In these examples, Clamp zdepth is enabled and Invert zdepth is disabled. 

Section
Column
width25%

 

Column
width50%
Image slider
Panel
borderStylenone

Image RemovedImage Added

zdepth Zdepth min = 0cm, zdepth Zdepth max = 2404.603cm600cm

Panel
borderStylenone

Image RemovedImage Added

zdepth Zdepth min = 400cm0cm, zdepth Zdepth max = 2404.603cm1000cm

Panel
borderStylenone

Image RemovedImage Added

zdepth Zdepth min = 600cm0cm, zdepth Zdepth max = 2404.603cm3500cm

Panel
borderStylenone

Image RemovedImage Added

zdepth Zdepth min = 0cm400cm, zdepth Zdepth max = 1000cm3500cm

Panel
borderStylenone

Image RemovedImage Added

zdepth Zdepth min = 0cm600cm, zdepth Zdepth max = 600cm3500cm

 
Column
width25%

 

Invert zdepth

...

The black and white values in the Z-Depth Render Element can be inverted by enabling the Invert zdepth option.

...

width25%

 

Column
width50%
Before after
afterLabeloff
beforeLabelon
Panel
borderStylenone
Image Removed

Image Added

Panel
borderStylenone

Image Removed

Column
width25%

 

 

Image Added

Common Uses

...

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

 

Section
Column
width25%30%

 

Column
width50%40%
panel
Image slider
startIndex1

Image Removed

Original Beauty Composite
borderStylenone
Panel
borderStylenone

Image RemovedImage Added

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

Panel
borderStylenone

Image Added

Original Beauty Composite

Panel
borderStylenone

Image AddedImage Removed

Basic fog applied to composite
using Z-Depth Render Element

Column
width25%30%