transform at export to Unity facing incorrectly

transform at export to Unity facing incorrectly

Anonymous
Not applicable
8,805 Views
9 Replies
Message 1 of 10

transform at export to Unity facing incorrectly

Anonymous
Not applicable

Hi, 

 

I set the z-axis facing to the front of a model but at export in Unity it shows facing in a different direction.

 

Regardless where I set the axis at Maya, the transform faces differently at Unity (blue also forwards at Unity).

 

Can you please help?

Thank you, Sergio

Maya View before exportMaya View before exportUnity view after exportUnity view after export

0 Likes
Accepted solutions (1)
8,806 Views
9 Replies
Replies (9)
Message 2 of 10

Its_jay
Advocate
Advocate

is your Up direction in maya is (Y) axis

0 Likes
Message 3 of 10

tony.su
Autodesk Support
Autodesk Support

There is a description in Unity help.

 

https://docs.unity3d.com/550/Documentation/Manual/HOWTO-ImportObjectMaya.html

https://docs.unity3d.com/Manual/HOWTO-exportFBX.html

 

This is an example.

 

FBX_A

FBX_B



Tony Su
Product Support
0 Likes
Message 4 of 10

Anonymous
Not applicable

Hi Tony

 

Thank you for the link you've provided and apologies for my late response, with December festivities I didn't get a chance to log back in.

 

Unity also uses Y as up vector, so changing Z for up does not solve it. The problem I have as shown in the pictures I posted is that Z is looking backwards.

 

Any other ideas please? 

 

Thank you! Sergio

0 Likes
Message 5 of 10

mspeer
Consultant
Consultant

Hi!

 

Check scaling.

Avoid having scale on your Transform node. If you don't really need it, all Scale values of a Transform node should be [1 1 1].
Select all Components (like Vertices or Faces) and scale them for modeling or use Freeze Transformations ("Scale") after you scaled the object with a global scale.

 

For further help, please upload a scene-file.

0 Likes
Message 6 of 10

Anonymous
Not applicable

Hi mspeer, thank you for your guidance. The transform was not scaled, scale is 1.1.1. In case also froze transform-scale as suggested.

 

Z-axis problem facing backwards when exported into Unity persists when exporting the model into Unity.

 

Attached maya scene with model. Here's git's Unity project/scene https://github.com/sergiosolorzano/Unity-MayaTransformDiscussion.git

 

Thank you for your help.

 

Cheers, Sergio

0 Likes
Message 7 of 10

mspeer
Consultant
Consultant

Hi!

 

I just opened your scene, also facing backwards.

 

 

direction.gif

 

 

 

1. Get rid of unnecessary stuff inside your scene (a lot of empty transform nodes).

 

2. Check your Tool Settings.

 

3. Try a reset of your preferences.
Rename the folder prefs in folder 2018 to something like prefs_backup, or to reset everything, the folder 2018 to 2018_backup (or even the maya folder to maya_backup). Maya creates new folders (don't copy preferences from previous Maya versions). Detailed at:
https://knowledge.autodesk.com/support/maya/troubleshooting/caas/sfdcarticles/sfdcarticles/Reset-May...

 

 

0 Likes
Message 8 of 10

Anonymous
Not applicable

Hi mspeer,

 

Thank you for your message!

 

I have deleted the empty transforms and renamed prefs.

 

After renaming prefs Maya won't let me change the orientation of the axis - after I click away from the model the axis revert back to original. I am pressing D+rotating the axis. Here's a vid: https://youtu.be/Hr_e9RJrIXI

 

I tried this in a new separate scene with renamed prefs but the problem persists.

 

Before renaming prefs, Maya allowed me to change the orientation of the axis and the change persisted as long as the session was opened. However, when saving and closing and re-opening the scene, the axis faced backwards again. I also tried this in a new separate scene with old prefs but the problem persists.

 

What am I getting wrong?

 

Thank you for your help, Sergio

 

 

 

 

0 Likes
Message 9 of 10

mspeer
Consultant
Consultant
Accepted solution

Hi!

 

You forgot Bake Pivot.

 

But why not just simply select all components (faces or vertices) and just rotate them by exact (with step snap) 180 degree.

Correct object orientation and correct orientation in scene (world orientation) with one action.

Message 10 of 10

i48
Explorer
Explorer

when I 1.rotate the pivot and 2.do bake pivot then, our rotate coordinates of the object do change for 90(so my post imported model looks the same), if I tried to reset transformation, the model is turning to zero rotate position, how can I change those axis directions without rotate that fkn model??

0 Likes