Sign in to follow this  
KulSeran

Bilboarding?

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Hmm.. something like:

facingVector = cameraPos - billboardPos;
upVector = (0, 1, 0); // global up
rightVector = 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]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this