O_DisparityToDepth

The O_DisparityToDepth node produces a z-depth map for each view of a stereo clip based on the clip’s disparity map and stereo camera setup.

A z-depth map is an image that uses the brightness of each pixel to specify the distance between the 3D scene point and the virtual camera used to capture the scene. You may need a z-depth map, for example, if you want to introduce fog and depth-of-field effects into a shot. In Nuke, the ZDefocus node (Filter > ZDefocus) requires a depth map in its input.

O_DisparityToDepth stores the final z-depth map in the depth channel. Select depth from the channel dropdown above the Viewer to display the z-depth map. You can then select the red only channel (R) and adjust the gain and gamma sliders above the Viewer to display the depth map more clearly.

Inputs and Controls

Connection Type

Connection Name

Function

Input

Camera

A pre-tracked Nuke stereo camera that describes the camera setup used to shoot the Source images. This can be a camera you have tracked with the CameraTracker node or imported to Nuke from a third-party camera tracking application.
Disparity

A stereo pair of images. O_DisparityToDepth requires upstream disparity vectors. If they do not already exist, insert an O_DisparityGenerator node after the image sequence to calculate them. See O_DisparityGenerator for more information.

Control (UI)

Knob (Scripting)

Default Value

Function

O_DisparityToDepth Tab

Views to Use

viewPair

Dependent on Source

Sets the two views you want to use to generate the z-depth map. These views will be mapped for the left and right eye.