Work with per-particle field attributes

You can manipulate field attributes on a per-particle level. This functionality works for the nParticleShape object is used as the source of the field, as well when the nParticleShape object is affected by a field. In the case where the attribute is affected by both, the value from the particleShape or nParticleShape acting as the source of the field will take precedence.

If the nParticleShape acts as the source of the field, this feature allows each field to behave its own way. If thenParticleShape is simply affected by a field, this feature allows each particle to be affected by a unique set of field attributes.

For more information, see nParticle Per Particle attributes.

To apply per-particle field attributes

  1. Apply a field to a set of particles.
  2. In the particleShape Attribute Editor expand the Add Dynamic Attributes section, if necessary.
  3. Click the General button. The Add Attribute dialog box is displayed.
  4. Create a per-particle attribute of float or vector type on the nParticleShape with the name fieldName_attributeLongNameOnTheField or fieldName_attributeShortNameOnTheField. The type for the per-particle attribute you use must match the attribute type on the field.

    For example, create airField1_magnitude to control the magnitude on airField1.

  5. Write an expression to control this attribute.