Skip to content

Matte

Processes one or more matte inputs to cut out regions of a source image, with per-input channel selection, combine modes, and feathering. Also used for cross-layer track mattes.

Category: Composite Menu path: Composite > Matte

Ports

PortTypeDirectionDescription
sourceimageRgba16finputSource image to be matted
matte1imageRgba16finputFirst matte input
outimageRgba16foutputSource with matte applied
matte_outimageRgba16foutputGrayscale matte mask (for inspection or downstream use)

Additional matte inputs (matte2, matte3, ...) can be added dynamically using the "+" button on the node header.

Parameters

Per-Matte Parameters

Each matte input has its own channel and invert controls. For the first matte:

ParamTypeDefaultDescription
channel1enumAlphaWhich channel to extract from the matte image. Options: Alpha, Luminance, Red, Green, Blue.
invert1booleanfalseInvert this matte input.

Additional mattes get numbered params (channel2, invert2, channel3, invert3, etc.).

Global Parameters

ParamTypeDefaultDescription
combineModeenumUnionHow to combine multiple matte inputs. Options: Union, Subtract, Intersect, Replace.
featherscalar0Gaussian blur radius applied to the combined matte mask, in pixels. Softens hard matte edges. Keyframeable.

How It Works

The Matte node uses a multi-pass GPU pipeline:

  1. Extract -- Each connected matte input is processed individually. The selected channel is extracted and optionally inverted to produce a single-channel mask per input.
  2. Combine -- When multiple mattes are connected, they are combined using the selected mode:
    • Union -- maximum of all masks (additive coverage)
    • Subtract -- first mask minus subsequent masks
    • Intersect -- minimum of all masks (only where all overlap)
    • Replace -- last connected mask wins
  3. Feather -- If feather > 0, a gaussian blur is applied to the combined mask to soften edges.
  4. Apply -- The final mask is multiplied against the source image's alpha channel.

The matte_out port exposes the final combined (and feathered) mask as a grayscale image, useful for debugging or feeding into other nodes.

When no mattes are connected, the source passes through unchanged.

Cross-Layer Track Mattes

Track mattes can also be set at the layer level (outside the node graph) using the matte controls in the timeline layer list. Setting a layer's matteLayerId uses another layer's output as a matte source with Alpha or Luminance mode. The matte source layer is automatically hidden from the final composite. This uses the same apply_matte_v2 pipeline internally.

Usage Examples

Basic: Cut out with alpha

  1. Add a Matte node and connect your main image to source
  2. Connect a shape render (DrawShape) or image with alpha to matte1
  3. Leave channel on Alpha -- the shape's alpha cuts out the source

Creative: Luminance matte from footage

  1. Connect a high-contrast image to matte1
  2. Set channel to Luminance
  3. Bright areas of the matte image reveal the source, dark areas hide it
  4. Use feather to soften the transition

Advanced: Multi-matte compositing

  1. Click "+" to add a second matte input
  2. Connect different mask shapes to matte1 and matte2
  3. Set combine mode to Intersect to only show the source where both masks overlap
  4. Or use Subtract to punch one mask out of another
  5. Inspect the result via the matte_out port

Tips

  • The "+" button adds new matte inputs dynamically. The "-" button removes the last one. Each new input gets its own channel and invert controls.
  • feather is a gaussian blur on the matte mask -- useful for softening hard edges from shape-based masks
  • The matte_out port is always available and shows the combined mask. Connect it to a viewer or Debug node to see what the matte looks like.
  • When the source input is disconnected, no output is produced. The bypass passthrough port is source.
  • For simple single-layer matting, cross-layer track mattes in the timeline are often easier than the Matte node.
  • Mix -- blend between two images using a mask (softer transitions)
  • Merge -- layer compositing with blend modes
  • ColorSplit -- extract a specific channel as a standalone grayscale image
  • Blur -- alternative to feather for more control over edge softening

Caddis — professional motion design.