How to control color by particles lifespan?
#1
Hi there
I am aware that I can control the color of particles based on time "age".
But it does not respect the actual lifespan of the particles .

Example:
if I make a flow which continuously shots out particles, and delete them after 50 frames.
I can then apply custom float and control the UV over time.
But I have to normalize the custom value to 50.

This seems fine and is exactly like the example scene.

Problem:
If I apply a variety of 20 to the delete operator, then some particles die long before they reach the end of the color ramp, while others lasts for several frames with the end ramp color.

Is there a way to have it respect the lifespan, instead of age?
  Reply
#2
Particles don't have a 'lifespan' in any deterministic sense. Yes, you can retroactively see that a particle is deleted in X frames, but preemptively trying to determine lifespan is a form of the halting problem.

A workaround would be to assign some custom float value to particles ahead of time (ie, assign a max age/lifespan value), then delete particles with a filter that checks if their age is greater than the assigned float value. Then you can also use that float value to normalize the UVWs, but you'd have to use a Script operator to do that normalization for now (it's easy, just something to be aware of).
  Reply


Forum Jump: