ICE Particle Age

 
 
 

A particle's age is defined in time by the number of seconds it lives from when it's emitted (born).

By default, a particle lives for the entire length of the simulation. It's useful to have particles always available as you're tweaking their parameters when setting up effects. As well, you may want the particles to remain in the scene for creating effects that require static clouds of particles, such as with stars, clouds, or fog.

There comes a time, however, when a particle's life must end. For most effects, you need the particles to disappear at some point, and to do this you need to set the particle's age limit, then delete them based on that age limit.

NoteWhen particles are born, they're not all born at exactly the same time within a frame, meaning that particles all have a different birth time. This means that when you're using the particle's age or age percentage, you won't get banding or clumping effects because each particle's birth time is staggered within the frame.

Here, the particles change color based on a percentage of their age.

Particle Age Attributes

There are two particle attributes that are used to define particle age: Age and AgeLimit. These attributes are used in several compounds that are described in this section, but you can also use them on their own in an ICE tree by specifying them in the Get Data and Set Data nodes, as described in Using ICE Particle Attributes.

For more information on attributes in general and a list of all available ICE attributes, see ICE Attributes.

Setting the Particle's Age Limit

If you want to limit the amount of time that a particle live, you need to use the Set Particle Age Limit compound. In this compound, you can set the Age Limit to control the maximum length of time (in seconds) that the particle exists after it is emitted.

Some compounds just require an age limit on particles so that they can calculate values properly. For example:

  • Any node or compound that uses a percentage of the particle age needs to have the age limit value set so that the percentage of the particle's life can be calculated. For example, if you want to use the Modify Particle Value by Age % compound to change particle values, you need to set an age limit. See Modifying ICE Particle Values for more information.

  • If you're using the particle State system, you can use the particle's age as a trigger to cause a certain effect to happen, so you need to set an age limit. For example, when the particle reaches its age limit, a new set of particles is emitted from it, such as for fireworks. See ICE Particle States for information on using states.

  • If you're using the Particle Gradient shader to define the particle's color using a gradient, you need to set the age limit so use a particle's age percentage as an attribute for determining how to set the color gradient. See Particle Gradient Shader for information.

NoteEven though you can set the particle age limit here, you must use the Delete Particles at Age Limit compound to actually eliminate the particles — see the next section, Deleting Particles upon Reaching Their Age Limit.

To set the particle's age limit:

  1. Create a particle emission — see Creating a Basic Particle Emission.

  2. Choose the Particles On Emission Set Particle Age Limit command from the ICE toolbar.

    This command adds the Set Particle Age Limit compound to the ICE tree, plugging it into the Execute on Emit port of the Emit compound.

    In the example below, the Modify Particle Size and Modify Particle Color compounds are also plugged in. Both of these compounds can use the Age %, as determined by the age limit, to define how the particle size and color change over the particle's life span.

  3. In the Set Particle Age Limit property editor, set the particle age limit value, which is in seconds from the time it's emitted.

    Tip

    You can use the Frames to Seconds and Seconds to Frames compounds in the Conversion group on the Tool panel when you're working with time values in an ICE tree, such as with the particle age.

    For example, if you wanted particles to live exactly 67 frames, you could plug the Frames to Seconds compound's Seconds output into the Age Limit port on the Set Particle Age Limit compound, and specify 67 as the age limit. The 67 frames are converted to 2.24 seconds (or whatever your frame rate is) by the conversion compound.

Randomizing and Turbulizing the Particle Age Limit

There are several compounds on the Task > Particle tab that let you add randomness or turbulence (noise) to the age limit value so that the particles don't all end their lives at the same time, such as with flickering flames. Adding randomness or noise helps the particles look more natural for certain types of effects.

See Randomizing Particle Values for information on each one of these compounds.

Here, a particle's age limit is turbulized to give the flames a more random look.

Deleting Particles upon Reaching Their Age Limit

Setting the age limit is not enough to kill the particles when they reach it. You need to deliberately delete them based on the age limit: the Kill Particles command does the job for you. Using this command, you can delete each particle when it reaches its age limit that you specify (think of it as "Logan's Run" for particles!).

To delete particles with the Kill Particles command

  1. Create a particle emission — see Creating a Basic Particle Emission.

  2. Choose the Particles After Emission Kill Particles command from the ICE toolbar.

    This command adds the Kill Particles compound to the ICE tree, plugging it into the PostSimExecute port of the Simulation Root compound.

  3. In the Kill Particles property editor, set the Age Limit value to when you want the particles to die.

Deleting Particles

Deleting particles is usually used as part of a state system or some behavioral setup, such as having particles die when they get to a certain location or upon collision with object.

For information on states, see ICE Particle States; for information on behavioral compounds, see ICE Particle Surface Interaction Behaviors.

To delete particles

  1. Create a particle emission — see Setting Up Any Type of ICE Particle Emission.

  2. Select the Delete Particles compound from the preset manager in the ICE Tree, and drag it into the ICE view.

  3. You can plug its Execute output into any Execute-type port, such as the Execute on Trigger or Execute Once on Enter State port in a State compound; or the Execute on Collide port in the Bounce Off Surface compound.

    (If you plug this compound's Execute output into a port on the ICETree node, it deletes particles at every frame as they're born!)

To delete particles upon collision with an obstacle

  1. Create a particle emission — see Setting Up Any Type of ICE Particle Emission.

  2. Choose the Particles Collision Delete on Collision command from the ICE toolbar — see Deleting Particles Upon Collision for more information.

Deleting Particles by Volume

You can delete particles if they are within the volume of an object. You can set the falloff within the object's volume to shape how the particles are deleted.

Here, particles are deleted within a defined falloff distance as they enter inside the sphere's volume.

To delete particles by volume

  1. Create one or more volume objects inside which the particles will be deleted.

  2. Create a particle emission — see Creating a Basic Particle Emission.

  3. Choose the Particles Collision Delete by Volume command from the ICE toolbar.

    This command adds the Delete Particles by Volume compound to the ICE tree, plugging it into the Execute port of the Simulation Root compound.

  4. Pick one or more volume objects to use for the particle deletion. Each object's Get data node is then plugged into the Volume port of the Delete Particles by Volume compound.

    You can also add more objects to the ICE tree later — drag each object's name into the ICE Tree view to create a Get Data node for it, then plug it in as the other objects.

  5. In the Delete Particles by Volume property editor, set the falloff distance, as well as other parameters.