Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meaning of rotation value for a bone pointing up? #19

Open
roxlu opened this issue Jan 20, 2016 · 3 comments
Open

Meaning of rotation value for a bone pointing up? #19

roxlu opened this issue Jan 20, 2016 · 3 comments

Comments

@roxlu
Copy link

roxlu commented Jan 20, 2016

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:

@lsalzman
Copy link
Owner

Quake convention is that quaternions are always represented with -w.

On Wed, Jan 20, 2016 at 5:44 PM, @roxlu [email protected] 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:

https://camo.githubusercontent.com/82e9bb75d2b5d1b7b4a4ac2741c5eeeaf7a21385/687474703a2f2f692e696d6775722e636f6d2f5268656e7135362e706e67


Reply to this email directly or view it on GitHub
#19.

@roxlu
Copy link
Author

roxlu commented Jan 20, 2016

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!

@z-adams
Copy link

z-adams commented Jun 23, 2021

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants