Houdini 21.0 Nodes Copernicus nodes

Defocus Copernicus node

Defocuses an input layer.

On this page
Since 21.0

This node defocuses a layer similar to a real camera defocus. The Focus parameters determine the camera specifications to mimic. Any arbitrary shape can drive the shape of the bokeh. This node also lets you perform color correction on the image’s out of focus areas.

Tip

When rendering with Karma, you can output a depth map AOV and use it with this node.

Parameters

Signature

The layer type that the source accepts.

See Signatures for more information.

Mask

The amount of the new value to mix in with the original value. Higher values mix in more of the new value. Lower values mix in less of the new value.

The default value is 1, which means this node uses only the new value. See Mask for more information.

Focus

Focal Length

The focal length (zoom) of the camera.

Focus Distance

The distance from the camera at which objects are in focus. Objects outside of this distance are blurred.

Tip

Enter the viewer state and click on the area of the layer you'd like to be in focus.

F-Stop

The F-Stop of the camera. The f-stop determines the blurriness of the defocus.

Focus Plane Blur

The amount to blur the focus mask to smooth the transition between in and out of focus.

Note

The focus mask is a mono layer that determines what areas of the image are in or out of focus.

Focus Ramp

Remaps the focus mask.

See Ramp parameters for more information.

Bokeh

Radius

The maximum radius (in pixels) of the bokeh effect for out of focus areas. This can be expensive for a large radius since a lot of scattering is done.

Gain

The aperture mask is normalized so the bokeh doesn’t change the total brightness, but it can be useful to boost the result to gain or lose total luminance.

Resolution

The resolution to resample the aperture layer to, which speeds up filtering of the aperture layer.

Resample Input

The amount to resample the input layer before computing the bokeh layer. This speeds up computing at the slight cost of quality.

Color Correct

Color Correct

Applies color correction on the image’s out of focus areas.

Brightness threshold

The threshold that a pixel’s luminance value must be above for the pixel to brighten.

Brightness Blur

The amount to blur the brightness mask, which smooths the transition between pixels in and out of the threshold.

Brightness

The amount to brighten the pixels within the Brightness threshold.

Saturation Threshold

The threshold that a pixel’s luminance value must be above for the pixel to desaturate.

Saturation Blur

The amount to blur the saturation mask, which smooths the transition between pixels in and out of the threshold.

Saturation Scale

The amount to desaturate the pixels within the Saturation Threshold. Bright pixels tend to be slightly desaturated.

Gamma

The gamma of the out of focus areas.

Depth Blend

Depth Blend

Applies depth to blend the original layer with the out of focus layer.

Min

The amount to remap the minimum depth of the mask that blends the original layer with the out of focus layer.

Max

The amount to remap the maximum depth of the mask that blends the original layer with the out of focus layer.

Inputs

source

The source layer to defocus.

depth

A depth map that determines how far away from the camera the objects are. The values should be in meters.

bokeh

An optional mono mask that provides the shape to spread pixels into. For example, a white star causes the bokeh to appear star-like. If not provided, a circular bokeh is used.

mask

An optional per-pixel mask amount that’s scaled by the Mask parameter.

Outputs

defocus

The source layer with the defocus applied.

focusmask

The mask used to blend between the original layer and the out of focus layer. This is useful when you want to run your own postprocess based on the depth map.

See also

Copernicus nodes