meshfx // OBJ SCALE
How to fix the scale of an OBJ file
You fix an OBJ's scale by deciding what one unit in the file means, because OBJ stores bare numbers with no unit and no transform. Open it in your 3D editor, scale it to real size, apply the scale and export again, or set the import scale in your engine. Most OBJ exporters have a scale field for this.
pyrofx effects work today, and new accounts start with $5 of usage.
meshfx measures faults, checks repairs and makes LODs for a triangle budget. meshfx runs on the hosted API: try it in the Playground.
- OBJ: no unit, no transforms, raw positions
- The importer decides what 1.0 means
- Set the exporter's scale field or the import scale
01 // WHY
Why OBJ size depends on the importer
An OBJ file is a text list of vertex positions (v lines) and faces (f lines). Nothing in it says whether 1.0 is a meter, a centimeter or an inch, so each importer applies its own unit, and the same file can look right in one engine and 100 times off in another.
The exporter also multiplies each object's position, rotation and scale into the vertex numbers, so the file has no scale value you could reset later, and the size is whatever the numbers say.
02 // HOW TO
Set the OBJ scale by hand
- Open the OBJ in a text editor and read a few
vlines. For a person-sized model, values up to about 2 suggest meters and values in the hundreds suggest centimeters. - Import it into your 3D editor, note the importer's scale field, and compare the dimensions with the real object.
- Scale the model to real size and apply the scale.
- Export the OBJ with the exporter's scale field set so one unit in the file equals one unit in your engine.
- Or keep the file and scale it on import: Scale Mesh in Godot's OBJ import options, Scale Factor in Unity's Model tab, Import Uniform Scale in Unreal Engine, Scale Unit in the Roblox Studio 3D Importer.
meshfx has units and origin settings, can face a named axis and rename nodes. Set the scale using the known dimensions of your source, then inspect the output in Godot 4. Hosted meshfx runs are available in the Playground.
How do I fix incorrect object scale before exporting an OBJ?
Scale the model to its real size, apply the scale and set the OBJ exporter scale field so one file unit matches one engine unit.
How do I scale an OBJ after OBJLoader loads it in three.js?
Call object.scale.setScalar(0.01) on the group OBJLoader returns if the file is in centimeters. Measure first with new THREE.Box3().setFromObject(object).
How do I import an OBJ at the right size in Godot?
meshfx has units and origin settings, can face a named axis and rename nodes. Set the scale using the known dimensions of your source, then inspect in Godot.
Should I use OBJ or FBX for Unity?
Use FBX when you need a unit, pivots or animation. OBJ suits a single static mesh as long as you check its size after import.
Explore meshfx outputs
Inspect compiled meshfx outputs and their reports. Hosted meshfx runs are available in the Playground.