Search Tips

Search is based on keyword.

`Ex: "Procedures"`

Do not search with natural language

`Ex: "How do I write a new procedure?"`

Give Feedback Support Portal

# DisparityToDepth

# Description

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. For example, you may use a z-depth map 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.

The left view of a stereo image. | The associated depth map of the left view.

It's worth mentioning that depth is the distance along the Z axis for the camera, not the distance along the ray from the camera center to the 3D surface point. This matches the depth output of the ScanlineRender node in Nuke. In the figure below, each pixel forms a ray, and AB measures the physical distance from the camera to the 3D point, whereas AC measures the distance along the Z axis for the camera.