Guides VFX & Particles Particles Curves, Gradients, And Ranges

VFX & Particles Particles 4 min read Updated Aug 2026

Curves, Gradients, And Ranges

Particle effects look alive when particles vary. Lenga uses shared value types so the same ideas work across lifetime, speed, size, rotation, emission, force, velocity, and color.

Scalar Values

A scalar value is a single numeric value. Particle modules use scalar values for fields such as lifetime, speed, size, emission rate, angular velocity, and texture-sheet frame.

Scalar modes:

  • Constant
  • RandomBetweenConstants
  • Curve
  • RandomBetweenCurves

In the Inspector, fields that support these modes have a small dropdown at the right edge of the value field. Use it to switch the field between a single value, a curve, a random range, or a random range between two curves.

Main particle fields such as Start Delay, Start Lifetime, Start Speed, Start Size, Start Rotation, and Gravity Modifier use this shared scalar editor. Flip Rotation is simpler: it is a 0 to 1 probability for whether a new particle uses the opposite rotation direction. Emission fields such as Rate over Time, Rate over Distance, and burst Count use the same value model.

Constant

Use a constant when every particle should use the same value.

Examples:

  • all particles live 0.5 seconds
  • all particles start with size 12
  • emission rate is always 30 particles per second

Constants are predictable and easy to tune. Start with constants before adding variation.

Random Between Constants

Use random constants when particles need simple variety.

Examples:

  • lifetime between 0.4 and 0.8
  • start speed between 40 and 90
  • start size between 6 and 12

This mode is good for sparks, dust, leaves, rain, snow, and debris. It keeps the effect from looking mechanical without needing a full curve.

Curve

A curve changes a value over normalized particle lifetime.

Normalized time runs from 0 at birth to 1 at death. A size curve with value 1 at time 0 and value 0 at time 1 makes particles shrink to nothing.

Common curves:

  • size starts at 1, ends at 0: shrinking sparks
  • size starts at 0.5, ends at 1.8: expanding smoke
  • frame starts at 0, ends at the last sprite-sheet frame: flipbook animation
  • speed multiplier starts high, ends low: particles slow down as they age

Curves should be simple unless the effect needs a very specific shape. Too many keys can make a system harder to tune.

Random Between Curves

Use random curves when every particle should follow a different lifetime pattern.

This is useful for organic effects:

  • smoke puffs expanding at different rates
  • embers shrinking unevenly
  • magic motes pulsing with variation

Use this mode sparingly. It is powerful, but hard to reason about if every module uses it at once.

Gradients

A gradient changes color over normalized lifetime. Gradients include color and alpha.

Common gradient patterns:

  • bright opaque start, transparent end
  • white to yellow to orange to transparent
  • dark gray to light gray to transparent
  • saturated blue to pale cyan to transparent

Alpha is often more important than hue. A particle that never fades can make an effect look noisy or stuck on screen.

Start Color uses the same authoring idea for color values:

  • a constant color
  • a gradient
  • a random color between two colors
  • a random color between two gradients
  • a random color sampled from a gradient palette

Use a constant start color for simple effects. Use a random range when sparks, embers, dust, or muzzle flashes need color variation at spawn. Use gradients when the spawn color itself should be sampled from a color ramp.

Vector Values

Some modules use vector values. A vector value is usually made from scalar values per axis.

Examples:

  • force over lifetime: x/y/z acceleration
  • velocity over lifetime: x/y/z drift
  • shape offsets and box sizes

For 2D systems, z values are usually constrained or ignored by the renderer. For 3D systems, all axes can matter.

Deterministic Randomness

Particle systems can use deterministic seeds. This matters when:

  • editor preview should be repeatable
  • an effect should look the same every time a scene starts
  • tests need stable particle output
  • recorded gameplay needs stable visual timing

Use autoRandomSeed when variety matters more than repeatability. Use a fixed randomSeed when repeatability matters.

Tuning Order

When building a new effect, tune in this order:

  1. Constants for lifetime, speed, size, and color.
  2. Shape and emission.
  3. Size and alpha over lifetime.
  4. Simple randomness for lifetime, speed, and size.
  5. Curves or gradients for polish.
  6. Noise, velocity, and force only after the base effect reads correctly.

This order keeps the effect understandable while you work. It also makes performance problems easier to isolate.