Houdini 22.0 Nodes Copernicus nodes

Convolve Filter Copernicus node

Convolves an image with an arbitrary kernel image using an FFT.

On this page
Since 22.0

This node convolves the image on the input against a kernel supplied as a second image on the kernel input. Unlike the fixed 3×3 stencil of the Convolve 3×3 COP, the kernel here is supplied as an image, so its weights can form an arbitrary pattern. This lets you express large or irregular filters such as wide blurs, directional streaks, or a custom bokeh shape.

The convolution is evaluated in frequency space with a Fast Fourier Transform, which makes the cost largely independent of the kernel’s footprint. This makes the node well suited to large-radius operations that would be prohibitively slow as a direct, per-pixel convolution. For example, feed a small bokeh shape into the kernel input to bloom an image’s bright highlights into that shape, producing a stylized depth-of-field look.

Note

Because the transform is cyclic, the kernel wraps around the edges of the image. Turn on Padding to extend the image before transforming and suppress the resulting wrap-around artifacts.

Parameters

Signature

The layer type that this node convolves. The input and kernel images are both interpreted with this type.

See Signatures for more information.

Normalize Kernel

Divides the kernel by the sum of all its values before convolving, so the values total 1. This keeps the operation from brightening or darkening the image. Turn this off when the kernel is already normalized or when you want the kernel’s absolute magnitude to scale the result.

Centered Kernel

Treats the center of the kernel image as its origin, so the convolution does not shift the result. When off, the origin is taken at the corner of the kernel image, which translates the output by half the kernel’s size (the raw behavior of a frequency-space convolution).

Padding

Padding

When on, extends the image with a border of extra pixels before the transform and crops it back afterward; the value sets the fraction of the image size to add on each side. Because the FFT convolution is cyclic, the kernel otherwise wraps from one edge of the image to the opposite edge, and padding pushes those wrap-around artifacts outside the cropped region. Larger values suppress more wrap-around at the cost of a larger transform.

Border

How the padded region added around the image is filled.

See Border types for more information.

Unchanged

Use the filter’s incoming border type.

Constant

Fill the padded region with a constant value of 0. This is probably the option you want to use if the intent is to avoid tiling of the input kernel.

Clamp

Repeat the edge pixels of the image outward.

Mirror

Reflect the image across its edges into the padded region.

Wrap

Tile the image into the padded region.

Inputs

input

The image to convolve.

kernel

The kernel image to convolve the input against.

Outputs

convolution

The convolved image.

See also

Copernicus nodes