The Nodespell depth recipe turns a flat still into one with a chosen focus plane and distance haze. A depth model node creates a grayscale depth map of the image, then inside an Image Compositor, ZDefocus blurs everything off the focus plane and Depth Atmosphere adds fog, color, and bloom that grow with distance. Only the depth map uses credits; the compositor work runs in the editor and can be adjusted freely.
What you need
- A still image, as an Asset or a result on a node in your Project.
- Credits for one depth-map run.
- Familiarity with compositors helps. Depth maps here work like a Z pass in other compositing tools: one channel, near and far encoded as brightness.
Graph at a glance: Image → Depth Anything V3 Image (or Facet Depth V1) → Image Compositor { Compositor Input (image) + Compositor Input (depth) → ZDefocus → Depth Atmosphere → Compositor Output }
Stage 1: Generate the depth map
Section titled “Stage 1: Generate the depth map”- Open the Project in Graph mode. If the image is not on the canvas, press
Tab, add an Asset node, right-click it, choose Load Asset, and pick the image. - Press
Taband add a depth model node, for example Depth Anything V3 Image or Facet Depth V1. - Connect the image to the depth node’s Image input.
- Select the depth node and press
Cmd/Ctrl+Shift+R.
Both nodes output a grayscale map with near surfaces in white and distant surfaces in black. Depth is relative, not a distance in meters.
| Depth node | Useful settings | Outputs |
|---|---|---|
| Depth Anything V3 Image | Output format: keep PNG to avoid lossy compression. | One grayscale depth image. |
| Facet Depth V1 | Ignore transparent objects (Standard or See-through), Processing resolution (1K, 1.5K, 2K), Scale. | Depth map (PNG), plus Depth (EXR) and Raw depth (NPY) with floating-point values. |
See Depth and defocus for the full list of depth tools.
Stage 2: Bring image and depth into a compositor
Section titled “Stage 2: Bring image and depth into a compositor”- Press
Taband add Image Compositor. - Connect the image to the Image Compositor Images input first, then connect the depth map. The first connection is index 0, the second is index 1.
- Select the Image Compositor and press
Enter(or right-click and choose Enter Node). - Leave the existing Compositor Input on Index
0; this is the image. - Press
Tab, add a second Compositor Input, and set Index to1; this is the depth map.
ZDefocus works only inside a compositor. See Compositing.
Stage 3: Refocus with ZDefocus
Section titled “Stage 3: Refocus with ZDefocus”- Press
Taband add ZDefocus. - Connect the image Compositor Input to the ZDefocus image input and the depth Compositor Input to its depth input.
- Check Depth Encoding is White Near, which matches both depth nodes. Use Black Near only for maps where near is dark.
- Set Output to False Colour Focus to see which areas are in focus.
- Adjust Focus Depth (the normalized depth that stays sharp) until your subject is in focus, and Focus Range to widen or narrow the sharp zone.
- Set Near Blur and Far Blur for the strength in front of and behind the focus plane, and Max Radius for the largest bokeh in pixels.
- Choose an Aperture: Disc, Blades, Heart, Star, Ring, or Image (uses a picture connected to Kernel). Raise Highlight Gain to make bright points bloom into bokeh shapes.
- Set Output back to Result. Switch Quality to High quality for the final frame.
Other Output views help you debug: Depth View shows the depth as read, Blur View shows blur amount, Kernel shows the aperture shape, and Layer Setup shows how depth is split into layers.
Stage 4: Add distance haze with Depth Atmosphere
Section titled “Stage 4: Add distance haze with Depth Atmosphere”- Press
Taband add Depth Atmosphere. - Connect the ZDefocus output to Image and the depth Compositor Input to Depth.
- Set Start and End, the normalized distances where atmosphere begins and reaches full strength.
- Set Air Density for how thick the fog is, Maximum Opacity to cap the haze, and Air Colour to tint it.
- Choose Falloff: Exponential, Linear, or Custom to draw your own Falloff Curve.
- Optionally, in the grade and diffusion controls, use Exposure, Contrast, and Saturation to change distant tones, Image Diffusion to soften distant detail, and Highlight Bloom to spread light from bright areas.
- Use Output views such as Fog Mask, Distance Influence, or Atmosphere Only to check coverage, then return to Result.
Stage 5: Output and download
Section titled “Stage 5: Output and download”- Connect the Depth Atmosphere output to Compositor Output, replacing the default connection.
- Press
Uto return to the parent graph. - Select the Image Compositor to see the result in the Design panel, then right-click it and choose Download.
Check the result
Section titled “Check the result”- Look at subject edges. ZDefocus spreads foreground blur past object edges; turn on Edge Anti-aliasing if edges look stepped.
- Set Depth Atmosphere Output to Fog Mask and check that coverage grows toward the distance and stays off the subject.
- Select the original image and the Image Compositor together to compare them as A and B in the Design panel.
Variations
Section titled “Variations”- Video shots. Use Depth Anything V3 Video to make a depth clip, and the Compositor (video) node instead of Image Compositor.
- Haze without refocus. Skip ZDefocus and connect the image straight to Depth Atmosphere. Depth Atmosphere also works outside a compositor.
- Limit the effect to part of the frame. Both nodes accept an optional mask; set Mask Source and Invert Mask as needed.
- Generated stills. Start from an Image Generator result and keep its take fixed before you build the depth chain.
Frequently asked questions
Section titled “Frequently asked questions”Why is the wrong part of the image blurred?
Section titled “Why is the wrong part of the image blurred?”The depth encoding is probably inverted. Both Nodespell depth nodes put near surfaces in white, so ZDefocus and Depth Atmosphere should use White Near.
Does changing ZDefocus or Depth Atmosphere use credits?
Section titled “Does changing ZDefocus or Depth Atmosphere use credits?”No. They are image-processing nodes. Only generating the depth map uses credits.
Why can’t I add ZDefocus in the main graph?
Section titled “Why can’t I add ZDefocus in the main graph?”ZDefocus is available only inside a compositor. Enter an Image Compositor or Compositor first. Depth Atmosphere works in both places.
Is the depth map a real distance?
Section titled “Is the depth map a real distance?”No. Both depth nodes produce relative depth, not distances in meters. Use Depth Min and Depth Max on ZDefocus or Depth Atmosphere to remap the range you need.
Related
Section titled “Related”- Depth and defocus — every depth, defocus, and atmosphere control
- Compositing — compositor inputs and outputs
- Viewers — inspect channels and compare results
- Composite and finish existing images — the compositor basics