©BBB3viz

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Table of Contents

This page gives information about the Z-Depth Render Element. 

 

Overview


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 Path: ||Render Setup window|| > Render Elements tab...
||Render Setup window||  > Render Elements  tab  > Add  button  > VayZDepth

 

 

 

 

Parameters


 

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 will 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 will 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 will render as white, while those furthest away will be black.

 

 

 

Z-Depth Minimum and Maximum


The Z-Depth Render Element parameters for minimum and maximum depth, zdepth min and zdepth max, 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.

 

 

zdepth min = 0cm, zdepth max = 2404.603cm

zdepth min = 400cm, zdepth max = 2404.603cm

zdepth min = 600cm, zdepth max = 2404.603cm

zdepth min = 0cm, zdepth max = 1000cm

zdepth min = 0cm, zdepth max = 600cm

 

 

Invert zdepth


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


 

on
off

 

 

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. 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.

 

 

Original Beauty Composite

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

Basic fog applied to composite
using Z-Depth Render Element