"Bake Axis Conversion" import setting

In the “Lean what’s new in Unity 2020.1 beta” talk at around 23:45 you mention the “Bake Axis Conversion”. The 2020.1 documentation unfortunately does not include an explanation for this new option yet.

Can I use this option to fix the orientation of a FBX exported from 3dsMax, which when imported in Unity, appears rotated around the x-axis by 90 degrees?

5904065--630188--upload_2020-5-27_9-41-13.png

2 Likes

Yes, that is exactly what it does, no more sideways previews no weird rotations.

3 Likes

There should be an option which axis to convert, though. I’ve got some fbx files which are normally on the side; with baked conversion it’s on the other side.

1 Like

Unity 2020 is apparently the year where Unity fixes all of those little things. It’s greatly appreciated @Vestergaard !

1 Like

Which program does the file come from, and can you share an fbx with me ?

I don’t know, it’s from the asset store. The ones I do myself are correctly… axed.

I can reproduce it with several models from several asset store sellers .
This model is from Unitys own “AssetStoreOriginals” (AsiaPacific, Air_Conditioning_A, I’ll send you a link)
If I take the model without axis baking and drag it into a scene, I’ll get a correctly done upright model:

If I use axis baking, I’ll get the following:

Disclaimer: The camera didn’t move (much), the model is rotated. And I still get the 90 degress x-axis rotation.
Completely reset to 0,0,0, the baked axis looks like this:

I still have transforms with +90 X and up axis pointing to scene Z+.
Seems like the only thing this checkbox does is rotate my model 180 on the Y.
This feature is clearly not built for models with hierarchy and multiple objects.

1 Like

I realized that choosing forward and up axis correctly is the key when exporting the FBX (From Blender in my case)
When I choose forward and up axis in export settings in Blender and check the Bake Axis Conversion in Unity import settings, everything looks correct with rotation of (0,0,0)

Tried on a model with complex hierarchy and lots of children layers. It actually works!

So for assets you already have, importing it to Blender and exporting it again with correct settings would be the solution.

Would you care to elaborate or maybe share your Blender FBX export configuration window options? I wasn’t able to figure it out on my own. I always get odd (89.98) X rotations regardless of export settings.

I have a small reproducable case for the 180 degrees flipping issue. My FBX file has the axis:

       P: "FrontAxis", "int", "Integer", "",1
       P: "FrontAxisSign", "int", "Integer", "",-1

ie. The -Y axis should be aligned with the Unity +Z front axis.

The rest of the file has only 3 vertices and no other transformations:

Vertices: *9 {
            a: -0.00518540572375059,2.23306512832642,0,0.256317675113678,2.23306512832642,0.494583785533905,-0.258910417556763,2.23306512832642,0.494583785533905
        }

The triangle has a positive Y coordindate, so it should show up at 2m on the -Z axis in Unity.

But with the Bake Axis Conversion box checked, the triangle shows up exactly flipped, at 2m on the +Z axis.

I’ve tried importing this file into Maya and it works as you would expect, putting the triangle on the -Z axis. It also imports correctly in Blender (when converted to binary).

Here’s the file. Should I submit a bug report?
https://drive.google.com/file/d/1fIWzfwaNhZkB7WGuko1-nRCB7-659dHU/view?usp=sharing

I suspect this is a weird interaction with legacy mesh fbx import code. Pre-2015, Blender exported all FBX files backwards on the Y-Axis:

The above reproduction is not Blender-specific, though, you can inspect the vertices and axis by hand.

Hey I am really excited to see that feature added. Is there any chance to see it added to Unity 2019? if no, is there any AssetPostprocessor that gives similar results for FBX imported from Blender?

It takes a cowboy model from the asset store built in blender and exported as fbx into a mess. Is there another solution?