Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualBobXIV

Posted 14 October 2012 - 01:40 AM

Hi guys, I’m having problems with an animation that uses quaternions. The problem is that the bones are given to me in the form of quaternions such that:
1) The system is right handed.
2) In particular the example of bone I want to resolve is this:
Posted ImagePosted Image

In my game the corresponding bone frame of reference is left handed. In particular it is:
Posted ImagePosted Image

So the map would be:

from = +Y along arm, +X right, +Z forward
to = -X along arm, -Z right, -Y forward

In resume my problems are:
* The quaternion of the rotation is in a left hand system
* My system is right handed and with different axis


Watching an example I found that the change in the quaternion seems to be:
Where originalRotation is the rotation in the right hand system
myRotation is the rotation in my axis

Quaternion myRotation = new Quaternion(-originalRotation.y, originalRotation.z, originalRotation.x, originalRotation.w);


This seems to work... but I don’t know how to get there.... it is a change of frame of reference with quaternion with a handness change...
Thanks in avance

#2BobXIV

Posted 14 October 2012 - 01:39 AM

Hi guys, I’m having problems with an animation that uses quaternions. The problem is that the bones are given to me in the form of quaternions such that:
1) The system is right handed.
2) In particular the example of bone I want to resolve is this:
Posted ImagePosted Image

In my game the corresponding bone frame of reference is left handed. In particular it is:
Posted ImagePosted Image

So the map would be:

from = +Y along arm, +X right, +Z forward
to = -X along arm, -Z right, -Y forward

In resume my problems are:
* The quaternion of the rotation is in a left hand system
* My system is right handed and with different axis


Watching an example I found that the change in the quaternion seems to be:
Where originalRotation is the rotation in the right hand system
myRotation is the rotation in my axis

Quaternion myRotation = new Quaternion(-originalRotation.y, originalRotation.z, originalRotation.x, originalRotation.w);


This seems to work... but I don’t know how to get there.... it is a change of frame of reference with quaternion with a handness change...
Thanks in avance

#1BobXIV

Posted 14 October 2012 - 01:38 AM

Hi guys, I’m having problems with an animation that uses quaternions. The problem is that the bones are given to me in the form of quaternions such that:
1) The system is right handed.
2) In particular the example of bone I want to resolve is this:
Posted ImagePosted Image

In my game the corresponding bone frame of reference is left handed. In particular it is:
Posted ImagePosted Image

So the map would be:

from = +Y along arm, +X right, +Z forward
to = -X along arm, -Z right, -Y forward

In resume my problems are:
* The quaternion of the rotation is in a left hand system
* My system is right handed and with different axis


Watching an example I found that the change in the quaternion seems to be:
Where originalRotation is the rotation in the right hand system
myRotation is the rotation in my axis

Quaternion myRotation = new Quaternion(-originalRotation.y, originalRotation.z, originalRotation.x, originalRotation.w);


This seems to work... but I don’t know how to get there.... it is a change of frame of reference with quaternion with a handness change...
Thanks in avance

PARTNERS