Equations/algorithm for my effect

Started by
3 comments, last by pauljan 18 years, 7 months ago
I've seen this effect in some game somewhere and I'd like to do something similar (it might have been the microsoft splash screen in some xbox games). It's some particles flying around a sphere in a somewhat random pattern. Each particle appeared to be all in a line (follow the leader) rather than chaotically flying around. My requirements are that it needs to be done inside the UI system so it will be a 2D effect that looks like it's going around a sphere. So I imagine I'd make the effect function in x,y,z and then flatten it to 2D during the render. My problem is that I'm not sure where to start. Are there some sphere following algorithms or something like that out there that may help me?
Advertisement
For making particles follow each other, google for "flocking" or "boids". These algorithms generally are written for euclidean space, but since a sphere is locally euclidean it shouldn't be difficult to adapt them.
for a particle following some path around the sphere, you could define a bezier like curve defined on the sphere, however instead of using linear interpolation(larp), like normal bezier curves, you'd used spherical liner interpolation (slerp). I've seen this done for similiar things, and it gives nice results. of course you'd have to hard code in a path, but you could generate random paths and connect them using catmull-rom or somthing, you want the particle to atleast have a continuous motion, not jerky you know. to make the particles roughly follow a point on your interpolation curve you could have the particle density fall off from the leading point, there is lots you can do, this would have the shooting star effect.


Tim
Thanks guys, I'll look into your suggestions. I'm thinking that it may be far too time consuming to implement though for such a minor effect. ;-) If this will take more than a day, maybe I'll just go with some kind of pulsing visual.
If it's the effect I think you are referring to, the position of each particle is calculated using a fixed combination of a couple of sin cos functions added(/multiplied) together with different scaling and phase, were each particle has it's own offset within the phase. Pretty ancient demoscene effect from the good old mode 13h days :D

This topic is closed to new replies.

Advertisement