Moving through particles

Hi again, guys. I recently did a LITTLE work on using camera.position as a standard PS emitter. (standard particle emitters can be mesh or a vector3… and camera.position is a vector3.)

https://playground.babylonjs.com/#36UHXZ#36

(pardon the sparkly-particles custom updater)

I just barely started… mostly working in lines 120-125. It is quite easy to drive the camera fast-enough to exit its around-the-cam particle cloud. My goal was getting particles spraying from the entire edges of the render canvas… toward screen center. I started a thread about it… but few were interested or knew of solves. (yawn)

Also, Darcey… you might have noticed some problems with “depth sorting” and other alpha-related things… on standard particles. Expected behavior. Since standard particles are sort of like a single ground grid that has been divided-up into separate cells, the particles can only be depth-sorted IN-FRONT-OF, or BEHIND other mesh. I’m quite sure standard particles cannot be both behind and in-front-of other mesh… at the same time.

But maybe it can be done… using multiple particle systems. They are lightweight… no problems using many. :wink: Standard particles have an age (maxLifetime) that determines when they recycle… and they gentle-change from color1, to color2, to colorDead… across their lifetimes… so that gives you SOME fade-out features… time-based, not distance-from-emitter-based.

There are helpers nearby that are WAY smarter than I… on these subjects (such as Jerome). Generally, I am just a playground librarian. heh. I should just shut-up, really. :slight_smile: