Skip to content

Shape Exploder

Pull a single piece (a fill region) out of a multi-path Shape. Used to surgically extract one element of a multi-piece shape so it can be transformed, restyled, or animated independently.

Category: Shape Ops Menu path: Shape Ops > Shape Exploder

Ports

PortTypeDirectionDescription
shape_inshapeinputMulti-path Shape to extract from
outshapeoutputA new Shape containing only the selected piece

Parameters

ParamTypeDefaultDescription
indexscalar0Which piece to extract (0-based). Out-of-range yields an empty shape.

How It Works

The "natural unit of a piece" is the glyph_index attribute (Caddis's per-path identifier for a fill region — used by both TextToShape for glyph contours and VectorSource for SVG path elements). Sub-paths sharing the same glyph_index value form one piece (the outer + inner contours of a letter O, the multi-sub-path geometry of a single SVG <path>, etc.). When no glyph_index attributes exist, ShapeExploder falls back to "the Nth raw path."

PointIds are remapped onto a fresh sequence so the output is a clean self-contained shape — downstream nodes (EditableShape, ShapeAttributes, etc.) won't see leftover IDs from siblings.

Usage Examples

Extract one letter from a wordmark

Text("Hello") → TextToShape → ShapeExploder(index=0) → DrawShape. Only H renders. Wire 5 ShapeExploders + a MergeShapes (or use VectorSource's "Explode Geometry" / "Explode Render" actions for a one-click chain) to get all 5 letters as separate animatable pieces.

Tweak one path of an imported SVG

VectorSource → ShapeExploder(index=2) → EditableShape (Edit mode) → DrawShape. Drag vertices on just the third path of the SVG; the rest of the SVG is unaffected.

Use VectorSource → Explode Geometry (right-click button) to one-click split a logo into N pieces wired through MergeShapes back into a single DrawShape. Insert a Transform2D between any ShapeExploder and the merge to animate that piece's position/rotation/scale independently.

Tips

  • Index out of range emits an empty shape silently — useful for "fade in piece 1, then 2, then 3" by keyframing index across an integer ramp (use Step interpolation).
  • Per-path attributes (color, strokeColor, name) are preserved on the extracted piece, so a piece extracted from a colored SVG retains its fill.
  • Keyframe index to flip through pieces over time — Step interpolation works best (Linear would output partial pieces during transitions).
  • For "all N pieces as separate shapes," use the Explode Geometry / Explode Render actions on the upstream node (VectorSource Properties panel) — they auto-build the chain.
  • VectorSource — multi-path Shape source whose pieces map to SVG <path> elements.
  • TextToShape — emits glyphs sharing glyph_index per character.
  • MergeShapes — re-combines exploded pieces into a single Shape.
  • EditableShape — wire a single piece into Edit mode for vertex-level tweaks.