Jump to content
  • Advertisement
Sign in to follow this  
31337noob

help with sprites

This topic is 4121 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

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
Advertisement
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
well, individual. i have a for loop that renders each particle.

what is a better way then.....using sprites and not vertices?

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!