Jump to content
  • Advertisement
Sign in to follow this  
MikeyO

Rendering bullets

This topic is 4887 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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 ;)

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!