AI Generation

Depth Maps: What They Store and How Generation Uses Them

Also called depth estimation, monocular depth, depth pass, z-depth

A depth map is a grayscale image where each pixel encodes distance from the camera instead of color, conventionally with near surfaces bright and far ones dark. Generation pipelines use a depth map as a structural control signal, because it carries the layout and volume of a scene without carrying its style, so you can change how an image looks while keeping where everything is.

Reading a depth map

Open one and it looks like a soft grayscale version of the photo. Two properties matter more than the visual:

It is relative, not metric. A monocular estimate tells you that the chair is in front of the wall and roughly how much, not that the chair is 2.4 metres away. Two frames of the same shot can also be estimated at different scales, which is exactly why per-frame depth on video drifts.

The sign convention is not standardized. Some pipelines expect bright to mean near, others the reverse. An inverted map does not error out, it just produces a scene where the background is closest, and it is the single most common wasted hour in depth work.

What depth is good at controlling

Depth is a structure channel, so it is the right tool whenever the answer to "what must stay identical?" is spatial rather than visual.

  • Restyling with layout locked. Change medium, palette, and lighting completely while the composition, pose, and object placement survive.
  • 2.5D camera moves from a still. Displace pixels by depth and you get real parallax, so a photo can be pushed into or panned across. This is how most still-to-motion effects are built.
  • Relighting and atmosphere. Distance-aware fog, haze, and depth of field need to know what is far away.
  • Compositing. Inserting an element at the right occlusion order requires knowing what should be in front of it.

Where depth estimation breaks

  • Glass, water, mirrors. The estimator reports the depth of what is visible through or reflected in the surface, not the surface itself.
  • Thin structures. Wires, railings, hair, and chain-link either vanish or get smeared into the background.
  • Flat pictures of deep scenes. A poster, a TV screen, or a painting inside your photo will often be given real depth.
  • Video. Estimating each frame independently produces small scale changes frame to frame, which becomes visible as breathing or wobbling parallax. Temporal smoothing, or a video-native depth model, is the fix.

Depth versus edge versus segmentation as control

These three get used interchangeably and should not be:

  • Depth preserves space and volume, and allows contours to shift. Good for restyling and camera moves.
  • Edge conditioning (line art, contours) preserves outline exactly, including details you may want the model to reinterpret. Good for turning a sketch into a render.
  • Segmentation preserves region identity, not shape or distance. Good for "this area is sky, that area is building".

Pick the one that matches what you cannot afford to lose. Stacking depth with a light edge pass is common when both layout and silhouette matter, but each control you add narrows how much the model can actually improve.

The prompt for this

A starting point that reliably produces the effect. Adjust the subject and setting; keep the technical clauses.

Keep the exact composition and volumes of the supplied depth map, restyle as an ink-wash painting, cool grey palette, soft rim light from the left

Try Depth Map yourself

Open the generator with a starting point already filled in.

Frequently asked questions

What does a depth map actually store?
Distance per pixel, written as brightness. Most models produce relative depth, meaning the ordering and the rough spacing are right but the numbers are not metres. That is enough for composition control and parallax, and not enough for measurement.
Is near white or near black?
Both conventions exist. Monocular estimators usually output near-bright inverse depth, while 3D renderers often write near-dark. Feeding an inverted map into a pipeline that expects the other convention turns the scene inside out, so check the sign before debugging anything else.
What is the difference between a depth map and a normal map?
Depth says how far a surface is. A normal map says which way it faces. Depth controls layout and volume, normals control how light behaves across a surface, and they are often used together in relighting.
How is a depth map made from a single photo?
A monocular depth estimation model predicts it from cues a human also uses: occlusion order, perspective lines, defocus, familiar object sizes, and texture gradients. No second camera and no scene data are needed.
Why does my depth map look flat or blotchy?
Usually low-texture surfaces, strong reflections, or glass. The estimator has no cues to work from, so it guesses a plane. Painted or printed images of scenes cause the same thing, since a poster on a wall is flat but looks deep.

Related terms