Understand per particle and per object attributes

You can dynamically add two types of attributes to a particle shape node:

A per particle attribute lets you set the value of the attribute individually for each particle of the object. A per object attribute lets you set the attribute value for all particles of the object collectively with a single value.

For example, a per particle opacityPP attribute lets you set a unique opacity value for each particle of an object. With a per object opacity attribute, you must give all particles of the object the same opacity.

A per particle attribute holds the attribute values for each particle in the object. For example, though there is only one opacityPP attribute in a particle object, the attribute holds the value for each particle’s opacity value. The attribute holds the values in an array. In simple terms, an array is a list.

Though per particle attributes are best for creating complex effects, you can’t keyframe them. You can keyframe per object attributes.

You can add per particle or per object attributes for opacity, color, and other effects.

For a particle shape node attribute, you can tell whether it’s a per particle or per object attribute by examining the Attribute Editor’s particle shape tab. All per particle attributes appear in the Per Particle (Array) Attributes section of the tab.

The per object attributes appear elsewhere in the tab. Most appear above the Per Particle (Array) Attributes section, for example, in the Particle Attributes and Render Attributes sections.

For many dynamically added attributes, you can also tell whether they are per particle or per object by their names in the Expression Editor. If a name ends with PP, it’s per particle. Otherwise, it’s usually per object.

Position, velocity, and acceleration are per particle attributes, though their names don’t end with PP.

The most common way to create dynamic per object or per particle attributes for a particle shape is by clicking the Opacity or Color buttons in the Add Dynamic Attributes section of the Attribute Editor.

For example, if you click the Opacity button, a window appears and lets you choose whether to add the opacity characteristic as a per object attribute or a per particle attribute.

If you choose per particle, the Attributes list of the Expression Editor displays a new attribute for the selected particle shape node: opacityPP. If you choose per object, an opacity attribute is displayed instead.

If you add both a per particle attribute and a per object attribute for a characteristic, the per particle attribute takes precedence. For instance, if you add opacity and opacityPP, the opacityPP attribute controls the opacity of the particles of the specified object.

Attention: You can use per particle attributes only in particle expressions. You can use per object attributes in particle or nonparticle expressions.

If you use a runtime expression to read or write a per object attribute of a particle object with many particles, you can speed up expression execution by reading or writing the attribute in a nonparticle expression.

Nonparticle expressions execute only once per object. Particle expressions execute once for each particle in the object. Because reading or writing a per object attribute more than once per frame is redundant, you can save processing time by working with them in nonparticle expressions.