Lens Blur
Defocuses an image the way a real lens does, uniformly or from a depth pass, with a full lens model for aperture shape, bokeh, aberrations, and bloom.
Where a Gaussian Blur averages pixels evenly, Lens Blur spreads light through an aperture shape: highlights take that shape, bright points turn into bokeh discs, and a defocused foreground spills over a sharp background as it would through a real lens. Both defocus modes run the same lens model.
Defocus modes
Section titled “Defocus modes”- Uniform (default) applies one blur radius across the whole frame and needs no extra input: a soft background or a shallow-focus look on flat artwork. Side of Focus says whether the picture sits in front of or behind the focus plane; it changes only the lens effects that differ by side, such as Spherical Aberration, not the amount of blur.
- Depth Map takes a depth image on the Depth input, the same size as the picture, so near and far fall out of focus around a focus plane. Press Pick Focus in Preview and click the surface that should be sharp to set Focus Position from the depth pass’s own values; drag to watch the focus zones follow the cursor. Blur Amount is the largest blur, reached at the ends of the range, and the Near and Far Blur Multipliers scale it separately on each side of focus.
Connecting a depth image switches Defocus Mode to Depth Map, and connecting an Aperture image switches Aperture Shape to Custom. After that both are ordinary settings you can change back.
Reading the depth input
Section titled “Reading the depth input”Depth Encoding tells the node how the depth image’s values map to camera distance.
- Normalized (Black Near), the default, suits a relative or AI-generated depth map with values between 0 and 1. Normalized (White Near) flips it.
- Camera Distance, Inverse Distance, and Device Z decode real distances from a 3D renderer’s pass, using Depth Unit and the near and far bounds. Depth Unit changes what the numbers mean rather than converting them: a Far Distance of 100 is 100 m under m and 100 mm under mm.
Focus Position is stored in the depth image’s own raw values, so changing the encoding or the range never slides focus off the surface you picked. The range is never fitted per frame, so focus and blur stay steady across a sequence.
Wire in a source that carries real distances (the depth output of 3D Render, or any depth image with values outside 0 to 1) and Lens Blur switches to Camera Distance once and sets Far Distance from that source’s maximum, so a render is focused sensibly straight away. Near Distance is left alone, because a camera always sits in front of the nearest surface. Editing the encoding or Far Distance stops the automatic choice; Fit to Depth Input in the Depth section re-runs it on demand, for example after moving the camera.
The Depth input also takes a batch of depth frames, matched one to one against the color batch, so a batched render is blurred with each frame’s own depth. A single depth image is shared by every frame.
The lens model
Section titled “The lens model”The Lens section builds the aperture: a perfect Circle, a polygon of Blades, or a Custom aperture image wired into the Aperture input, grayscale or color, so you can shape the bokeh yourself.
- Bokeh Aspect stretches the bokeh into an oval, as an anamorphic lens does.
- Cat Eye clips the bokeh into cat-eye shapes toward the frame’s edges and corners, as a real lens does.
- Bokeh Bias is the artistic rim-or-core control: positive brightens the rim for a soap-bubble look, negative brightens the center.
- Spherical Aberration is the physical one: it moves light toward the rim or the core without changing total brightness, and its character reverses across the focus plane.
- CA Type/Balance (shown once Chromatic Aberration is above 0) blends between axial (each color focuses at a different depth) and lateral (colors shift apart toward the frame edges) aberration.
- Bloom boosts bright highlights before the blur, so they spread into bokeh shapes and nearer objects still cover them.
- Highlight Reconstruction (shown once Bloom is on) estimates the brightness clipped highlights lost, so a large blown-out area blooms brighter than a lone bright pixel. It acts only in an 8-bit project; a 32-bit (Float) image already carries its brightness above white.
Six Preset looks (Soft Natural, Crisp Hexagon, Rounded Octagon, Anamorphic, Vintage Bubble, and Dreamy Bloom) set the aperture and lens controls without touching focus, radius, or depth. Neutral restores those controls to their defaults, and Custom means the current settings match no preset.
Mix, edges, and rendering
Section titled “Mix, edges, and rendering”- Mix blends the result back with the original in premultiplied linear light.
- Edge Mode defaults to Extend, which keeps a dark frame from bleeding into large bokeh; Transparent lets the image fade out at the border.
- Invalid Depth treats areas with no usable depth as Far (default), Near, or No Effect (they stay sharp).
On a supported GPU the blur runs there, falling back to the processor automatically otherwise, with the same result either way.
Quality and speed
Section titled “Quality and speed”A large blur is the slowest thing Lens Blur does: doubling the blur radius roughly quadruples the work. Lens Blur keeps large blurs fast by computing them from a smaller copy of the image, reduced only as far as the blur can hide, while everything in focus stays sharp at full size and blurred foreground is laid back over it. Quality sets how far that reduction may go.
- Full, the default, is exact for any blur up to 128 pixels, and beyond that is visually indistinguishable from an exact render.
- Balanced and Draft reduce further for more speed. The difference shows mostly as softer edges on bright bokeh shapes, so they are good working settings while you set up a shot.
- While you drag a Lens Blur slider, the Preview shows a faster level when the chosen one is slow, and the result at your Quality renders when you let go. Nothing downstream recooks until then.
Parameters
Section titled “Parameters”Pins
Defocus
What drives the blur.
Depth Map needs 32-bit (Float) Mode. Connecting a depth image selects it.
Blur radius applied to the whole image. 0 = no blur.
Whether the image sits in front of or behind the focus plane. Lens effects that differ by side, such as Spherical Aberration, follow this choice
Depth that is in sharp focus, in the depth image's own values. Pick Focus sets it from a click in the Preview. Values past the slider's near and far ends can still be typed
Width of the sharp zone around Focus Position, as a fraction of the near-to-far depth range. 0 = a single plane.
How sharpness falls off into blur outside the in-focus range
Maximum blur radius at full defocus. The Near and Far multipliers scale this one value for each side of focus
Scales Blur Amount for everything in front of focus. 1.00x is the full amount; 0 leaves the foreground sharp
Scales Blur Amount for everything behind focus. 1.00x is the full amount; 0 leaves the background sharp
How finely a large blur is computed. Full is exact up to 128 px and stays visually exact beyond it; Balanced and Draft trade bokeh edge detail for speed. In-focus detail always stays sharp
Blends the result with the original image. 100% = fully blurred.
Lens
Shape of the aperture, which out-of-focus highlights take on
Number of aperture blades
Blends the polygon toward a circle
Rotates the aperture shape
Stretches the bokeh into an oval, as an anamorphic lens does. 1.0 = round.
Brightness across each bokeh disc. Positive brightens the rim for a soap-bubble look, negative brightens the center for a smoother blur. 0 = even.
Softens the rim of each bokeh disc
Clips the bokeh into cat-eye shapes toward the edges and corners of the frame, as a real lens does
Tint the bokeh with the custom aperture image's colors instead of reading it as one grayscale shape
Which channel of a color aperture image gives the shape when Use Kernel Color is off
Highlights
Boosts bright highlights before the blur, so they spread into glowing bokeh shapes. 0 = off.
Linear-light brightness above which a pixel blooms
Softens the cutoff at Bloom Threshold, so highlights fade in gradually
Estimates the brightness lost in clipped highlights of an 8-bit image, so a large blown-out area blooms brighter than a single bright pixel. Has no effect in a 32-bit project, where the image already carries that brightness. 0 = off.
Aberrations
Moves light in each bokeh disc toward its rim or its core without changing overall brightness. The effect reverses between the near and far side of focus. 0 = off.
Strength of color fringing in the blur. 0 = off.
Which kind of color fringing is used. -100 is fully axial: each color focuses at a different depth. +100 is fully lateral: colors shift apart toward the frame edges. 0 blends both
Depth
How the depth image's values map to distance from the camera.
Connecting real distances picks Camera Distance and sets Far Distance once.
Which channel of a color depth image is read as depth
Clamp out-of-range normalized depth values instead of treating them as invalid
Depth value at the near end of the range. Normalized (White Near) defaults to 1
Depth value at the far end of the range. Normalized (White Near) defaults to 0
Nearest distance in the depth image, in Depth Unit. For Device Z, the camera's near plane
Farthest distance in the depth image, in Depth Unit. For Device Z, the camera's far plane
Unit of the distances in the depth image and of Near and Far Distance. Changing it changes what the numbers mean, not just their label
Distance is this number divided by the depth value, in Depth Unit
Value range the depth buffer was written in
Camera projection the depth buffer was rendered with. Orthographic cannot be combined with an Infinite Far Plane
Which end of the depth buffer is near
Whether the camera had a far plane. Infinite cannot be combined with an Orthographic Projection
Advanced
How large areas with no usable depth are treated.
A depth image with no usable values at all is an error.
What the blur reads past the image border
Usage Tips
Section titled “Usage Tips”- Start in Uniform mode with a preset, then tune Blades and Bokeh Bias while looking at a bright highlight, where the aperture shape reads.
- For a rack-focus shot, connect a 3D Render node’s
depthoutput to the Depth input and click the model with Pick Focus. The encoding and far distance are fitted for you. - An AI-generated or hand-painted depth map is normalized: leave Depth Encoding on Normalized (Black Near) and turn on Clamp Depth if the map has stray out-of-range values.
- On an 8-bit photograph, turn on Bloom and raise Highlight Reconstruction so clipped lamps and speculars bloom as real points of light rather than flat discs.
- Set Overlay Mode in the Diagnostics section to Focus Zones to check that Focus Position and In-Focus Range sit where you meant before judging the blur.