Reads the custom number stored on each particle by the Attribute input of the Particle System.
What it is for
The attribute is a memory of one number per particle. With this node you read it back, to drive a force with it or to build a value that grows over time: how long a particle stayed in a zone, how long it has been moving fast. The Attribute colour mode of Appearance shows the same value as colours.
How it works
The node gives the value the particle carried at the start of the current step. At birth the attribute takes the value of Attribute Init; then, at each step, the Particle System writes into it whatever is plugged into its Attribute input. Because the value read is the one from the step before, you can plug Get Attribute into a Math node and back into Attribute to make the value add up or fade. It gives 0 outside the simulation of the particles (Appearance inputs, effects) and in what is decided at birth.
Connections
Plug Attribute into the inputs of force nodes or Math nodes, and plug the result into the Attribute input of the Particle System to keep it for the next step.
Settings
No settings: connect it.
Outputs
Attribute
Tips
- Counter: Get Attribute > Math (Add, a small value) > Attribute of the Particle System, with Attribute Init at 0. The value is written once per simulation step, so its pace follows the number of steps (frame rate, Substeps of the Render node).
- Set the colour mode of Appearance to Attribute to see the value: 0 is the left of the ramp, 1 the right.
- With nothing plugged into Attribute, every particle keeps its Attribute Init value all its life.