nParticle Rotation
 
 
 

When you turn on Compute Rotations in the nParticleShape Attribute Editor, Nucleus calculates per-particle rotations during nParticle self-collisions, collisions with other Nucleus objects, and collisions with the Nucleus plane.

Rotations are initiated from the friction generated between the particles and the collision object. You can control the nParticle object's tendency to rotate during collision by adjusting the Rotation Friction and Rotation Damp attributes. See Rotation Friction and Rotation Damp. The Friction value of the collision objects can also affect the tendency of particles to rotate. Rotation Friction does not change how Friction affects nParticle motion during collision. See Friction.

For nParticle objects, per-particle rotations are most visible with instanced geometry, or when a rotatable texture, such as a fluid texture, is assigned to the nParticle object.

Rotation per-particle attributes

When on, Compute Rotation adds Rotation PP (rotationPP) and Angular Velocity PP (angularVelocityPP) per-particle attributes on the nParticleShape node. You can use Rotation PP to rotate instanced geometry on a per-particle basis. See Rotate instanced geometry

Rotation PP (rotationPP) and Angular Velocity PP can be used with expressions to add and control per-particle rotations. Rotation PP is the current rotation of the particle and Angular Velocity PP sets the rotational velocity of the object about its origin.

If Compute Rotation is turned off, you can create an expression that checks for collisions during the current frame, and then initializes angularVelocityPP for particles that collide. Also, for all particles, you can update the rotationPP using an expression that adds angularVelocityPP, multiplied by the frame length in seconds, to the current rotationPP value. Be aware that if you use Rotation PP (rotationPP) or Angular Velocity PP (angularVelocityPP) in an expression while Compute Rotation is on, the Nucleus solver updates any Rotation PP and Angular Velocity PP values set by the expression.

Related topics