Followers 0

# Extract vectors out of matrix?

## 4 posts in this topic

Hello!

I am wondering, if anyone is capable, to solve thi issue:

I have the following matrix:

          -0.8454   -0.5298   -0.0682    0.0000
0.1796   -0.4020    0.8978    0.0000
0.5031   -0.7468   -0.4350    0.0000
-24.6733  -18.6587   -0.1653    1.0000

I need to extract: translation, rotation (euler angles) and scale out of this matrix.

So basically I need:

Vector3 translation, rotation, scale;

Out of the above vectors, I should be able to reconstruct the upper matrix.

Even if not 100% equal, it should meet the following condition:

When a vector3 [ 1.0, 2.0, 3.0 ] is transformed over the matrix,

we should get a vector3 with following values: [ -23.6501,  -22.2328,    0.2572]

0

##### Share on other sites
The translation is the bottom row. The rotation is the 3x3 matrix just above it. In this case no scaling is necessary because the matrix is a rotation (when multiplied by its transpose you get the identity matrix).

How exactly do you need to represent the rotation?
0

##### Share on other sites

Hi!

I need it for the FBX SDK. I am writing a converter where I get the "local matrices" out of the file and need to

pass them to FBX as euler angles (yaw, pitch and roll). I am not looking for Axis angles (OpenGL), nor

am I looking for a quaternion, i need yaw, pitch and roll representation.

The FBX SDK has an affine matrix, but I does not decompose the upper matrix correctly. The rotation

is allways wrong. I think it has to to with the north/south pole issues, because, all matrices fail

that have any rotation (x,z,y or yaw,pitch,roll) near 90 or 180 degrees.

0

##### Share on other sites
Converting a rotation from matrix representation to Euler angles is the kind of thing you can easily learn from Google.
0

## Create an account

Register a new account

Followers 0

• 11
• 19
• 14
• 23
• 11