- Image
- Effects
Depth Lens
Purpose
Section titled “Purpose”Depth Lens uses a depth map to decide which parts of the image stay in focus. Its iris controls shape the blur around points away from the focus plane. Colour focus offsets and veiling flare add further lens effects.
Place Depth Lens under Effects in the Image view. Connect the picture to image and a matching depth map to field. Depth Anything can estimate that map from the picture.
Move Focus through the depth range until the subject is sharp. Lower f-stop for stronger defocus, then adjust the iris shape.
Inputs and outputs
Section titled “Inputs and outputs”imageis the picture to render.fieldis a single-channel depth map.outis the picture with the lens treatment applied.
Controls
Section titled “Controls”- Focus uses the units of the incoming depth map. Depth Scale expands or contracts that range.
- f-stop controls the iris opening. Lower values produce stronger defocus.
- Iris Blades sets the aperture shape. Zero gives a round iris.
- Bokeh moves light toward or away from the edge of the blur disc.
- Longitudinal CA separates red and blue focus distances.
- Veiling Flare spreads light into shadows. Highlight Headroom strengthens the response to bright sources.
- Image Format and Capture Resolution set the simulated image plane and its sampling detail.
Relative depth estimates do not give a focus distance in metres. Set Focus against the values in your actual map. If those values change scale between frames, the apparent focus can move even with a fixed Focus setting.
Inputs
-
imageimage required -
fieldimage -
cameraimage
Outputs
-
outimage -
focusimage -
lens_sourceimage
Parameters
Section titled “Parameters”Lens
op('depth_lens').par.Mix Blend the untouched image to the complete taking-lens result.
- Default:
1- Range:
- 0 to 1
op('depth_lens').par.Focus Depth of the focus plane, in the units the depth input carries: world units from a renderer, 0..1 from a normalised depth map. Zero focuses an unconnected input.
- Default:
0- Range:
- 0 to 10000
op('depth_lens').par.Focusx Where Auto measures, across the frame. 0.5 is the centre.
- Default:
0.5- Range:
- 0 to 1
op('depth_lens').par.Focusy Where Auto measures, up the frame. 0.5 is the centre.
- Default:
0.5- Range:
- 0 to 1
op('depth_lens').par.Focusspot Width of the metering patch as a fraction of the frame. Small reads one detail; wide averages a whole subject.
- Default:
0.05- Range:
- 0 to 0.5
op('depth_lens').par.Focustime Seconds the lens takes to reach a new focus distance, in Manual as well as Auto. Zero snaps; a quarter second is a fast operator.
- Default:
0.25- Range:
- 0 to 4
op('depth_lens').par.Focuslatch Keep the distance autofocus found after you switch it back to Manual, instead of returning to Focus Distance. Place the point, flip Auto on and off, and the lens rides to what it saw and stays there.
- Default:
Off- Options:
- Off, On
op('depth_lens').par.Focusguide Draw the metering spot while you place it: green once the lens has arrived on what it measured. Turn it off to render.
- Default:
Off- Options:
- Off, On
op('depth_lens').par.Depthgain How much depth the input spans. Raise it when a depth map uses only part of its range.
- Default:
1- Range:
- 0 to 6
op('depth_lens').par.Fstop Iris opening. Wide open defocuses hard and shows the blade shape; stopped down brings the whole depth in.
- Default:
4- Range:
- 1.2 to 22
op('depth_lens').par.Blades Number of aperture blades. Zero is a round iris; five through nine give a real polygonal defocus shape.
- Default:
7- Range:
- 0 to 11
op('depth_lens').par.Bokeh Where light sits inside the blur disc. Negative is smooth and creamy; positive rings the edge into soap bubbles.
- Default:
0.15- Range:
- -1 to 1
op('depth_lens').par.Ca Offsets red and blue focus distances, producing warm and cool fringes around out-of-focus structure.
- Default:
0.3- Range:
- 0 to 1
op('depth_lens').par.Flare Broad light bouncing between the elements and barrel. It lifts and desaturates shadows without blurring the photographed base.
- Default:
0.12- Range:
- 0 to 1
op('depth_lens').par.Highlights Restores light above display white so clipped practicals form substantial bokeh discs and veiling flare. It has nothing to restore when Input Is is Linear, because that light was never clipped away.
- Default:
2.5- Range:
- 0 to 12
op('depth_lens').par.Focallength The simulated taking lens, in millimetres, used by the Thin Lens model. This is the lens you are photographing THROUGH; it does not change the framing, which belongs to whatever camera rendered the picture.
- Default:
50- Range:
- 4 to 2000
Input
op('depth_lens').par.Fov Fallback vertical field of view, in degrees. It is ignored while a camera row is connected. Only Ray Distance needs it.
- Default:
45- Range:
- 1 to 175