Skip to main content
GameDev.net gamedev.net
🔒 Locked

Billboards

Started by Thrawn80 Feb 1, 2007 at 11:40 PM 1 replies 550+ views
Original Post
Thrawn80
Thrawn80
Hi all, I managed to come up with my textured quad on untransformed 3D space.. However, my textured quads are created to face the -Z axis (ie facing the camera at origin) I know that billboards are actually textured quads that faces the player all the time ... May I ask, how can I achieve this? Do I rotate the textured quads in the opposite direction of the camera every frame? Please advise. Thanks, thrawn80
You'll never see heaven if you haven't been through hell.
Sc4Freak
Sc4Freak
Yep, I think all it involves is using the inverse of the view matrix as the quad's world matrix.
Schrompf
Schrompf
I suggest using a vertex shader to transform vertices to camera space, then "unfold" them to a billboard by a simple addition and transform them further as usual. Depends on wether you are using shaders at all, but you can save a lot of CPU time by using this method.

Bye, Thomas
----------
Gonna try that "Indie" stuff I keep hearing about. Let's start with Splatter.

Topic Locked

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

Sign in to reply to this topic.