I’m still trying to figure out the best way to create the illusion of a field of particles. Obviously I don’t want to actually create a field encompassing the world (though this would be the illusion), but rather a small field around the active camera. Two uses of this in my case would be:
Dust - particles around the camera that are there to add a visual indication of momentum.
Nebula Clouds - same concept, but on a somewhat larger scale.
The problem is, Unity’s particle system doesn’t seem to give enough control over the spawning / removal of particles to make this effect consistent at different velocities. I could really use some suggestions for creating this illusion.
More info:
Particles have no velocity (static).
Particles would spawn near the camera, starting and ending at alpha=0 to avoid “popping” in and out.
When the player/camera is stationary, the particles must persist (live forever).
When the player is N distance from a particle, it is queued for destruction (alpha drops to 0)
Basically it would be ideal if a sphere around the camera would “unmask” an existing field of particles.
Are Unity’s particles not the best way to achieve this effect? What alternatives could be efficient? Manually instantiating billboarded quads?
Thanks for all replies.
Each particle system contains an array of particles. The only real way to do what you’re asking is to check all particles in the array for distance from the player. When it gets below a certain value, either remove it from the particles array or set its energy to maxEnergy - 1, thus causing it to fade out in exactly one second.
For the essentially infinite particles, I’d suggest a one-shot setup with min and max energy near 100000.
Thank you for your time and this suggestion. I was hoping I’d get someone to confirm that Unity’s particle system was suited for this task. The more I investigate, I’m realizing there’s quite a bit of overhead involved in producing this effect (managing distance / age for dozens or hundreds of particles).
Due to a lack of coffee and IQ points, I’m having trouble understanding how to fade particles “in” using the method you’ve outlined. Fading them out by setting their energy makes perfect sense, however, having an “infinite” lifetime is prohibitive to using energy to control alpha while in the desired viewing range. I suppose I can use the array to “hook” them once they reach a certain age/alpha, maintaining it until they’re out of range.
Any thoughts on this?
Thanks again for your help.
You could manually manage the particles in script.
Add a Particle Renderer and an Ellipsoid Particle Emitter to an empty GameObject, create an array of particles, and update them however you want in script.
Hey, thanks for this reply. I actually wound up creating a workaround which bypasses unity’s particle system altogether, giving me complete control over particle behavior. Much more intuitive than trying to force Unity’s Emitter to do something it wasn’t meant to do. 
could you explain what you ended up doing?