Entry 23 · Passes
Depth and motion
Two passes that record geometry and velocity — numbers that downstream tools read as instructions.
- Entry
- 23
- Section
- 05 Passes
- By
- Marek Sowa
- Read
- 2 min
Data in disguise
Most render passes look like images because they are images: colour values assembled from light transport, shaded and filtered like everything else. Depth and motion are different. They arrive wearing the visual conventions of a photograph — the depth pass looks like a misty grey gradient, the motion pass a blurry smear of colour — but neither is a picture of anything. They are measurements, encoded in pixel channels because that is a convenient vessel.
The depth pass (often called Z-depth, after the camera-space axis it samples) stores one number per pixel: the distance from the camera to the first surface it hit. That number is linear in camera space, which makes it useful for lens-blur operations in compositing. Give a depth pass to a depth-of-field node and it does not simulate the optics of a lens; it blurs by the amount a real lens would have blurred, computed from the distances the render already measured. It is fast, controllable after the fact, and completely wrong about one thing — it cannot reproduce the occlusion artefacts that real defocus creates when a near object sits in front of a far one, because it holds only the frontmost distance, not the geometry behind it. For a locked-off beauty shot it is often good enough. For a close lens at wide aperture, the seams show.
The motion vector pass stores displacement: how far, and in which direction, each surface point moved during the exposure window of that frame. The values are typically encoded as a two-channel image, one channel for horizontal motion in screen space, one for vertical. Feed that into a motion-blur node and the compositor can reconstruct the streak that would have accumulated on a real sensor. The same vectors drive frame interpolation — given two frames and their motion data, an interpolator can synthesise intermediate positions, which is how some denoising systems and temporal upsampling pipelines create in-between samples cheaply.
Both passes have a shared failure mode: they describe only the visible surface. A motion vector at an edge carries the velocity of whatever won the visibility test at that pixel. When a fast foreground object crosses a slow background, the pixels at the silhouette hold vectors that belong to neither surface cleanly. Composited motion blur goes wrong at exactly those edges, smearing the wrong colour across the wrong background. The fix — render the objects on separate layers, blur separately, composite — reintroduces the occlusion problem that separate layers always create. There is no free lunch; there is only a choice about where to pay.
Depth and motion are infrastructure. They do not survive to the final frame as themselves; they are consumed by other operations. Getting them right is invisible. Getting them wrong is a halo, a smear, or a blur that does not match the glass in front of the camera.
More in Passes
Every entry in this section is listed on the Passes page, and all twenty-four sit in the full register.