I’ve got a model that appears to be 100x too large, due to assimp’s FBX importer assuming scale is in centimeters. Today I added code to our AssetImporter tool - first I tried to read the unit scale factor from the fbx file prior to import, but it appears there is no such meta-property in my FBX file - so I added a new option to apply a user-defined scale factor during import (eg -sc 0.01) and enabled the appropriate import flag, but it seemed to make no difference!
PrintLine("Applying Unit Scale Factor: "+String(GlobalScale));
aiSetImportPropertyFloat(aiprops, AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY, GlobalScale);
flags |= aiProcess_GlobalScale;
scene_ = aiImportFileExWithProperties(GetNativePath(inFile).CString(), flags, nullptr, aiprops);
In frustration, I turned back to Blender. Here is the workflow I found to work for me:
In a new scene, I first import my FBX model, with import scale of 1.
Now I set Units to Metric, and Unit Scale to 0.01 - at this point, my model visibly shrinks in Blender’s 3D view by 100 times.
Next, I export the model, with export scale of 1, and “!EXPERIMENTAL: Apply Transform” enabled.
Finally, I run the exported FBX through AssetImporter.
The result is a model that looks correct in Urho3D with no scaling applied at runtime, which ought to make my life a bit easier, as they now comply with the scale of the models used in the samples.
Any animations that I had previously imported, back when I had a scale issue, required no changes - they “just worked” with the scaled-down model (though I think I have no translate keys…)
I just thought this information might be useful for future reference, as it took me a few attempts to get the settings right in Blender.