I make particle engine. Do you recommend using:
GL_POINTS or trianles/quads facing camera?
Alphatexture or glColor4f or both modulated?

What combination gives better result?

Any other hints?

Thanks mucha!

If you use traingles or quads then you have the option of applying textures. If you only require coloured points then just use point primitives. Play with both and see what you find out.


What combination gives better result?

The combination that gives you what you want is the best combination.

Use points of you want points, or use textured triangles/quads if you want textures triangles/quads. Use an alpha map if you want to do so, or use glColor4f if that’s ehough. For example, no point in using a texture if all you need is a uniform color and alpha over the whole particle.

Only you can answer the question what you want.


using a GeForce 4 Ti and the extension GL_NV_point_sprites you can use GL_POINTS and let them be textured. Otherwise you should follow the suggestions above.


Ok, thanks.

Bob’s reply was little funny, but not really helpful.
Of course I use points if I need points, or textured triangles if I need them.
But problem is that I haven’t done before particle systems, so how could I know what the result looks and don’t know what I need really and what the result should look.

Sorry that I asked, I should have tried before, sorry.

Quick test with GL_POINTS gave only rectagles so I’ll use textured triangles. And maybe use that nvidia extension if available.


You can get rounded points, I think if you use some point smoothing (I believe Quake2 used that).
I generally use both the textured-billboard and the GL primitives when doing particle systems, depending on what I want to achieve. For example, I think smoke generally looks good only if you use nice big fat textured billboards, but little sprays of blood can look fine as just GL_POINTS (if rounded). As Bob said, it does depend on what you want


I know my reply didn’t gave any detail about how to create the best looking particle system, but on the other hand, I didn’t mean to give any information about it either.

The problem was that you asked a general question without any details about your problem. You can almost never get an answer with more details than what the question contains.

If you haven’t done a particle system before, I suggest you try all combinations yourself, and see what they do. That way, you will know what each combination is capable of, and you may be able to solve any further decision problem as you advance in your knowledge about particle systems. Graphics programming is almost exclusively about experience in a wide range of techniques.

Ok, I wrote simple particle system with alphad textures rendered as quads. I think it would be better to render triangles to save one vertex per particle althought it wastes a little texture area (need to fit particle in triangle shape). With triangles there’s possibility to divide 256x256 texturein two triangles and get nice little side effects because having drawn two particles in one texture

I tried GL_POINTS too anf got them round with glEnable(GL_POINT_SMOOTH).
Can I use point’s that scale by distance? now if I set glPointSize(10) it is always that size independent of distance?


You can use the ARB_point_parameters extension. I believe it allows points to scale according to the distance.

Ok, my Voodoo3 crappy has EXT_point_parameters instead. I gotta support both.

From extencion registry:
EXT_point_parameters was promoted to ARB_point_parameters on June 20, 2000. The EXT version is now considered obsolete.