Hi. I'm working on the Blender exporter and I'm stuck on the following math problem. I have spent MANY HOURS searching the Internet and searching my college math books, and can't find the answer.
I need to duplicate a -90 degree rotation transformation that is done on a rotation matrix. Here is my debug showing the euler and quaternion Source and Target values: ("EULER:" and "QUAT:" are just different forms of the same value; same for "WS EULER" and "WS QUAT". Details below.)
EULER:[-0.465659, 0.517466, 0.444048](euler)
QUAT:[0.999974, -0.004081, 0.004500, 0.003893](quaternion)
WS EULER:[-2.267587, 0.382622, -0.562424](euler)
WS QUAT:[0.999787, -0.019770, 0.003435, -0.004841](quaternion)
There is definitely an operation to do this transformatoin, because a -90-degree-rotation-only parent node causes the transformation shown from the local EULER/QUAT value to the worldspace WS EULER/WS QUAT value, but everything I try fails.
Some of the many things I have tried:
+ Multiplying the -90-degree-rotation-matrix by the first value just adds -90 degress to the euler X axis value
+ I've tried rotating just the axis element (x/y/z) of the target rotation matrix
+ I've made a unit vector out of the target rotatoin matrix and rotated that
+ I can't multiply 2 quaternions made from the -90 rot + target-rot, because my API doesn't have a quat X quat operation.
Maybe I need to back out the translation from the target rotation before doing my -90 degree rotation... somehow?
If somebody out there likes working math problems, I can provide you with the Blender source file where you can view the 2 nodes and interactively change and view the parameters and results.