Work with emitted particles

 
 
 

If you make an object emit particles, you can write a creation or runtime expression for attributes of the emitted particles. For example, you can assign the emitted particles a value for opacity and color.

To write an expression for emitted particles

  1. Create the emitter.
  2. Add the desired dynamic attribute to the shape node of the emitted particles.
  3. Select the shape node of the emitted particles in the Expression Editor, then write the expression to control the attribute.

Example

Suppose you’ve created an emitter and added a per particle opacityPP attribute to the shape node of the emitted particles. The following creation expression gives each of the emitted particles a random opacity between 0 and 1:

particleShape1.opacityPP = rand(1);
ImportantAvoid assigning a per particle attribute to another object’s per particle attribute if the particles of either object die (because you’ve used a lifespanPP attribute). As particles die, the order of expression evaluation changes for the object’s particles. This causes unexpected results.

You can, though, assign from one attribute to another in the same object with dying particles. The array indexes of the different attributes are in synch with each other.

For example, if your particles have a lifespanPP of 2, don’t write an expression like this:

emittedShape.rgbPP = otherParticleShape.rgbPP