Exporting Fbx from maya to Unity makes the model deformed

Exporting Fbx from maya to Unity makes the model deformed

So I have a female avatar model and I have attached cloth model to it by binding it to skeleton rig. After that copying weights from avatar to the cloth model. Now when i export it as an fbx and open it in unity, it converts the whole model into a deformed shape. I have removed the errors related to scale compensation as well by running the (ScaleCompenstationOff ) mel script in Maya but still no success. Kindly let me know if you guys know of any solution to this problem !!!


Solutions/Answers:

Answer 1:

I might come a bit too late. I had the same issue, what I did to fix this was to copy and paste the following code and paste it on the MEL box:

{
string $selected[] = `ls -type joint`;
select -r $selected;
}

string $sel[] = `ls -sl`;
string $singleJnt;
for ($singleJnt in $sel)
{
setAttr ($singleJnt + ".segmentScaleCompensate") 0;
}

You have to do it everytime you make a new joint.
Source

Answer 2:

I’ve had this problem as well. What solved it for me was deleting non-deformer history for the model. (edit -> delete all by type -> non deformer history)

References