Sign in to follow this  
31337noob

help with sprites

Recommended Posts

hi, is there a tutorial anywhere on the internet that shows you how to use sprites in the 3d world (D3DXSPRITE_BILLBOARD). I cant find one. the reason why is because i am making a particle system and i want to use the z coordinates. If i get rid of the option D3DXSPRITE_BILLBOARD, my particle system works in the x,y coordinates, but as soon as i add D3DXSPRITE_BILLBOARD and i give my particles to use z, my particles are not visible anymore. And yes i know if i get rid of D3DXSPRITE_BILLBOARD x,y is window screen coordinates and as soon as i add D3DXSPRITE_BILLBOARD its 3d world coordinates. just so we are clear. please help me. [Edited by - 31337noob on March 11, 2007 3:44:26 PM]

Share this post


Link to post
Share on other sites
Are you calling setTransform() on the sprite when you attempt to billboard with it? If you leave out the D3DXSPRITE_BILLBOARD flag, the ID3DXSPRITE will automatically setup a reasonable transform for drawing sprites in screen space.

If you add the D3DXSPRITE_BILLBOARD flag, i'm not sure what it does to the transform, but it certainly won't set it up for screen space. Try setting it to identity and start from there (look at the origin to see if your sprites show up there).

turtle

Share this post


Link to post
Share on other sites
anyways, that didn't work, the sprites are still invisible.

please help...

here is a another question?
by the way, why is my particle system slow.....when there is 1000 particles, i get 28 FPS...i am using vectors and sprites. are vectors that slow? or is sprites that slow in rendering? particles systems are not supposed to bog down the game.

Share this post


Link to post
Share on other sites
Are you rendering the sprites individually or together? That makes a BIG difference.

[Edited by - gharen2 on March 12, 2007 12:34:13 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this