Rendering bullets

Started by
6 comments, last by MikeyO 19 years, 3 months ago
Does anybody know for certain which would be faster in the long run for rendering something like bullets, either A) D3D Sprites, or B) point sprites (with a vertex buffer you need to lock and fill every frame), or does anybody have another method? I was thinking of maybe using shaders, but I would have to store the velocity & position of each particle, which requires a very high end card.
Advertisement
Billboard. A plane, or even a tri with the bullet image wrapped on it. You could use shaders to make the plane always point towards the camera if needed. Point sprites are often hit and miss in terms of support so I think you should see those as a last resort.

Mark
Cornutopia Games
http://www.cornutopia.net
I think most systems (post vs 1.1 maybe) support point sprites, but would drawing sprites (billboarded sprites) be faster than point sprites if I had to lock a vertex buffer and fill it?
Dunno about sprites, but have you considered a line?
I use one blended yellow -> orange... they go so fast though that you can hardly see em ;)
Quote:Original post by Aph3x
Dunno about sprites, but have you considered a line?
I use one blended yellow -> orange... they go so fast though that you can hardly see em ;)
Exactly. It is far more realistic to render parts of a bullet's path than to render just a bullet. After all, you can't see the bullet travelling along in real life! Just take a look at modern games such as Counter Strike Source.

Although if you game engine runs as 10000fps then perhaps you could get away with it I suppose...
"In order to understand recursion, you must first understand recursion."
My website dedicated to sorting algorithms
Well, it depends on whether the bullets have tracers or not.. I want to 'blur' bullets (draw them several times like the sparks example in the SDK). The bullets aren't for pistols or anything either, they're for space ships so they should have some sort of special effect:p
For me, billboards are faster than point sprites because I use the same style of billboard for other elements in the game (explosion particles, HUD etc). DirectX9 can render textured points, so they can be the same as billboards (I think this is a hardware driven feature). Trying both and doing speed tests won't take long. Set up a test and give both a try. It would be interesting to see which is faster.

Pixel sized point sprites seem pointless (pardon the pun) to me because they're not resolution independent. Tiny ones might vanish or flicker. I think that's why I subconsciously feel bad about point sprites!

Mark
Ever wanted to command a starship?
http://www.lostinflatspace.com
Ok, I just whipped up a quick test:

My results:
Point sprites with VB locking/unlocking: ~1.24mspf (milliseconds per frame)

Sprites: ~1.07mspf

They were rendered with the same methods, same number of particles for each.

So I guess sprites are faster in the long run, at least according to my results.

This topic is closed to new replies.

Advertisement