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 |
ParticlesOverLife.ScaleMid |
Vec3 |
(1, 1, 1) |
Scale at the midpoint. |
ParticlesOverLife.ScaleMidPoint |
Float 0–1 |
0.5 |
Lifetime fraction at which |
ParticlesOverLife.OpacityMid |
Float 0–1 |
1.0 |
Opacity at the midpoint. |
ParticlesOverLife.OpacityMidPoint |
Float 0–1 |
0.5 |
Lifetime fraction at which |
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 |
|---|---|---|
|
|
Material type changed to |
|
|
Renamed. |
|
|
Renamed. |
|
|
Now uses the 3-stop |
|
(removed) |
Replace with |
|
|
Renamed. |
|
|
Renamed. |
See also¶
Particle editor reference § Particle rendering properties and particle-rendering materials tables.