Radial Force
Attraction / repulsion vector field — points flow toward or away from a center. The "gravity / magnet" primitive for physics-like motion without the full Physics roadmap.
Category: Fields Menu path: Fields > Radial Force
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
scalar | scalar | output | Force magnitude at comp center (CPU value) |
vec2 | vec2 | output | Force vector at comp center (CPU value) |
scalarField | scalarField | output | Magnitude field ( |
vectorField | vectorField | output | Radial force field (primary output) |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
center | vec2 | (0, 0) | Attraction/repulsion origin |
strength | scalar | 1.0 | Signed peak magnitude. Positive = push (points flee), negative = pull (points attract). Keyframeable |
radius | scalar | 200 | Distance at which the falloff's t = 1 value applies |
falloffType | enum | Linear | Linear · InverseDistance · InverseSquare · Custom |
falloff | curveRamp | linear 1→0 | Only active when falloffType = Custom. Maps normalized distance to a 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, Radial Force computes the unit radial direction (sample minus center, normalized) and multiplies by a signed magnitude sign(strength) × |strength| × falloff(t), where t = clamp(distance / radius, 0, 1).
Built-in falloff functions:
- Linear —
1 - t. Smooth decay from full strength at center to 0 at the edge. - InverseDistance —
1 / (1 + 9t). Gentle decay; approximates real-world 1/r fields. - InverseSquare —
1 / (1 + 99t²). Sharp decay; gravity / light-attenuation character. - Custom — uses the
falloffCurveRamp directly.
At the exact center, the direction is undefined so the vector is zero; the magnitude field peaks there.
Usage Examples
Basic: Attractor
Grid → PointAdvect ← RadialForce.vectorField → DrawPoints → Output. Set strength to a negative value — points get pulled toward the center.
Basic: Scatterer
Same graph with positive strength — points flee outward.
Creative: Spiral in
Combine with a Vortex at the same center via FieldMath Add on the two vectorField outputs. Points spiral inward (pull + tangential flow).
Creative: Anti-gravity ring
Use falloffType = Custom and draw a CurveRamp that's 0 at the center, spikes around 0.5, then drops to 0. Points caught in a narrow annular band get pushed outward, leaving a calm eye.
Tips
- Signed strength avoids needing two nodes or a separate "direction" toggle — just negate to switch push/pull.
- InverseSquare gives a much steeper falloff than InverseDistance — if your effect concentrates too tightly at the center, drop to InverseDistance or Linear.
- The
scalarFieldoutput is useful as a mask: combine viaFieldMath Multiplywith another field to concentrate an effect around a point.
Related Nodes
- Vortex — tangential swirl; pairs naturally for spiral motion
- PointAdvect — consumes the
vectorFieldto move points along the force - DistanceField — for shape-based (not point-based) distance fields
- FieldMath — combine radial + vortex + noise forces