2026-07-14

Depth Compositing

Depth Compositing

Depth compositing uses the Z-depth information from a 3D render to control how elements are composited based on their distance from the camera. Instead of treating the image as a flat 2D layer, depth compositing understands that different parts of the image are at different distances. This allows for effects that would be impossible or very difficult with traditional 2D compositing.

The depth pass is a grayscale image where each pixel's brightness represents its distance from the camera. White pixels are close, black pixels are far away. When you have a depth pass, you can use it to control almost any compositing operation based on distance. For example, you can add fog that gets thicker as objects get farther away, or blur the background to simulate depth of field.

Depth of field is one of the most common uses of depth compositing. Instead of rendering depth of field in the 3D software, which is expensive and requires re rendering if you change your mind, you can render a sharp image with a depth pass and add the depth of field in compositing. This gives you complete control over the look and lets you change the focus point without re rendering.

Atmospheric effects like fog, mist, and haze are naturally depth based. With a depth pass, you can add realistic atmospheric perspective where distant objects become less contrasty and more blue, just like in the real world. You can also add volumetric light rays that fade with distance. These effects add enormous depth and realism to a shot with very little effort.

Depth compositing also enables relighting. If you have the world position pass and the normal pass along with the depth pass, you can add new lights in compositing that correctly illuminate the 3D scene. This is called relighting, and it is incredibly powerful. You can change the mood of a shot, fix bad lighting from the render, or add interactive lighting from new CG elements without going back to the 3D software.

Let's work together

Do you need more info, help with your project, or to develop an idea?

Whether it's an easy question, a quick doubt, or just a 5-minute chat, send me a message—it costs nothing and I'm always ready to help. I love discussing a problem to understand it, getting creative with solutions, and focusing on simple, reliable, and straightforward ideas that we can actuate quickly.

Contact me

Switch Topic

Choose a specialized topic to explore: