I’m trying to Billboard some quads in a viewer that uses an orthographic projection. I’ve been through the tutorial by Antonio at Lithhouse and have tried the Cylindrical Cheat as well as True Cylinfrical methods and can’t make them work.
The cheat does keep the quads facing the camera but their position is static and won’t change as you rotate the scene.
The true method rotates the quads but their orientation doesn’t change.
Is my problem the ortho projection or does it have to do with the way my ModelView matrix is being formed?
I’m not using glRotate but instead calculate a rotation matrix based on the viewing direction in the XZ plane, a tilt matrix and then multiply and load.
Too make it a bit more difficult I add in scaling and translation in local coordinates and world coordinates. I’ve eliminated them for my test data but I won’t be able to do this with real data.
If I were starting over I’d probably do it differently but its worked very well so far.
Mitch, store your billboards as a single point and a size. Dont store the actual vertices of them. After you set up the modelview matrix for your camera, you take the point, and just add the size along the x and y planes to get the vertices.