- Home /
Is there really no solution to get objects from Max into Unity with the EXACT same transforms ?
For my project I need to have the EXACT same positions and rotations in Unity as I have in Max. I have been delving in the forums and feedback and it seems a general annoyance. Did anyone come up with a REAL solution? Perhaps with AssetPostprocessor ?
Problems are:
Exporting from Max to FBX with 'Y-up' rotates objects around the X-axis.
If you pre-rotate in Max your Unity object wil have (0,0,0) rotation but your Max object will be (90,0,0).
X,Y,Z coordinates will switch and negate.
Navigation (rotation) in the viewport is almost impossible if you want to use Z as up.
I KNOW this because Max is right-handed and Unity left-handed but I just need some solution to fix these problems. Even if it means (a lot of) extra work.
(of course most of all I think it is something Unity should fix. Being not compatible with one of the market leaders should be something you really don't want.
So vote: http://feedback.unity3d.com/unity/all-categories/2/top/active/fbximporter-correct-orientation. )
There was an suggestion to freeze the transforms (it's gone now?). $$anonymous$$ax does have a Reset Xform modifier. That could be used to reset the pre-rotation in $$anonymous$$ax. But it would not solve the biggest problem: switched and inverted coordinates.
Answer by Ingen · Aug 15, 2012 at 04:21 PM
In the option of FBX Exporter set Y-Up, but I only ever copy the max file in asset, and never have problem... about axis :)
and please delete your answer, it isn't an answer, use add new comment or edit your question if you want update it, thanks
Answer by Joyrider · Aug 05, 2013 at 12:57 PM
Well like you said, Max and Unity use different coordinate systems, one being left handed, the other right handed, so it is inherently impossible to be exactly the same; the axes can never match... it is imho not about fixing. It's not an error or a bug. It's just the basis upon which both engines were build. And on top of that, both have a different understanding of the Y and Z axes. We've tried out a lot of stuff while developing our own production pipeline between max and Unity (ao a custom exporter/importer). And as far as I know, there always will be some differences.
Answer by Next Beat Games · Feb 24, 2015 at 05:05 AM
Ah yes this problem. I am happy to say I have finally figured this out. I have had the EXACT same issue. It turns out there are a few issues at play. I will eventually create a very clear and comprehensive explanation for this but for now, here are some notes:
Main issue: Unity uses a left handed coordinate system. Max & Maya use a right handed coordinate system.
A note about 3ds max: There is an issue when exporting to FBX from 3ds Max where children of the parent object are rotated 270 degrees about the x axis. There is no way around this - Don't use max to export to FBX if you wish to have objects and their children to be aligned properly! If you need to use MAX, export to FBX then import this max exported FBX into maya before exporting to your final FBX for importing into unity.
FYI: Unity doesn't look at the up axis property in an FBX. So, if you select either Y or Z during your fbx export in either maya or max, there will be no effect when importing your fbx into unity. Also, theres an option on maya (i believe max has it too) that allows you to specify the up axis. this is not a solution either. In fact, it just rotates the object.
There is a formula to convert from one coordinate system to another - flip, or mirror, one the axis (this is not simply a rotate!). However, you don't need to do this because there is some sort of conversion being done when unity imports an FBX. That exact transformation that takes place isn't important.
The solution: If you are starting out in maya, create your model in its proper, right handed orientation. If you are creating it in max. export to maya then orient your model in its proper, right handed orientation.
For example, if you have a person model in Maya, The person's face should be pointing forward in the Y+ axis direction, the right shoulder is pointing in the X+ axis direction, the top of the head should be pointing in the Z+ axis.
When you are ready to export:
Reset your transformation matrix: Select Modify->Freeze Transformations.
Apply a 180 degree rotation about the Z axis so your character is facing in the opposite direction. Then rotate the model by 90 degrees about the X axis.
Reset your transformation matrix again.
Import into Maya: you will experience a 270 degree rotation about the X axis on the parent object but thats ok since the children aren't affected. just reset it to 0.
Voila, your character will be properly oriented in the left handed coordinate system: z+ is forward, x+ is to the right, and y+ is upwards.
Your answer
Follow this Question
Related Questions
problems importing animations 0 Answers
exporting custom point/vertex attribute from Houdini to unity 0 Answers
Imported FBX from Google sketchup to unity has too many meshes, how to export/import properly? 1 Answer
import FBX files to unity not correct axis 1 Answer
Why is unity crashing when I import an FBX file exported from maya? 0 Answers