• Advertisement
Sign in to follow this  

particle engine

This topic is 4870 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I just have a few simple questions as I try to build my first particle engine. 1) should I use billboarded quads, or the point entension where size changes with distance (point sprite)? Does it matter? 2) do you sort the particles in order of distance each scene to allow for alpha blending? 3) Right now I have a couple hundred particles exploding radially outward. Honestly however it looks like a lame attempt at confetti or fireworks, than anything cool...does anyone have any suggestions for rendering an explosion?

Share this post


Link to post
Share on other sites
Advertisement
1) you could probably do it using either way, but i think you will be better off with billboarding.

2) not sure, im still sorta new to particles

3)try creating a loop that will update each particle and change its color based on how long it has been since it was created.

Share this post


Link to post
Share on other sites
I've made a pretty robust particle engine, so here are my thoughts on it.

1) I'd have a couple different types of rendering methods. I'd start at just rendering GL_POINTS. This will just help you get the basics of the particle engine working before worrying about making it look pretty. After you have everything working I'd add in a couple different rendering types. I use points, point sprites and lines. Billboarding is (at least in my opinion) an old technique. You can get most of the same effect with point sprites, which are faster and easier to program. If you want to get really fancy, you can use vertex/fragment programs to get some really good looking effects. I'd definatley think about using something where the size can vary. You can do that in point sprites, and vertex programs. But it is something that you probably want.

2) I dont' do any particle sorting. Most likely you wont' have to. I usually use (GL_SRC_ALPHA, GL_ONE) for the blending function. I'm not sure how much sorting will effect how it will look. But I think you can usually get around sorting. Draw your entire scene without particles. Then disable depth writing, but enable depth testing. Then render your particles last.

3) Coding a good particle system and getting one to look like something are completely different. To get good looking particles, usually you will have to be creative. Explosions can become complicated depending on how you want it to look. Usually I have 3 particle systems per explosion. The first is the simple points going outwards very quickly. They are usually yellow and white points. Second I have some bigger slower looking particles in the middle. I try to make this look like big chunks of debreis (spelling?) from whatever exploded. Finally I add some smoke. This is usually big, slow moving particles with a very transparent texture. Using all three usually make for a good look. Your eye can catch patterns/repetition very easily. That's why a few simple particles going outward looks silly. You'll need a few different types to keep your eyes busy.

My words of wisdom for a good particle system is make everything as robust and programable as possible. Have a variance term for everything, velocity, position, color, life ....

Good luck

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement