Vortex
Rotational vector field — tangential flow around a center, strength decays over a falloff curve. The "swirl / whirlpool / galaxy" primitive.
Category: Fields Menu path: Fields > Vortex
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
scalar | scalar | output | Magnitude at comp center (CPU value) |
vec2 | vec2 | output | Flow vector at comp center (CPU value) |
scalarField | scalarField | output | Magnitude field — how fast the flow is at each sample |
vectorField | vectorField | output | Tangential flow field — direction + magnitude at each sample (primary output) |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
center | vec2 | (0, 0) | The eye of the swirl, in comp-space pixels |
strength | scalar | 1.0 | Peak flow magnitude at the center. Animate to ramp the swirl up/down |
radius | scalar | 200 | Distance at which the falloff curve's t = 1 value applies |
direction | enum | CCW | CCW (counter-clockwise) or CW (clockwise) |
falloff | curveRamp | linear 1→0 smooth | Maps normalized distance (0 at center, 1 at radius) to a strength multiplier |
Expose Channels
When enabled (E button on node header), adds input ports that override params via edge connections:
| Port | Type | Overrides |
|---|---|---|
center_in | vec2 | center |
strength_in | scalar | strength |
radius_in | scalar | radius |
How It Works
At each sample point, Vortex computes the tangent to the circle that passes through the sample, centered at center. Magnitude is strength × falloff(clamp(distance / radius, 0, 1)). The default falloff curve (1 → 0 smooth) gives a soft vortex that's strongest at the center and dies off at the edge of the radius; a flat curve at 1.0 gives a uniform tangential flow across the radius.
direction just flips the sign of the tangent — CCW advances points counter-clockwise around the center, CW clockwise (screen-space, where +y is down).
At the exact center, the tangent direction is undefined so the vector is zero; the magnitude field peaks here.
Usage Examples
Basic: Particle swirl
Grid → PointAdvect ← Vortex.vectorField → DrawPoints → Output. Points spiral around the vortex center. Raise strength for faster flow, animate strength keyframes to ramp the swirl in/out.
Creative: Galaxy
Boost radius to cover the whole comp. Stack two Vortex nodes at different centers (one CW, one CCW) via FieldMath Add and feed into PointAdvect for an interacting binary system.
Creative: Customised falloff
Edit the falloff curve to control the flow profile: a bell-shaped curve (0 at center, 1 in the middle, 0 at edge) gives a ring of fast flow around a calm eye — hurricane shape.
Tips
- Combine with
PointAttributes target=Rotation source=Tangentin a chain afterPointAdvectto orient cloned instances along the flow. - For "magnet + swirl" effects, add a Vortex's
vectorFieldto a Radial Force field viaFieldMath Add. - The
scalar/vec2CPU outputs sample at (0, 0) — useful for driving other node params with a representative value.
Related Nodes
- PointAdvect — consumes Vortex's
vectorFieldto move points along the flow - Oscillate — waves instead of swirls; shares the spatial-field pattern
- Noise —
Curlmode gives turbulent rotational flow; Vortex is the clean closed-form version - FieldMath — combine multiple Vortex fields, or mix with other vector fields