Open roxlu opened 8 years ago
Quake convention is that quaternions are always represented with -w.
On Wed, Jan 20, 2016 at 5:44 PM, @roxlu notifications@github.com wrote:
I'm not sure if this is an issue; it probably isn't but I'm trying to find out a certain value that I get from a very simple model. When I create a cube and one bone which points up into the (blender) Z-axis the rotation value I read from the .iqm file is -0.71, -0.00, -0.00, -0.71. This looks like a rotation about the X axis but a +90º rotation should be: 0.707107, 0.000000, 0.000000, 0.707107 and a -90º rotation should be -0.707107, -0.000000, -0.000000, 0.707107. Maybe I'm lacking some quaternion know-how, or maybe it's a different rotation. Could you maybe clarify this?
This is the model I'm using:
— Reply to this email directly or view it on GitHub https://github.com/lsalzman/iqm/issues/19.
Thanks lsalzman, do you maybe know if a -w has a special meaning regarding rotations? (sorry I guess I'm lacking some quaternion-know-how)?
And so... the -0.71, -0.00, -0.00, -0.71
I read from the .iqm file that I created from the bone as shown in the image, is a -90º rotation arount the X-axis. I'm wondering why it's a negative rotation instead of a positive?
Thanks!
For posterity, the reason behind this is that Blender bones are oriented along the Y Axis, not the Z axis. A bone pointing straight up must thus be rotated about the X axis to be oriented straight up and down. Turning on the axis display under Armature > Viewport Display
will display a set of axes at the origin of each bone which may help with debugging.
Negating all components of the quaternion has no effect on the rotation as there are two quaternions that redundantly describe each unique orientation. Just a side effect of the mathemagical SU(2) double covering of SO(3).
I'm not sure if this is an issue; it probably isn't but I'm trying to find out a certain value that I get from a very simple model. When I create a cube and one bone which points up into the (blender) Z-axis the rotation value I read from the .iqm file is
-0.71, -0.00, -0.00, -0.71
. This looks like a rotation about the X axis but a +90º rotation should be:0.707107, 0.000000, 0.000000, 0.707107
and a -90º rotation should be-0.707107, -0.000000, -0.000000, 0.707107
. Maybe I'm lacking some quaternion know-how, or maybe it's a different rotation. Could you maybe clarify this?This is the model I'm using: