Screen Particles Help

Started by
1 comment, last by Juliean 10 years, 11 months ago

Hello, I wanted to know how to make an effect of dust going past the screen. I'm talking in terms of Call of Duty where there is always stuff moving in the air. Is this some sort of particle implementation?

Could someone tell me how its done or at least point me in the direction of a good tutorial?

P.S: I use SFML, but simple concepts non-related to this engine will be useful.

Thank you

Advertisement

Likely yes. To my knowledge, a lot of today's 3D games use 2-Dimensional particles in conjunction with a technique called "billboarding" (there's even a recent article that covers it a bit located here, but it may help to also follow the earlier articles he's made as well). What that means is that no matter what direction the object is being seen from, it will always show the same image. To my knowledge, this is implemented by making a square (based on your library it may be made using 2 triangles), applying a particle texture to it (I've attached an example one), apply billboarding, and then program something to make the rendered particle move and fade in/out.

?I'm assuming you've worked on 2-dimensional games already. It's really the same concept as that, except using a technique that make the image face you constantly. I'm sure there are other ways of doing it as well, but this is one of the basic ways of doing that.

Hopefully that clarifies it a bit :)

To my knowledge, this is implemented by making a square (based on your library it may be made using 2 triangles), applying a particle texture to it (I've attached an example one), apply billboarding, and then program something to make the rendered particle move and fade in/out.

Its noteworthy that there are in fact different types of billboards, for different effects. There are screen aligned BBs (as epicpunnum described), but there is even more of them:

Camera aligned billboards are nearly the same, but they are instead oriented towards the camera - try to visualize it, I'm too lazy to describe it right now :/

Then there are billboards that are aligned towards their own traveling direction. Think about sparks from an explosion - these do face the camera all the time, but the rotate around their own direction axis rather than the screen axis.

Last but not least, you might actually want to align billboards to a certain fixed direction sometimes. The shockwave of an explosion, or an old tree representation (âla SM 64) is such a case.

There was a good article which described how to achieve the different types of billboards using only cross products and a matrix as a local coordinate system. I have too little time right now to describe it for you, but if someone knows that article (or any similar), I think it would be great if he'd post this - that is definiately going to help with creating a good particle system.

This topic is closed to new replies.

Advertisement