PDA

View Full Version : Particle FX



eror
04-02-2004, 03:35 AM
Hi

Do you know any page where can I find tutorials, examples etc. about particle effects that can be used in OpenGL? I want to learn such an effects like fire, water, explosions- basics in th most.

Oh, and I am wondering what is the best way to simulate waves on water (and water at all)?

Thanks

Yin1
04-04-2004, 08:58 AM
1) Try to make a very, very, simple Particle sys.
2) Then ask for some ideas on this forum how to do it better
3) Try Goole :)

Yin1
04-04-2004, 09:08 AM
I have somethink: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=19
But I recoment to use:

glBindTexture(GL_..._2D, ???); // A smoke or ?
glEnable(GL_BLEND);

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_A...);
--- or ---
glBlendFunc(GL_SRC_ALPHA, GL_ONE);

glBegin(GL_QUADS);
glVertex3f(x-1, y-1, z);
glVertex3f(x+1, y-1, z);
glVertex3f(x+1, y+1, z);
glVertex3f(x-1, y+1, z);
...

ioquan
04-04-2004, 10:46 AM
nehe.gamedev.net has a tutorial on how to make a simple particle system. Basically, for most types of particle effects, you just draw lots of small textured quads (typically the texture is just a feathered dot which fades into complete transparency) on top of each other. You use a blend mode that brightens, so that you get bright highlights (this works well for magic effects, fire, and other things).

Water can be extremely complicated and is not really the same problem as a particle system, though you may use particles to add splashes and stuff to your water.

eror
04-05-2004, 03:03 AM
Thanks.

If have more suggestions- post it :)