Skip to content

Nodes · Filter

Erode

Filterv1core

Overview

Shrinks (positive) or grows (negative) a matte, with a hard edge. The choke: pull a key's edge in by a pixel or two. For a soft edge use FilterErode.

How to

How-to

  1. Set the radius: positive shrinks the matte, negative grows it.
  2. The choke: pull a key's edge in by a pixel or two before the comp.
  3. shape is round by default: the edge moves the same distance in every direction, and a fractional radius (1.5, 2.5) moves it by that fraction. box is the flat square: fast, but it squares off round shapes.

The edge stays hard. For a soft edge, use FilterErode, or put a Blur after this.

At the edge of the picture

Past the edge of its input the erode sees the edge pixels carried outward. A matte that fills its frame is still whole after an erode; it does not get a transparent border.

Which erode

You wantUse
a fast square grow or shrinkErode, shape box (positive size shrinks)
a soft falloff chosen by a filterFilterErode
a round edge, then softErode, shape round, then a Blur

An imported script arrives already translated.

Inputs

InputWhat it takes
inthe image this node works on
masklimits the effect to this matte — the engine's universal mask slot, applied for every node that declares it

Outputs

OutputType
outImage

Parameters

ParameterTypeDefaultWhat it does
radiusFloat2.0How far the edge moves, in pixels: positive shrinks, negative grows. Fractions work with the round shape (2.5 moves the edge two and a half pixels); the box rounds up to whole pixels.
shapeChoiceroundround: the edge moves the same distance in every direction, so curves stay curves. box: a flat square - fast, but it turns round shapes boxy and leaves square corners. Scripts saved before round existed keep box. roundbox
disabledBoolfalseBypass: the node passes its first input through untouched (D in the graph). The knobs keep their values for when it comes back.
labelTextA note shown under the node in the graph — what this node is FOR. Never affects the render or the cache.
hide_inputBoolfalseDraw the node without its input wire — a tidy graph for a node whose source is obvious (a Dot, a viewer tap).