Archived

This topic is now archived and is closed to further replies.

Rotating particles toward camera?

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

I am looking into making myself a particle engine (I am using DirectX 8, which I already have done some work with). I have one question: How do I rotate my particles toward the camera? Are there any tutorials out there on using pointsprites?

Share this post


Link to post
Share on other sites
I am not sure that it will be the same for DirectX8 because of some of the calls there. Thanks for the link though.

Share this post


Link to post
Share on other sites
You might not want to rotate the particle triangle towards the camera but calculate the particle position in screen space and define the triangle with simple plus and minus ops based on the distance of the point.

This way you''d had to transform three times less coordinates but on the down side you couldn''t use hardware TnL.

You could also check the DX8 point sprites which can be pretty simple to use and efficient. They''d be splendid if they could be rotated.. :/

Didn''t answer your question in any form, see?-)

Share this post


Link to post
Share on other sites
I don't suppose there are any tutorials on pointsprites out there? Aren't they rotated toward the camera? I am looking into making a simple particle engine, something that looks about like the pointsprite sample in the DX8SDK.

Edited by - Moe on April 11, 2001 11:16:49 AM

Share this post


Link to post
Share on other sites
quote:
Original post by Moe

I don''t suppose there are any tutorials on pointsprites out there? Aren''t they rotated toward the camera? I am looking into making a simple particle engine, something that looks about like the pointsprite sample in the DX8SDK.

Edited by - Moe on April 11, 2001 11:16:49 AM


No, the point sprites are just sprites/bitmaps in 3d-space, just like good old Doom characters. Therefore they don''t need to be rotated, or its more like they can''t be rotated

Drawing point sprites doesn''t really differ from drawing a simple D3DPT_POINTLIST. You just set some render states (D3DRS_POINTSPRITEENABLE, D3DRS_POINTSIZE as I remember) accordingly.

There''s a chaper on point sprites on dx8sdk documentation.

Share this post


Link to post
Share on other sites
Yeah, thanks!

I just dug around that sample program in the SDK and the only things I found about pointsprites were just some state changes. This is good! It looks like I won''t have to re-write my partially started particle engine!

Share this post


Link to post
Share on other sites