Unity 3D

Aug 11

Unite 07 – Optimization Presentation


Jul 11

Joint Scale Compensation and Unity 3D

When importing a .FBX file containing animation into Unity 3D (originally exported from Maya), my asset was unexpectedly deforming, joints were moving and scaling all over the place meaning the asset was just unusable.

Importing the same asset as a Maya file works fine, meaning there is an .FBX issue of some sort.

By default, all joints in Maya have an option ticked on called ‘Segment Scale Compensate’. This exports fine into the .FBX format, which is why the .FBX file appears fine when opened up in Maya, but not in Unity.

Unity does not recognise this attribute, which is where the problems start.
When importing a Maya file into Unity, it is converted to the .FBX format, and Unity (from what I can gather) turns this attribute off, making the model import as expected – but Maya is required on the machine and is loaded in teh background when importing the asset (which is a huge time waster on large projects).

So, the best option is to export an .FBX from Maya that works in Unity.
The solution, in Maya turn off the Segment Scale Compensate attribute for all joints. I do this after baking the joints in case my rig and animation are altered.

How to do this (in Maya):
1. Edit > Select All By Type > Joints
2. Open the Attribute Spread Sheet..
Window > General Editors > Attribute Spread Sheet
3. Open the ‘All’ tab and find ‘Segment Scale Compensate’ column – it’s towards the end of the spreadsheet, about 7/8 of the way.
4. Turn all attributes to off.

Save, and export as an .FBX file.
Import this into Unity and your asset should come in perfectly (if the scale compensation error is the reason for your problems).