Convolve
Convolve images and audio with a supplied filter image or impulse response.
What it does
Convolve slides a kernel across an image, or an impulse response across an audio signal, blending every sample with its neighbours by that kernel's weights. On images this builds custom blurs, sharpens, edge detectors and bokeh shapes from a small weight pattern rather than a fixed built-in filter. On audio the same maths is convolution reverb: an impulse response applies that space's colour to the signal.
Mode is chosen from what is wired in. An image or Colour Field on Image In runs the 2D image path; a Number Array or Signal runs the 1D audio path. Mix crossfades between the untouched input and the fully convolved result in both paths, and Mode switches between standard convolution and cross-correlation.
When to use it
A custom filter kernel, sharpen, edge-detect, emboss or bokeh shape, that the built-in Blur and Sharpen nodes do not cover.
Convolution reverb: an impulse response into Kernel In, audio into Image In.
Dialling a filter in gradually rather than all-or-nothing, using Mix instead of bypassing the node.
Cross-correlation for template matching or conjugate-kernel behaviour: set Mode to Correlate.
| Parameter | Type | Default |
|---|---|---|
image_in | OneOf([FieldOf(Raster), NumberArray, Signal]) | — |
kernel_in | OneOf([FieldOf(Raster), NumberArray, Signal]) | — |
mode | String | "Convolve" |
mix | Number | 0.500 |
normalize_kernel | Boolean | true |
strength | Number | 1 |
Gotchas
Audio convolution is block-streamed, so a live per-frame signal works as input. There is no need to pre-render the whole clip.
For audio, wire the impulse response's buffer output into Kernel In, not waveform. Waveform is a single frame and does not carry the full impulse response.
Normalize Kernel is on by default so brightness is preserved, matching how Nuke, After Effects and GIMP handle custom convolution kernels. Turn it off for edge-detection kernels that sum to zero: with normalisation on, a zero-sum kernel is divided down to almost nothing.
Worked example
Add a Convolve node and wire an image into Image In.
Wire a small kernel image, or another Convolve-friendly source, into Kernel In. This is the weight pattern applied to every pixel.
Leave Normalize Kernel on for a brightness-preserving blur or sharpen, or switch it off for a sum-to-zero edge-detect kernel.
Bring Mix down from 1 toward 0 to blend back toward the original image.
See also
Blur · Sharpen · FFT · Rasters (images)