Overview
sExpand geometrically changes the outline of a shape - it pushes it outward (dilate) or inward (erode) evenly along the whole perimeter. It does not move the center point, only the boundaries of the shape.
It works on simple shapes (sRectangle, sEllipse, sStar, sNGon) as well as on compound shapes (coming from sBoolean or sMerge).
Where to find this node
- Effects Library:
Tools > Shape > sExpand - Quick add: right-click in the Node Editor →
Add Tool > Shape > sExpand
sExpand vs Erode Dilate 2D
- Erode Dilate (2D)
- Works on bitmaps. After rasterization. Erodes / dilates pixel by pixel. For keyed mattes, alpha repair.
- sExpand
- Works on the vector path. Before sRender. Changes the curves geometrically. Sharp at any scale, more mathematically precise.
Rule: a shape that is still vector → sExpand. A bitmap matte or key cleanup → Erode Dilate.
Inputs
- Input1 (required) - the output of another shape node. The shape to expand/contract.
Setup
Growing a shape:
sRectangle → sExpand (Amount 0.01) → sRender
(the rectangle grows by 1% of the height)
Creating an offset border:
sRectangle → sExpand (Amount 0.005) → sBoolean Subtract ← original sRectangle
↓
sRender
(result: an outer ring around the rectangle)
Inset for a logo:
Compound Shape → sExpand (Amount -0.008) → sRender
(a smaller version of the shape inside it)Controls tab
- Amount
- Dilation / erosion value in normalized coordinates. Positive = the shape grows outward. Negative = the shape shrinks inward. Typical values: 0.001-0.02.
- Border Style
- How the corners behave during dilation:
- Bevel: beveled corners.
- Round: rounded corners (the classic).
- Miter / Miter Clip: sharp corners extended up to a threshold (Miter Limit).
- Miter Limit
- For Miter Clip: beyond this value, sharp corners are cut off to avoid endless extensions.
Use cases
- Creating an offset outline - shape + sExpand (positive Amount) + sBoolean Subtract of the original shape = a ring / outline offset outward. An alternative to sOutline for some effects.
- Insetting a logo - a smaller version of the logo inside it. A classic for stacked shapes (a smaller second layer).
- Safety margin - shape + positive sExpand to leave a margin around it (useful so it does not touch the edges of a composite).
- "Breathing" animation - Amount animated from 0 to 0.005 and back = the shape pulses like a breath. A lively effect.
- Offset double layer - the source shape + positive sExpand + a different color, behind the original shape = a stylized relief / drop shadow effect.
- Compensating for Border Width - adding a thick border makes the shape bigger. A negative sExpand before it = visual compensation to keep the original size.
- Cleanup on a compound shape - after a complex sBoolean with small artifacts, an sExpand of -0.001 + 0.001 = a vector "closing" operation that smooths it out.
Tips
- A small Amount by default - 0.001-0.005 is enough for subtle effects. Beyond 0.05, the deformation becomes very visible (it can break complex shapes).
- Border Style Round = clean - rounded corners avoid odd artifacts when expanding a shape with sharp corners.
- Miter Clip with a reasonable Limit - a classic Miter can create overly long spikes on a thin shape. Miter Clip with a threshold avoids the problem.
- Negative expansion: watch the fine details - a negative Amount that is too large makes the narrow areas of the shape disappear (star points, thin branches). Keep it in check.
- Stack two sExpand nodes for special effects: -0.003 (shrink) then +0.005 (grow) ≠ +0.002. The corners are handled differently on each pass.
- Single outline workflow: shape → positive sExpand → sBoolean Subtract with the original shape = a perfect ring with a controlled thickness (finer than with sOutline in some cases).
- For anisotropic expansions (more horizontal than vertical), sExpand alone is not enough - use a non-uniform sTransform scale before or after it.
