Transforming a 4x4 matrix from one base to another

  • Thread starter Thread starter AdrianM
  • Start date Start date
  • Tags Tags
    Base Matrix
AdrianM
Messages
2
Reaction score
0
I'm writing an exporter for 3d studio max and i want to export skeletal animation. 3D studio max uses a coordinate system that has the X axis going from left to right, the Z Axis going from bottom to top and the Y axis going from front to back. Opengl uses a left handed coordinate system, whilst 3d max uses a right handed coordinate system. OpenGL's X axis goes from left to right, Y goes from bottom to top and Z goes from back to front.

I want to convert a 3d studio max matrix to use it with OpenGL. Matrices hold transformation information. How can i accomplish this?
 
Physics news on Phys.org
AdrianM said:
I'm writing an exporter for 3d studio max and i want to export skeletal animation. 3D studio max uses a coordinate system that has the X axis going from left to right, the Z Axis going from bottom to top and the Y axis going from front to back. Opengl uses a left handed coordinate system, whilst 3d max uses a right handed coordinate system. OpenGL's X axis goes from left to right, Y goes from bottom to top and Z goes from back to front.

I want to convert a 3d studio max matrix to use it with OpenGL. Matrices hold transformation information. How can i accomplish this?
Sounds to me like (x, y, z) in 3D studio max goes to (-x, z, y) in OpenGL. The matrix
\left[\begin{array}{ccc}-1 & 0 & 0 \\ 0 & 0 & 1\\ 0 & 1 & 0\end{array}\right]
will do that.

That matrix happens to have the nice property that it is its own inverse (because the inverse of changing x to -x is changing x to -x and the inverse of swapping y and z is to swap y and z) so you can also use it to change coord systems the other way.
 
HallsofIvy said:
Sounds to me like (x, y, z) in 3D studio max goes to (-x, z, y) in OpenGL. The matrix
\left[\begin{array}{ccc}-1 & 0 & 0 \\ 0 & 0 & 1\\ 0 & 1 & 0\end{array}\right]
will do that.

That matrix happens to have the nice property that it is its own inverse (because the inverse of changing x to -x is changing x to -x and the inverse of swapping y and z is to swap y and z) so you can also use it to change coord systems the other way.

I think i don't know where -X is coming from. In the phase where i load the static model i convert every 3d studio max point from (x,y,z) to (x,z,-y) and it works fine. 3D studio max uses 4x4 matrices that contain on the last row a translation component. I tried converting a 3d studio max matrix into an opengl in quite a few ways but i had no luck :confused:. So your matrix indeed converts a point from (x,yz) to (-x,z,y), which is not what I'm doing. What I'm interested though is how to convert a 4x4 row major 3ds matrix into a 4x4 column major ogl matrix.
 
My fault. I misread and thought OpenGL's x-axis went from right to left! The correct matrix is
\left[\begin{array}{ccc}1 & 0 & 0 \\ 0 & 0 & 1\\ 0 & 1 & 0\end{array}\right]
 
Thread 'Determine whether ##125## is a unit in ##\mathbb{Z_471}##'
This is the question, I understand the concept, in ##\mathbb{Z_n}## an element is a is a unit if and only if gcd( a,n) =1. My understanding of backwards substitution, ... i have using Euclidean algorithm, ##471 = 3⋅121 + 108## ##121 = 1⋅108 + 13## ##108 =8⋅13+4## ##13=3⋅4+1## ##4=4⋅1+0## using back-substitution, ##1=13-3⋅4## ##=(121-1⋅108)-3(108-8⋅13)## ... ##= 121-(471-3⋅121)-3⋅471+9⋅121+24⋅121-24(471-3⋅121## ##=121-471+3⋅121-3⋅471+9⋅121+24⋅121-24⋅471+72⋅121##...
##\textbf{Exercise 10}:## I came across the following solution online: Questions: 1. When the author states in "that ring (not sure if he is referring to ##R## or ##R/\mathfrak{p}##, but I am guessing the later) ##x_n x_{n+1}=0## for all odd $n$ and ##x_{n+1}## is invertible, so that ##x_n=0##" 2. How does ##x_nx_{n+1}=0## implies that ##x_{n+1}## is invertible and ##x_n=0##. I mean if the quotient ring ##R/\mathfrak{p}## is an integral domain, and ##x_{n+1}## is invertible then...
The following are taken from the two sources, 1) from this online page and the book An Introduction to Module Theory by: Ibrahim Assem, Flavio U. Coelho. In the Abelian Categories chapter in the module theory text on page 157, right after presenting IV.2.21 Definition, the authors states "Image and coimage may or may not exist, but if they do, then they are unique up to isomorphism (because so are kernels and cokernels). Also in the reference url page above, the authors present two...
Back
Top