OBJ import scale

Is there some hidden scaling going on? I have an OBJ file that I have checked in Blender and Paraview that is basically a cylinder 0.25 units long, but when I have imported it into Flax it is 25 units long. In Flax the import transform shows scale = 1. Is this some sort of assumed correction from m to cm?

I guess I’m missing something…

Yes, there is a an internal scaling for assimp imported model formats (anything besides FBX). With default export settings from blender it was importing at 1/100th the size and while I was fixing other issues with assimp importing, I decided to “fix” that as well, for most people the 1/100th size was an issue. I assume there has to be a way to read the intended unit for assimp but when I was working with that code I never found it, so a fixed 100x scaling was applied.

1 Like

Thanks very much for that reply. To add a little to this… OBJ files do not carry a unit so there is no potential to automatically select scale - the x100 requirement comes from Flax using cm for physics when many people are modelling in m (I really hope that Flax changes to m in 2.0, I am reluctant to do anything with the physics system using cm).

I’m not really a fan of the hidden scalar, it would be more intuitive if it was a default parameter exposed as part of the import code - It’s particularly confusing as it is not visible in the asset transform scale.

FBX probably appears to not need it because of an old bug: #70161 - FBX I/O Imports and exports objects with wrong scale transform - blender-addons - Blender Projects the 0.01 root node is ignored by many importers - giving a fake x100 scale.

For now I will adjust my import scale.