View Categories

Particle Attributes

2 min read

Particle Attributes can be used in expressions if the channel is marked with an „@„. There are Scalar (one Value) or Vector (three Values) Attributes available. You can both read the values or write them for example with the “Attribute-Set”-Node. To access one of the three vector values you have to add a dot and the value you desire. 

So if you want to read velocity in x direction use „@v.x“.

AttributeExplanation
@ptnumreturns index of a particle
@numptreturns number of a particles
@idreturns id of a particle (if available)
@CdColor of a particle
@Cd.x (Red Channel)
@Cd.y (Green Channel)
@Cd.z (Blue Channel)
@vVelocity vector
@v.x (X-Axis)
@v.y (Y-Axis)
@v.z (Z-Axis)
@PCurrent Position of a Particle
@P.x (X-Axis)
@P.y (Y-Axis)
@P.z (Z-Axis)

set Particle Attributes

you can set custom particle attributes with the „Attribute-Set“ Node. You can use your own terms, but a few are already in use by the system.

AttributeExplanation
„force“ A vector which defines the Force per Particle
does not import from the classic systems but you can write to set a per particle force
„width“The size of each particle (does not affect the simulation)
„id“Id of each particle
can be read, but not written
„emissionPos“The Position at the moment of particlecreation
„sleeping“Is the particle asleep or not
„stick“Is the particle sticking or not
„emitterId“returns an id from the emitter that created that particle

Solver specific attributes – Granular (CPU only)

AttributeExplanation
„maxStretch“ Sets how much stretching is tolerated before contraints are breaking

Solver specific attributes – SPH (CPU only)

AttributeExplanation
„viscosity“controls the viscosity of the fluid per particle
„surfaceTension“controls the surface tension of the fluid per particle

Solver specific attributes – Cloth

AttributeExplanation
„breakstretch“ controls how much stretching is allowed before breaking the constraints
„stiffness“ sets the stiffness of the constraints generated from the particles