Skip to content

Shape Deform

Displaces shape vertices procedurally using a vector/scalar field or a uniform value. Preserves topology -- only vertex positions change.

Category: Shape Ops Menu path: Shape Ops > ShapeDeform

Ports

PortTypeDirectionDescription
shape_inshapeinputShape to deform
field_invectorFieldinputSpatially varying displacement field (also accepts scalarField)
value_invec2inputUniform displacement vector (also accepts scalar)
amplitude_inscalarinputOverride for amplitude param
outshapeoutputDeformed shape

Parameters

ParamTypeDefaultDescription
modeenumNormalDisplacement direction: Normal, Tangent, XY, X, or Y
amplitudescalar50Displacement magnitude in pixels
sourceenumFieldSignal source: Field or Value

How It Works

ShapeDeform visits every vertex in the input shape and displaces it based on the selected mode and signal source:

  • Field source: The field_in port provides a spatially varying signal. Each vertex samples the field at its position using eval_bipolar() (range [-1, 1]). A scalarField connected to field_in is also accepted.
  • Value source: The value_in port provides a uniform displacement applied equally to all vertices.

The amplitude parameter scales the displacement. The mode determines the direction:

  • Normal -- displace along the vertex normal (perpendicular to the path)
  • Tangent -- displace along the path tangent (parallel to the path)
  • XY -- displace in both X and Y independently
  • X / Y -- displace along a single axis only

Only vertex positions are modified; path topology, point IDs, and attributes are preserved. This means downstream nodes like DrawShape see the same structure but different vertex locations.

ShapeDeform runs in the value pre-pass (before GPU evaluation) so that downstream nodes like Transform2D and DrawShape use accurate deformed bounds for overscan computation.

Usage Examples

Basic: Wavy edges

Rectangle -> ShapeDeform (mode: Normal, field: Noise.scalarField) -> T2D -> DrawShape -> Output. The rectangle's edges ripple based on the noise field. Animate Noise evolution for flowing deformation.

Organic shapes

Circle -> ResampleShape (count: 64) -> ShapeDeform (mode: Normal, field: Noise.vectorField, amplitude: 30) -> DrawShape. Resample first to add enough vertices for smooth deformation, then displace along normals for blob-like organic shapes.

Uniform shift

Rectangle -> ShapeDeform (source: Value, mode: XY, value_in: MakeVector) -> DrawShape. Use a MakeVector node to create a displacement offset, applying the same shift to all vertices.

Tips

  • Resample your shape upstream (ResampleShape) if it doesn't have enough vertices for smooth deformation -- a Rectangle with only 4 corners will deform coarsely
  • Noise with Curl type produces smooth, divergence-free deformation that avoids self-intersection
  • ShapeDeform is terminal in content bounds computation -- it reads the pre-pass AABB rather than passing through, because deformation changes the shape's bounding box
  • Amplitude is animatable -- keyframe it for deformation that grows or shrinks over time
  • ResampleShape -- add more vertices before deforming for smoother results
  • Noise -- primary field source for procedural deformation
  • DistanceField -- SDF field source for distance-based deformation
  • Transform2D -- rigid spatial transform (no deformation)
  • DrawShape -- rasterize the deformed shape