Hello, fellow programmers. I hoped you could help me with some advice for implementing particle systems in a game demo im doing as a school project. I plan to use particle systems for many effects, so it’s imperative that this implementation is speed-efficient (most… unusual priority, eh?).
I was planning on having a manager, that orders the individual systems into a tree hierarchy for rendering.
It would basically put all systems using the same texture in one branch, with sub-branches for each blending mode variation of the systems. With this approach, I figured that I could minimize the texture switching and state changes required to render all existing systems.
I have some issues that I would appreciate your thoughts, ideas or suggestions bout:
I had plans for animated particle textures (since I’ll use alot of fire, which should look good with animation, creating a very “volatile” effect), and figured out a good way of doing this without excessive texture switching would be to use the well-known method of “mosaicing” the different frames together on a single texture. Then I just modify the texcoord positions over time to reflect animation.
Since the particles are contained in separate systems, I thought it would make sense to implement each systems rendering as a vertex array. Is there any problem with that idea? What alternatives exists? And last, if I should use it, what primitives should I draw? Quad or triangles? I also figure drawArrays would be better for particles, since there isn’t a whole lot of vertex sharing going on? Correct?
Btw: I’m new to VBO’s, having heard of them just recently, I’ve just printed the Nvidia PDF detailing their useage, should make some decent night-reading.
Hm, jwatte also has some interesting ideas here:
http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=011020
Thanks for your time, looking forward to your replies.
Martin Persson, Sweden