You can give particles and nParticles a lifespan to make them disappear from the scene after they reach a specified age. Though you can give a lifespan to particles or nParticles you’ve created with the Particle Tool or nParticle Tool, lifespan is typically used with emitted particles. For example, you can use lifespan to fade out emitted smoke or fire. You can set the lifespan for all the particles or on a per-particle basis.
All particle and nParticle objects have the following attributes:
Setting per-object lifespan assigns the same lifespan to all particles in the particle object. You can make particles live forever or make all particles die at the same age.
To make particles live forever
To make particles die at the same age
The Lifespan value is the number of seconds that the particle object exists after it is created. A particle object you create with the Particle Tool is considered to be created immediately at the beginning of the first frame of the scene. An emitter particle is created when it is emitted. The default value of 1 makes the particle object disappear after one second.
Setting per-particle lifespan assigns different lifespans to each particle in the particle object. You can make particles die at random ages, assign a lifespan to individual particles, or use an expression to control the lifespan.
To make particles die at random ages
The lifespan is uniformly distributed with Lifespan as the mean and Lifespan Random as the width of the distribution.
For example, if Lifespan is 3 and Lifespan Random is 2, then each particle will have a lifespan between 2 and 4.
The random number stream for Random range lifespan mode is maintained inside the particle object and is automatically reseeded when you rewind. You do not have to reseed it yourself.
Normally, you don’t need to change this value. If you want two identical looking particle objects, you can set this value to match the other particle object’s General Seed value.
To control lifespan of individual particles
See Set particle attributes with the Component Editor for more information on using the Component Editor.
To use expressions to control lifespan
Note that you cannot key this attribute or other per particle attributes.
A read-only per-particle attribute called finalLifespanPP stores the final result of lifespan computations no matter what mode you are using. The particle shape uses finalLifespanPP to kill particles and to drive ramps.
You cannot set the value of finalLifespanPP yourself in any way (for example, with an expression, ramp, or component editor). Like age, it is an attribute the particle shape computes for you. But you can read its value (but not assign its value) in an expression.
In Random range mode, lifespans are determined for each particle when it is born, and are stored in finalLifespanPP. If you change Lifespan or Lifespan Random, it affects new particles but does not affect particles that are already born. If you rewind and re-play, all particles are affected.