## billboarding techniques

ghettotek
Unregistered

Post: #1
does anybody have any examples or can anybody explain how to achieve the billboarding effect. im implementing a particle system based on 2D polygons, and i figured the best way to keep things fast is to keep the polygons facing the viewport (billboard effect, instead of perhaps drawing several polygons at different angles for each particle). all the tutorials i find involve blending and whatnot, which i find odd; shouldnt this be more of a math thing? thanks.
lpetrich
Unregistered

Post: #2
I've had the same problem of billboard support for the Aleph One project; I'm the one that implemented OpenGL support for the Marathon engine. I've had to create the following transformation matrices:

World-to-eye
Eye-to-screen
Screen-to-clip

World means the game world's coordinates.

Eye means those coordinates with the viewpoint at the origin and with the axes along directions related to one's view (x = along screen x, y = along screen y, z = perpendicular depth).

Screen means the first two coordinates (x,y) mapping onto a pixel position.

Clip means the final result: coordinates inside of the default clipping box of (-1,1) in all three dimensions.

For doing a billboard, here is what you can do:

Take its world-coordinate position and do world-to-eye.

From its eye-coordinate position, do appropriate amounts of displacement in the view-vector-perpendicular coordinates (not in the depth coordinate!), and use the displaced points to construct the vertices.