Bilboarding?

Started by
3 comments, last by KulSeran 19 years, 7 months ago
I've seen many a time the explination of: Grab the Up and Right vector from the camera... draw the sqaure using those. But that looks wrong to say the least. When you are standing still, and look around the bilboard tilts with the looking. So, how can you generate a bilboard that is always in the plane purpendicular to the line from the camera center to the object center, and having nothing to do with the direction the camera is facing?
Advertisement
Hmm.. something like:

facingVector = cameraPos - billboardPos;upVector = (0, 1, 0); // global uprightVector = facingVector.cross(upVector);// up and right give billboard edges.// Generates 'cylindrical' billboards, all using global up (good for trees)// For spherical (totally facing camera):upVector = rightVector.cross(facingVector); // and overwrite old up.


That should (hopefully) do the trick. [grin]
Look at ARB_point_sprite.
I can recommend this tutorial for all kinds of billboards.
cool, thanks orangytang, that was what I was looking for

[edit] Looked at the tutorial. Also very helpful

This topic is closed to new replies.

Advertisement