# 3ds max exporter right handed problem

This topic is 4897 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

i am creating a 3d Studio Max Exporter to a custom file, however the problem that I am having is that 3DS Max is right handed and My engine is left handed. How do convert from right to left handed? Is it a simple matrix multiplication? thanks in advance, ~guyaton

##### Share on other sites
Invert the Z and X axis like this X = -X;

Tjaalie,

##### Share on other sites
It will still be right handed if we invert both x and z. In my understanding, we should invert only one of them. Or by multiplying matrix

1 0 0
0 1 0
0 0 -1 to invert z

Quote:
 Original post by TjaalieInvert the Z and X axis like this X = -X;Tjaalie,

##### Share on other sites
All you have to do is swap the Y and the Z position.
(i.e)

(X,Y,Z) = (X,Z,Y)

Hope this helps

##### Share on other sites
Trust me, the mentioned suggestions don't work ... I think I've tried all vector/matrix conversations outthere. The problem is that the matrices hold scale information which cannot be demangled once it's in the matrix.

Instead (and this is the answer I looked all around for!!) you should use the IGame API calls. There's plenty of information on it in the 3ds max SDK. You simply specify which API (OpenGL/DX/User) you want the coordinates to be in, and it's automatically computed for you!

##### Share on other sites
Quote:
 Original post by AmmaTrust me, the mentioned suggestions don't work ... I think I've tried all vector/matrix conversations outthere. The problem is that the matrices hold scale information which cannot be demangled once it's in the matrix.Instead (and this is the answer I looked all around for!!) you should use the IGame API calls. There's plenty of information on it in the 3ds max SDK. You simply specify which API (OpenGL/DX/User) you want the coordinates to be in, and it's automatically computed for you!

Im not to sure about his exact problem and im far,far far from being an expert, however the solution I posted was an answer that i recieved from someone for my particular problem.

My problem was i needed to export camera locations from 3ds max into my game engine (dx9), and swapping the y and z values did indeed work, for atleast that problem.

##### Share on other sites
Quaternions in Max are left handed. If you try to invert them because you think they're right handed, your rotations will be backwards. Also you will probably need to reverse the winding order of your triangles.

so

1) Don't invert the rotation coming out of Max, because it's already left handed.

2) reverse the winding order of the triangles if your mesh appears inside out.

3) probably need to invert one of the axis.

##### Share on other sites
I would very much like a definitive answer for this as well. I'm using another exporter that simply dumps everything the way MAX represents it. This gives me position, scale and rotational data for vertex and normals that need to be converted to DX/OpenGL coordinates, and I still haven't managed to get this to work perfectly, even after trying for WEEKS. It seems a rotation is somehow needed to get everything right, but I can't figure it out.

If someone with a stronger math background than I can provide some insight into what kind of transformations need to be done to get the data into OpenGL and DirectX, I would most appreciate it. Since DX and OpenGL use different coordinate systems, different transformations are needed for them.

##### Share on other sites
Quote:
 Original post by Bitem2kAll you have to do is swap the Y and the Z position.(i.e)(X,Y,Z) = (X,Z,Y)Hope this helps

Wouldn't you have to invert one of them too?

(X,Y,Z) = (X,Z,-Y)

or

(X,Y,Z) = (X,-Z, Y)

I could be wrong, but I thought thats how it worked.

##### Share on other sites
Questions for Amma: how do I use it, if the entire Interface (IGameConversionManager) is purely virtual? How do I use/implement IConversionManager?

thanks,

~guyaton

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 27
• 16
• 10
• 10
• 11
• ### Forum Statistics

• Total Topics
634101
• Total Posts
3015529
×