Home · Lab · 2.5D & Projection

P4 Reading depth from parallax

Position in frame can lie; how far a point slides tells you its depth

2.5D & Projection · ~6 min · Free

1 The idea

A single still frame can’t tell you depth for sure. The top of the orange pole sits high in frame near the hills and looks far away. Move the camera, though, and near points draw long trails while far points draw short ones.

3D camera trackers use the same idea. They look at how differently each point slides and work back to 3D positions and the camera’s motion. That is why you want tracks spread across near, mid and far.

Z ≈ f_px · T / shift

2 Hands-on

Move the camera to draw each point’s trail, then click A–E from nearest to farthest

Long cyan trail = near, short trail = far. Ignore how high or low the point sits in the frame

SkyVFX Lab · P4interactive · 1001

3 Deep dive

From shift back to depth

If you know how far the camera moved (T) and how far a point shifted on screen, you can solve for depth: Z ≈ f_px·T / shift (f_px is the focal length in pixels, ≈ 622 in this figure). Once you have picked all five points, the figure shows each one’s depth and pixels per metre.

In real shots you rarely know T exactly, but ratios still work: a point that shifts three times as far is three times closer, however far the camera slid (this holds for a sideways slide without panning or tilting).

Position in frame can fool you

On flat ground, lower in frame usually means closer, but that rule only holds for things resting on the ground. A pole top, a bird or a hanging sign high in frame can be very close. Parallax doesn’t care how high a point is.

Point in the figureDepthShift/m
near rock≈ 6.9 m≈ 90 px
orange pole top≈ 8.9 m≈ 70 px
mid-left rock≈ 18 m≈ 35 px
far right rock≈ 30 m≈ 21 px
hill≈ 89 m≈ 7 px

Camera trackers read parallax this way

A tracker finds hundreds of features and follows them through the shot, then finds the 3D points and camera path that explain all the shifts at once. If every point sits at the same depth there isn’t enough depth information and the solve gets shaky.

Things that move on their own (people, cars, waving leaves, reflections) poison the maths because their motion doesn’t come from the camera. Mask them out.

  1. 1Find + follow features
  2. 2Mask moving things
  3. 3Solve camera + 3D points
  4. 4Check with a ground card

Tracks need near, mid and far

4 In real work

In Nuke

  1. Use a Tracker on a few features at different depths and compare how far each moves over the same frames
  2. 3D solves in Nuke use CameraTracker (NukeX): mask out anything that moves on its own first
  3. Check the solve: put a Card on the ground, render it through ScanlineRender over the plate and see if it sticks

Common mistakes → the fix

  • ✗ Guessing depth from height in frame✓ Look at how far the point slides when the camera moves
  • ✗ Tracking only far points✓ Spread tracks across near, mid and far
  • ✗ Letting walking people or cars into the solve✓ Mask out anything that moves by itself

Before you send the shot

  • Tracks at several depths
  • Nothing that moves on its own in the solve
  • A test card on the ground sticks for the whole shot

5 Check yourself

One question to check yourself

The camera slides sideways. Point X shifts 90 px, point Y shifts 30 px. Which is true?

What you learned

🔒 Answer the question above and this card opens

More questions

1. Over the same move, P shifts 120 px and Q shifts 40 px. If P is 5 m deep, how deep is Q?

2. Why is a camera solve with only far-mountain tracks unstable?

Where the numbers come from: The scene is rebuilt in your browser from our desert plate and its Blender depth pass (35 mm lens, 36 mm sensor, 1.6 m high, tilted 4° down). Parallax numbers use the pinhole formula: move the camera T m and a point Z m deep shifts ≈ 622·T/Z px in a 640-wide frame. The layer split, the “stretch” measure, the depth mesh and the automatic clean plate are teaching versions (object edges and rock removal are simplified), not Nuke output.