Skip to main content
GameDev.net gamedev.net
🔒 Locked

Particle Systems

Started by idinkin Oct 17, 2003 at 4:33 PM 6 replies 1.4k views
Original Post
idinkin
idinkin
What''s the best way to render particle systems? And what is the minimal requirements for PointSprites extension?
Sometimes movement is a result of a kick in the ass!
Ostsol
Ostsol
Trial and error? :D (That''s what I did. . .)

Actually, at nehe.gamedev.net there''s at least one tutorial for particles.

As for the point sprites extension, it depends. . . According to delphi3d.net, cards as far back as the Geforce 2 MX support NV_point_sprite, but I''m not sure if that''s hardware support. ATI cards currently don''t support any point sprite extension, though they do support the feature under DirectX, so it''s only a matter of time before support for ARB_point_sprite appears.
-Ostsol
MuLuX
MuLuX
I was acually wondering about this one as well...
I assume point-sprite''s would be a pretty good choice - assuming all cards would support it, but that''s not really the case. The other options I see right now is the following:
1. Immediate mode (ie. glBegin/glEnd and using glTranslate, push/popMatrix for positioning)
2. Create one small vertex-buffer with one quad and render it multiple times. (using glTranslate, push/popMatrix for positioning)
3. Create one large vertex and fill it with quads, which will require this buffer to be updated every frame with every quad manually positioned.

The last time I made a particle system alt. #1 worked best with my old gf2mx, but I didn''t acually try alt #3
So what I was wondering is what you guys think would be the fastest approach, maybe even some other solution?

// mulux, Jesper Ek
idinkin
idinkin
Is it true that point sprites can not be larger than 64 pixels?
Is there a way to rotate them?
Sometimes movement is a result of a kick in the ass!
Ostsol
Ostsol
quote:
Original post by idinkin
Is it true that point sprites can not be larger than 64 pixels?

Yes.

EDIT: Actually, I think it depends on the implementation, but current graphics cards are limited to 64 pixels.
quote:
Is there a way to rotate them?

No.

[edited by - Ostsol on October 18, 2003 3:07:40 AM]
-Ostsol
idinkin
idinkin
So the best way you suggest to use is Quads Billboarding?
Sometimes movement is a result of a kick in the ass!
Ostsol
Ostsol
It really depends on if the camera is going to actually get close enough to the particle system for the point sprites to reach their 64 pixel limit. In a game like Neverwinter Nights or Dungeon Siege or WarCraft 3 there is absolutely no way one would be able to get that close to particles. However in a shooter or other first person game, it is entirely possible for the camera to end up right in the emitter. My suggestion is to support both in your particle system and decide which method to use on a case-by-case basis when you are designing content.
-Ostsol
Ilici
Ilici
quote:

1. Immediate mode (ie. glBegin/glEnd and using glTranslate, push/popMatrix for positioning)
2. Create one small vertex-buffer with one quad and render it multiple times. (using glTranslate, push/popMatrix for positioning)
3. Create one large vertex and fill it with quads, which will require this buffer to be updated every frame with every quad manually positioned.



i''m using #3 and it works very fast: with 4000 particles i get a ~2.5ms rendering time (and ~20 ms update - point sprite would do wonders here ). but this is much faster than Immediate mode because the rendering is much faster and the update would take the same time.

1 and 2 are really bad because in 1 using Immediate Mode is slow and in 2 using a 4 vertices array and sending it to the card many times per frame is overkill (and probably smth that disgustes OGL gurus )



[ My Site ]
''I wish life was not so short,'' he thought. ''Languages take such a time, and so do all the things one wants to know about.'' - J.R.R Tolkien
Founding member of "Un-Ban nes8bit and Jesper T" association (UNAJA) (to join put this in your sig)
/*ilici*/

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.