Transform Matrix from 3ds max to right-handed
Posted 22 July 2006 - 03:46 AM
I know how to do this by manipulating each vertex manually, but how can I do it with a matrix?
Thanks a lot!
Posted 22 July 2006 - 04:47 AM
<1, 0, 0> (in 3DS Max) --> <1, 0, 0> in your coordinates
<0, 1, 0> --> <0, 0, -1>
<0, 0, 1> --> <0, 1, 0>
So the appropriate matrix would be
[ 1 0 0 ]
[ 0 0 1 ]
[ 0 -1 0 ]
Posted 24 July 2006 - 05:41 PM
The matrix you are using is not good. It will just interchange y and z, which is not good (it's a reflection, and that's why you had to reverse the face vertex order)
And by the way, the usual standard is: x axis points left, y axis points up, z points forward.
Posted 24 July 2006 - 10:37 PM
That doesn't sound like the standard coordinate system to me...I think SnprBob86 has it right. x -> right, y -> up, z -> backward for OpenGL (the camera points along the negative z axis in eye space). Direct3D uses a left-handed system that has x -> right, y -> up, and z -> forward.
So, SnprBob86's matrix is correct for D3D, as long as he hasn't set up D3D's projection matrix to flip the Z axis (as some people do, to get a right-handed system in D3D).
Posted 25 July 2006 - 02:27 PM
Well, it depends. From the camera's point of view, you are right. But usualy, objects, especially characters, are modeled with their z axis pointing towards. That was the case everywhere I worked. You just have to take the z axis of the object to know in which direction it's facing. But well, maybe that's not the standard, but it's probably more convenient for AI.
He explicitely wanted a right handed system, so he's obviously wrong!
Posted 21 November 2008 - 01:16 AM
That is true for the UI and for MaxScript. But you need to be careful about how you are accessing the values. This is taken from MaxScript Help Doc:
Rotation in the internal transformation matrices is left-handed in contradiction to the 3ds Max user interface and MAXScript. Take care when mixing rotation derived from these matrices and rotation used in rotation-related functions or from rotation properties.
Posted 21 November 2008 - 02:32 AM
These threads come up on google searches. I won't be the last person to visit them. I'll leave a trail for those who come after me.
BTW, Here's an awesome page that demistifies all the confusion between the way matrices are stored and translated in OpenGL vs. DirectX.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users