Added a particle index output to the Particle Info Cycles node. This is required to get consistent ID numbers for particles. The Object ID is not usable since it's a user defined value of the instanced object, which does not vary per instance. Also the random value from the object info node is not consistent over time, since it only depends on the index in the dupli list (so each emitted or dying particle shifts the value).

The particle index is always the same for a specific particle. Randomized values can be generated from this with the use of a noise texture.
This commit is contained in:
Lukas Toenne
2012-07-26 11:40:58 +00:00
parent 53a861b6f9
commit fec872ef9c
8 changed files with 35 additions and 6 deletions

View File

@@ -36,6 +36,7 @@ struct Transform;
/* Object */
struct Particle {
int index;
float age;
float lifetime;
};