Jump to content
  • Advertisement
Sign in to follow this  
guyaton

3ds max exporter right handed problem

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 Tjaalie
Invert the Z and X axis like this X = -X;

Tjaalie,


Share this post


Link to post
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 this post


Link to post
Share on other sites
Quote:
Original post by Amma
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!



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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
Quote:
Original post by Bitem2k
All 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 this post


Link to post
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!