Overview
Disparity compares patches between the left view and the right view and estimates, for each pixel, how many horizontal pixels it has shifted between the two eyes. The result: a scalar image (per pixel) or a vector image (per direction, L→R and R→L).
This data is used by other nodes: Disparity to Z (conversion to a depth map), New Eye (generating a third view), Stereo Align (correcting vertical alignment), etc. Algorithmically close to Optical Flow, but specialized on the horizontal stereo axis.
Where to find this node
- Effects Library:
Tools > Stereo > Disparity - Quick add: right-click in the Node Editor →
Add Tool > Stereo > Disparity
What is disparity
In stereo vision, two parallel (or nearly parallel) cameras capture the same scene from two horizontal positions. An object projects slightly offset points between the two images.
- High disparity
- A large offset between L and R = an object close to the camera (strong parallax).
- Low / zero disparity
- A tiny offset = an object far away / at infinity (the lines of sight of both eyes are almost parallel).
- Negative disparity
- A reversed offset = an object in front of the convergence plane, perceived as popping out of the screen.
Inputs
- Left (orange) - the left view image.
- Right (green) - the right view image.
- Effect Mask (blue) - optional.
Setup
Disparity calculation for Z-depth:
LeftCam ─┐
├── Disparity → Disparity to Z → MediaOut (Z map)
RightCam ┘
Stereo align workflow:
LeftCam ─┐
├── Disparity → Stereo Align (vertical correction)
RightCam ┘ → MediaOut
Generating an intermediate view:
LeftCam ─┐
├── Disparity → New Eye (Position 0.5 = mid view)
RightCam ┘ → MediaOut
Cache for reuse by several downstream nodes:
LeftCam ─┐
├── Disparity (cache to disk)
RightCam ┘ → [3-4 nodes use it]Controls tab
- Method (default: Classic)
- The algorithm. Classic = fast, enough for clean scenes. Enhanced = more precise on difficult surfaces (transparent, reflective, low texture), but much slower.
- Smoothness (default: 0.4)
- Spatial smoothing of the disparity map. Low = precise but noisy disparities. High = more consistent, but fine details are lost (hair, foliage).
- Correlation Search Range (default: 8)
- Maximum analysis distance in pixels. Raise it for strong disparities (very close objects) and for scenes with a large interaxial.
- Maximum Disparity (default: 32)
- The maximum disparity amplitude. Clips values to what is realistic for the scene.
- Edges (default: Smoother)
- Behavior at the edges. Smoother = soft, Sharper = strict (can create artifacts).
- Use Greyscale Color Space (default: Off)
- Enables luma-only analysis. Faster, but loses chroma precision.
Use cases
- Generating Z-depth from stereo - Disparity → Disparity to Z = a depth map for DOF, fog and 3D-aware compositing on live action footage.
- Alignment correction - Disparity reveals vertical misalignments (rig rotation, height asymmetry) that Stereo Align can correct.
- Generating intermediate views - Disparity + New Eye = create a view between L and R (for example for 3D multiview).
- Convergence adjustment - shift both views horizontally based on the average disparity = move the convergence plane in post.
- Screen window detection - pixels with a disparity outside the comfortable range = candidates for a window violation, to be fixed.
- VFX: integrating 3D into a stereo plate - Disparity to calibrate the depth of an added 3D element so it matches the plate stereographically.
Tips
- Cache the output - the disparity calculation is heavy. If several nodes sit downstream (Disparity to Z, New Eye), cache the output so it is not recomputed on every iteration.
- Clean footage, without baked-in motion blur - the analysis works poorly on blurry frames. Prefer shots with a fast shutter for the Disparity analysis, then add motion blur in post if needed.
- Search Range proportional to the interaxial - scenes with a large camera interaxial (strong depth) = raise the Search Range to capture the high disparities.
- Smoothness 0.3-0.5 = the sweet spot - below: edge artifacts, above: lost detail in hair, leaves, etc.
- Check the visualization - view the disparity map directly: a consistent gradient from the background to the foreground, with no large noisy areas = a clean analysis.
- Stereo Align upstream - if the views are not perfectly aligned vertically, run a first Stereo Align before Disparity = a much cleaner result.
- For non-stereoscopic workflows where you want to estimate depth, prefer an AI depth estimator (MiDaS, DPT) directly rather than this node.
