YFilm LensOptics
Depth of field and lens blur on the GPU: real bokeh from a depth map, iris shapes, highlight control, and blurred foregrounds over a sharp subject.
Plug in a depth pass, drag Select Depth onto your subject and raise the radius. Background and foreground are kept as separate layers, so a blurred foreground drifts over the sharp subject and a background blur never spreads over something nearer, while bright lights bloom into crisp iris shapes at their true position. Without a depth map it gives an even out-of-focus blur.
The controls follow a classic, production-proven layout: Show modes, depth buffer settings, iris, highlight selection and intensity, gamma correction and outside image options. In Nuke it runs as 15 BlinkScript nodes; the After Effects version gives the same picture.
- Depth from depth.Z, a depth input or any channel, read as a depth buffer, 1/z or distance, with invert, curve and auto range.
- Focus: drag Select Depth onto the subject (it can follow a track) or set a focal point, with near and far blur, a sharp zone and a max radius.
- Iris: facets, angle, rounded facets, border brightness and thickness, x-y aspect and smooth, or your own aperture image.
- Highlights: select them by lightness, hue and saturation, then keep their brightness in the blur with highlight intensity, or push clipped lights with additive intensity.
- Show modes for checking the work: iris, highlight selection, depth buffer, info density and focus check (red behind, blue in front, green sharp).
- Outside image: border colour, mirrored, repeated or a colour past the frame edges. Gamma correction for sRGB plates, and four quality levels from Preview to High.
- Nuke: NukeX or Nuke Studio, or a licence that allows BlinkScript. Runs on the GPU when Nuke has one, vectorised on the CPU otherwise.
- After Effects: AE 2022 or later on macOS 11+ (Apple Silicon and Intel). 8, 16 and 32 bpc.
- Speed: Work in Preview quality while setting focus and bokeh, then switch to Normal for renders. Keep max radius close to the largest blur you need.