Rotating particles toward camera?
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?
I am not sure that it will be the same for DirectX8 because of some of the calls there. Thanks for the link though.
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?-)
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?-)
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
Edited by - Moe on April 11, 2001 11:16:49 AM
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement