Billboard in left-hand coordinate system

Started by
1 comment, last by SeikoTheNoob 15 years, 2 months ago
I'm pretty new with openGL and all the 3D stuff and never been good with geometry even in 2D so my question might seems stupid. Seems the program I'm working with is using a left-hand coordinate system. So the result is of course no good. I don't really know how to change everything to match a left-hand coordinate system. Should it be a sign change somewhere? Also if it's only that, should I have a billboard facing a direction, but just not the good one? Because the result I got is worst then that! Thank you very much!
Advertisement
In general conversion between left-handedness and right-handedness means to mirror an axis. The operation is a multiplication with a matrix that inverts the axis, e.g. build from a non-uniform scaling matrix
S(1,1,-1)
which means to scale the x and y axes by 1 (i.e. doing nothing) but the z axis by -1 (i.e. to invert it). The corresponding OpenGL invocation is
glScalef(1,1-1);

If all the world should be left-handed it would be sufficient to use this matrix as the very first matrix on OpenGL's MODELVIEW matrix stack when initializing rendering. If the world is right-handed but imported models are not, or imported animations are not, then the things become a bit more complicated. Furthurmore, the "program" you mention may have another assigment of the x,y,z axes, too, so an additional rotation may be needed. Perhaps you need the mirroring about another axis than z. Perhaps ...

So the problem is required to be investigated in more detail if the above principle description isn't sufficient for you. Then start e.g. with the assigment of the up, forward, and side vectors to the x, y, and z vectors in both the program and the wanted set-up.
thank you very much!

This topic is closed to new replies.

Advertisement