Archived

This topic is now archived and is closed to further replies.

Arcibald Wearlot

Particle system - dynamic vertex buffer?

Recommended Posts

In my particle system i store translation values for every particle, then i loop trough each particle of the emitter, set the transform and render it. This is quite slow, but it''s very easy to get the particle aligned with the viewport. Now, i heard a lot of people use a dynamic vertex buffer because it''s faster.. but you have to do some computations anyway to get the quads aligned to the view, so my questions are: is it really faster to do all those transforms on the cpu? how do i compute the screen-aligned vertex position? i guess i could do something like getting the camera rotation angles and doing some trigonometry, but are there easier ways?

Share this post


Link to post
Share on other sites
If you are into a particle system, why don´t you use Pointsprites? they are allways screen-aligned(billboard)

The DX SDK has and example on it.

Share this post


Link to post
Share on other sites
yeah I''m thinking on point sprites.. but there are some drawbacks, for example you cannot rotate them (maybe you can rotate the texture coords in a vertex shader, but that gets tricky)

Share this post


Link to post
Share on other sites
Dunno if you''ve seen this tutorial from 32bits.co.uk
http://www.thehavok.co.uk/scene/32bits/tutorials/directx/techniques/tut3particlesdx9.php

It explains why point sprites are not necessarily a good thing, and might be of some help to you.

Jx

Share this post


Link to post
Share on other sites
the article insists on the fact that point sprites scaling is only supported by a few cards
I have a GeForce4 Ti 4600, so it's not a very new video card, but the MaxPointSize value in the Directx caps is 8192
..so I think that the article is rather old, and I hope that nowadays all the cards support point sprites scaling
Anyway, do you know what cards do not support it?

[edited by - Arcibald Wearlot on May 21, 2004 2:08:18 PM]

Share this post


Link to post
Share on other sites
Why not just verify that scalability is supported beforehand, and use a "traditional" billboard method if they''re not?

I haven''t really done any testing yet, so I don''t know what real performance advantages the pointsprites give, though.

Share this post


Link to post
Share on other sites