Skip to main content
gamedev.net
🔒 Locked

Particle Rendering

Started by CastorX 3 replies 450+ views
Original Post
CastorX
CastorX
HY! I have another question. I want to render a particle system (smoke, explosions, fire of a rocket engine). But if i draw my alpha-textured quads, they ar not rotated to the camera, from some direction i see only a line, or a "flat" Quad. So, how can i build a TransformationMatrix, with i can rotate the quad to the camera? My quad is origialy on the X-Y plane. !!!The position of the camera, and the quad are given. !!! And if i rotate the camera directly on the the Z axis, and i see front a quad, the quad must NOT to rotate with te camera, becouse i want more realistic scene. Huh That's all folks! (I want to use NO "PointStripes") :) THX
CyberSlag5k
CyberSlag5k
The technique you are describing is called billboarding. You might find this useful.

Good luck!
Without order nothing can exist - without chaos nothing can evolve.
Supernat02
Supernat02
The ID3DXSprite interface should do the trick, if you have the latest SDK. Just call:

pSprite->SetWorldViewLH(&mWorld, &mView);
pSprite->Begin(D3DXSPRITE_BILLBOARD);

The first function sets your current world and view matrix and the second initiates rendering of a billboarded sprite.

Of course, you have to call pSprite->Draw(...) and pSprite->End() but that should be easy enough to find information on.

Good luck.
Chris ByersMicrosoft DirectX MVP - 2005
CastorX
CastorX
Thank You! The NeHe article is perfect for me!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.