Skip to content

Defocus

Brief Description

Applies a defocus effect to the image. The blur strength is dependent on the depth at each pixel, based on a provided Depth-Map. This allows you to simulate defocusing effects of a lens and create effects like a bokeh (blooming of highlights when defocused). Set the Shape Preset to custom to provide a Custom Shape for the bokeh.

Controls

Parameter / Script Name Type Default Function
Enabled / enabled Boolean On
Red / process_red Boolean On Enable the red channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0
Green / process_green Boolean On Enable the green channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0
Blue / process_blue Boolean On Enable the blue channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0
Alpha / process_alpha Boolean On Enable the alpha channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0
Defocus / radius Float 10 A gamma-shaped curve applied to the defocus ramp to make the transition between blurred and non blurred area more or less prominent
Focus Point Mode / focus_point_mode Choice Point Determine how the focal plane depth is specified: When using Point, the depth at the selected point is used as focus depth, otherwise the specified Depth Value is used directly
- Point
- Depth Value
Focus Point / focus_point Float 2D 0, 0
Focus Depth / focus_point_depth Float 0
Focus Range Mode / focus_out_point_mode Choice Depth Range Determine how the focal plane range is specified: When using Point, the depth at the selected point is used to specify regionsthat will receive maximum blur, otherwise the specified Depth Range is used directly as an offset to the Focus Point depth
- Point
- Depth Range
Out of Focus Point / focus_out_point Float 2D 0, 0
Focus Plane Range / focus_out_point_depth Float 1
Defocus Ramp Gamma / defocus_ramp_gamma Float 1
Shape Preset / shapePreset Choice Hexagon The type of Shape to use for the lens
- Triangle
- Square
- Pentagon
- Hexagon
- Octogon
- Circle
- Custom
Custom Shape / customShape Image -
Depth-map / zmap Image -
Depth-map Supersampling / depth_map_supersampling Choice x1 Higher means more quality and antialiasing of the depth-map but slower to render
- x1
- x2
- x4
- x8
- x16
Depth-map Blur / zmap_blur Float 0 Size of the blur applied on the depth map. Increasing this value will smooth the depth and thus make the transition between blurred and non blurred areas smoother
Samples / samples Float 350 Number of iterations used by the algorithm to calculate the lens blur. The higher the number, the higher the quality, to the cost of a higher render time
Aspect Ratio / shape_aspect_ratio Float 1 A multiplier on the width of the lens to simulate a anamorphic lens
Shape Rotation / iris_rotation Float 0 The rotation of the lens
Highlights Boost / highlights_contrast Float 0 Increase the highlights contrast
Highlights Threshold Low / highlights_thr_low Float 0
Highlights Threshold High / highlights_thr_high Float 1
Defocus Level of Detail / max_defocus_lod Float 0 The level of detail of the image that is used to blur the image. The higher the value, the faster the render but with a lower quality
Shape Edge Bias / shape_edge_bias Float 0.5 When closer to 1, the edge of the bokeh shape stands out of the middle of the shape
Shape Edge Gamma / shape_edge_gamma Float 4 Apply a gamma curve to the edge ramp to control the size of the edge
Shape Edge Gain / shape_edge_gain Float 1 Multiply the edge strength to make it stand out even more
Chromatic Abberation / bokeh_fringe Float 0 Strength of the chromatic abberation effect