Skip to content

Nodes · Filter

Defocus

Filterv2core

Overview

Depth-driven thin-lens defocus with a real aperture: disc or bladed, rotatable, anamorphic by aspect, and catadioptric for a mirror lens's ring bokeh.

How to

  1. Wire a depth pass, or set the focal plane by hand.
  2. Choose bokeh and, for bladed, the blade count and rotation.
  3. Use aspect for anamorphic ovals; catadioptric for the doughnut.

Inputs

InputWhat it takes
inthe image this node works on
masklimits the effect to this matte — the engine's universal mask slot, applied for every node that declares it

Outputs

OutputType
outImage

Parameters

ParameterTypeDefaultWhat it does
channelsChoiceallWhich channels the disc is applied to; everything else passes straight through. allrgbargbalphanone
defocusFloat1.0The radius of the disc, in pixels. 0 leaves the image untouched; 10 is a soft portrait background; 40 melts everything.
ratioFloat1.0The disc's aspect: width over height. 1 is round; 2 is an oval twice as wide as it is tall (an anamorphic look); below 1 is tall.
scaleFloat1.0Scales the disc on both axes at once — a single dial over defocus for animating the whole effect up and down.
qualityInt20How finely the disc's rim rows are area-sampled (sub-rows per pixel). 20 is exact to the eye; lower is a little faster on huge discs.
methodChoiceacceleratedaccelerated: the disc as a stack of row spans on prefix sums — exact to the pixel's coverage and O(radius) per pixel, so a 100 px disc costs about what a 10 px one does. fullprecision: the same arithmetic here (both are exact); the choice is kept so a Nuke script reads across. acceleratedfullprecision
mixFloat1.0Blend between the original (0) and the defocused image (1).
disabledBoolfalseBypass: the node passes its first input through untouched (D in the graph). The knobs keep their values for when it comes back.
labelTextA note shown under the node in the graph — what this node is FOR. Never affects the render or the cache.
hide_inputBoolfalseDraw the node without its input wire — a tidy graph for a node whose source is obvious (a Dot, a viewer tap).