Skip to content

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

PortTypeDirectionDescription
scalarscalaroutputForce magnitude at comp center (CPU value)
vec2vec2outputForce vector at comp center (CPU value)
scalarFieldscalarFieldoutputMagnitude field (
vectorFieldvectorFieldoutputRadial force field (primary output)

Parameters

ParamTypeDefaultDescription
centervec2(0, 0)Attraction/repulsion origin
strengthscalar1.0Signed peak magnitude. Positive = push (points flee), negative = pull (points attract). Keyframeable
radiusscalar200Distance at which the falloff's t = 1 value applies
falloffTypeenumLinearLinear · InverseDistance · InverseSquare · Custom
falloffcurveRamplinear 1→0Only 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:

PortTypeOverrides
center_invec2center
strength_inscalarstrength
radius_inscalarradius

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:

  • Linear1 - t. Smooth decay from full strength at center to 0 at the edge.
  • InverseDistance1 / (1 + 9t). Gentle decay; approximates real-world 1/r fields.
  • InverseSquare1 / (1 + 99t²). Sharp decay; gravity / light-attenuation character.
  • Custom — uses the falloff CurveRamp 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 scalarField output is useful as a mask: combine via FieldMath Multiply with another field to concentrate an effect around a point.
  • Vortex — tangential swirl; pairs naturally for spiral motion
  • PointAdvect — consumes the vectorField to move points along the force
  • DistanceField — for shape-based (not point-based) distance fields
  • FieldMath — combine radial + vortex + noise forces