DirectX Vertex Buffers & Particle systems
by Matt Laurenson · in General Discussion · 08/31/2002 (3:54 am) · 9 replies
Ive come to steal information again. Im thinking
about creating a particle system once im done making
my MD2 Viewer.
The thing is - when working with particles you set
individual properties - Rotation,Translation & Scale..
...bla bla... well does this mean in that you have to
use software Transforms on all the particles + then copy them into the buffer? - or is there a niCe way you can group them all + force the hardware to apply variouse transforms from a list + still have all the particles in
one vertex buffer????
Jst seems like a bit of a naff result - i mean - if you
cant do this, you are still doing the bulk of the transforms in software + only the convertion to world space & then the projection to screen space is handled by
mr HW Geom Engine... :/
hey maybe im being dumb again - wouldnt that be strange :p
Any help would be appreciated.. :)
about creating a particle system once im done making
my MD2 Viewer.
The thing is - when working with particles you set
individual properties - Rotation,Translation & Scale..
...bla bla... well does this mean in that you have to
use software Transforms on all the particles + then copy them into the buffer? - or is there a niCe way you can group them all + force the hardware to apply variouse transforms from a list + still have all the particles in
one vertex buffer????
Jst seems like a bit of a naff result - i mean - if you
cant do this, you are still doing the bulk of the transforms in software + only the convertion to world space & then the projection to screen space is handled by
mr HW Geom Engine... :/
hey maybe im being dumb again - wouldnt that be strange :p
Any help would be appreciated.. :)
About the author
#3
Hmm, making hardware accelerated particles would seem to be possible (given that the Xbox has hardware point sprites).
About the organisation of such a VB, I guess using indexed lists of points, feeding those into smaller batches (bad, but still), using a vertex shader to compute world space transforms (feeding the transform matrix via VS registers) well, it wouldnt be hyper efficient, but it'd use the hardware some.
Phil.
09/02/2002 (1:06 am)
Hi Matt.Hmm, making hardware accelerated particles would seem to be possible (given that the Xbox has hardware point sprites).
About the organisation of such a VB, I guess using indexed lists of points, feeding those into smaller batches (bad, but still), using a vertex shader to compute world space transforms (feeding the transform matrix via VS registers) well, it wouldnt be hyper efficient, but it'd use the hardware some.
Phil.
#4
nVidias 'NV_point_sprite' extension in OpenGL is a prime example.
- Melv.
09/02/2002 (2:50 am)
A big geometry gain is to use hardware accellerated point sprites to quarter the overall geometry overhead of the particles. This of course is assuming you are only using billboards for particles and not more complex geomtry in which case this cannot be used.nVidias 'NV_point_sprite' extension in OpenGL is a prime example.
- Melv.
#5
favour of OpenGL - not because its easier, though that does play a part, but because its both cleaner from wrapping point of view + there a more interesting tech demos available for it.
The whole HW Sprites thing would seem tobe limited to
nVidia hardware - i myself have a geforce card, but
i dont want to get manufacturer specific - so i guess its
gonna have tobe sofware processing of Quad Lists :/
Thanks again :) - your help is much appreciated...
...
...lol + i will try to get more concept art done..this
programming lark is a bit of a distraction though :p
09/02/2002 (5:51 pm)
Thanks guys - ive decided to abandon using Direct3D infavour of OpenGL - not because its easier, though that does play a part, but because its both cleaner from wrapping point of view + there a more interesting tech demos available for it.
The whole HW Sprites thing would seem tobe limited to
nVidia hardware - i myself have a geforce card, but
i dont want to get manufacturer specific - so i guess its
gonna have tobe sofware processing of Quad Lists :/
Thanks again :) - your help is much appreciated...
...
...lol + i will try to get more concept art done..this
programming lark is a bit of a distraction though :p
#6
All you need is update all the point's 'world_position' every frame and D3D fix function transform pipe does all the rest. It works with or without VB.
09/02/2002 (6:59 pm)
DirectX has point spirits support for over 2yrs. Unlike OpenGL, it works on all hardware.All you need is update all the point's 'world_position' every frame and D3D fix function transform pipe does all the rest. It works with or without VB.
#7
with GL..i have noticed a general performance hit...
perhaps its cuz im using an older version...
+Thanks for pointing out the "Point Sprite" thingy...
its something i overlooked - though according to the demo
in the DX8.1 sdk...the use of point sprites is not
supported on all GFX cards...Anyway they exist + thats
good enough form me :)
Started coding my design - so i hope to get the damn
thing throwing out particle hell soON :p
Thanks guys :)))
09/06/2002 (12:34 pm)
lol - well ive gone back to DX again...after playingwith GL..i have noticed a general performance hit...
perhaps its cuz im using an older version...
+Thanks for pointing out the "Point Sprite" thingy...
its something i overlooked - though according to the demo
in the DX8.1 sdk...the use of point sprites is not
supported on all GFX cards...Anyway they exist + thats
good enough form me :)
Started coding my design - so i hope to get the damn
thing throwing out particle hell soON :p
Thanks guys :)))
#8
09/06/2002 (3:45 pm)
D3D pipeline will take over the job if the H/w does not support point spirit. hence, it still works.
#9
expressing a concern - im assuming it automatically
reverts to quad lists if support for pointSprites does
not exist?
My knowledge of DirectX3D & C++
is a bit pathetic...so thanks for the help :)))
09/06/2002 (9:57 pm)
hehe...im not trying to be clever fred. i was jstexpressing a concern - im assuming it automatically
reverts to quad lists if support for pointSprites does
not exist?
My knowledge of DirectX3D & C++
is a bit pathetic...so thanks for the help :)))
Associate Melv May
New Particle Engine Discussion.
- Melv.