Billboards

Started by
3 comments, last by DrunkenHyena 19 years, 3 months ago
I'm putting explosions into a game using 3D billboards, and it seems pretty inefficient at the moment, especially when i have about 50-100 of these little explosions on screen at once, since i have to make it calculate stuff, rotate and draw a rectangular mesh every time i want it to display it. And I can't use frames in one big bitmap to animate the explosion. So I'm wondering whether it's possible to do this with D3DXSprite instead. The only problem is working out where on the screen it should be, since I can't tell direct3d to give me the screen co-ords of a certain point in space. So if anyone has a clue how i might do this with sprites please let me know... Thanks
Advertisement
Have you looked at Hardware Point Sprites? I think this is what you need.
If you pass the Object Space flag to D3DXSprite your billboards are no different than the rest of the objects in your scene. Sprites aren't just 2D.
Stay Casual,KenDrunken Hyena
How do i pass a flag to the sprite? I can't see any function where i can do that...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/reference/d3dx/interfaces/ID3DXSprite/Begin.asp
Stay Casual,KenDrunken Hyena

This topic is closed to new replies.

Advertisement