Rendering materials: ParticlesOverLife

ParticlesOverLife is the stock material type for animating colour, scale, and opacity over each particle’s lifetime. Both variants (2-stop and 3-stop) share a single fragment shader; the vertex shader drives a normalised lifetime parameter (vLife = 0 at spawn, 1 at death) through mix() for the 2-stop path and interpolate_3x() for the 3-stop path, then premultiplies the result before the fragment stage.

Stock material instances live in ParticlesAssetPackage/Materials/; the shared material type lives in ParticlesAssetPackage/Material Types/.

2-stop variant

Instance: ParticlesColorOverLife. Linearly interpolates colour, scale, and opacity from spawn to death. The default choice for most effects.

Property

Type

Default

Effect

ParticlesOverLife.ColorStart

Vec4 colour

White (1, 1, 1, 1)

Particle colour at spawn.

ParticlesOverLife.ColorEnd

Vec4 colour

White (1, 1, 1, 1)

Particle colour at death.

ParticlesOverLife.ScaleStart

Vec3

(1, 1, 1)

Size multiplier at spawn.

ParticlesOverLife.ScaleEnd

Vec3

(1, 1, 1)

Size multiplier at death.

ParticlesOverLife.OpacityStart

Float 0–1

1.0

Opacity at spawn.

ParticlesOverLife.OpacityEnd

Float 0–1

1.0

Opacity at death.

Ready-to-use tinted instances ship with the asset package: ParticlesColorOverLife_Green and ParticlesColorOverLife_Red are pre-configured starting points for common colour ramps.

3-stop variant

Instance: ParticlesColorOverLife3Stop. Adds a midpoint for each interpolated channel so that the value can peak, dip, or hold at an intermediate point before the end. Use this when a single linear gradient is not enough — for example, fade in from transparent, hold a mid colour, then fade out.

The 3-stop variant accepts all 2-stop properties plus:

Property

Type

Default

Effect

ParticlesOverLife.ColorMid

Vec4 colour

White (1, 1, 1, 1)

Colour at the midpoint.

ParticlesOverLife.ColorMidPoint

Float 0–1

0.5

Lifetime fraction at which ColorMid is reached.

ParticlesOverLife.ScaleMid

Vec3

(1, 1, 1)

Scale at the midpoint.

ParticlesOverLife.ScaleMidPoint

Float 0–1

0.5

Lifetime fraction at which ScaleMid is reached.

ParticlesOverLife.OpacityMid

Float 0–1

1.0

Opacity at the midpoint.

ParticlesOverLife.OpacityMidPoint

Float 0–1

0.5

Lifetime fraction at which OpacityMid is reached.

Midpoint values are clamped to the open interval (0, 1) to avoid division-by-zero at the segment boundaries.

Renamed and subsumed materials

Note

All stock rendering material names had their 2D suffix removed. If your project references any name in the Old name column below, reassign the material instance to its new name.

Old name

New name

Notes

ParticlesColorOverLife2D

ParticlesColorOverLife

Material type changed to ParticlesOverLife.

ParticlesColorOverLife2D_Green

ParticlesColorOverLife_Green

Renamed.

ParticlesColorOverLife2D_Red

ParticlesColorOverLife_Red

Renamed.

ParticlesColorOverLife3Stop2D

ParticlesColorOverLife3Stop

Now uses the 3-stop ParticlesOverLife type.

ParticlesFireScaleOverLife3Stop2D

(removed)

Replace with ParticlesColorOverLife3Stop; configure the Scale properties as needed.

ParticlesSmoke2D

ParticlesSmoke

Renamed.

ParticlesVelocityColor2D

ParticlesVelocityColor

Renamed.

See also