I have a particle system which generates a bunch of white dots that live for infinity. They don’t move position once spawned, so essentially a static star field.
But i want them to randomly change in opacity like a “flicker” effect you get with lights in an atmosphere to give more life to my scene. I could not work out how to do this. Over their infinite lifespan. I’d like to adjust the alpha channel between a range. Either by script or using the particle system but cannot work out how to do it from fiddling with the particle system.
I would make the stars as instances of prefab sprite. Having a script for each one for color change. In theory you could also make flicker with Animator but it’s overkill for this, and you would need a script anyway to make it start from random phase.
I have over 9000 of them though, prefab would surely be slower than using the particle system which is surely more efficient at rendering large numbers of particles?
Wouldn’t adding texture just add to the memory usage? Currently i just have a plain white colour, but theres no way randomly adjust the alpha over time from what i can see.
If found Texture Sheet Animation option in the Particle System. Set it to “Whole Sheet” and alot of cycles. Just 1 texture that has different shades of flickering star. It’s not a whole lot of memory use and it’s no effect to CPU/GPU use. It’s just a matter of selecting different texture coordinates.
Also largest life for particle seems to be 100000, being ~27.8 hours.
Yeah there is no infinite time for some strange reason. I could try the pre-fab method but no idea how to randomly scatter 9000 of them efficiently. And then also loop every frame to adjust their visuals.