meshfx // GLB SCALE

How to fix the scale of a GLB file

You fix a GLB that imports at the wrong size by checking the scale on its root node and the size of the mesh itself, because glTF always means meters. Apply the scale in your 3D editor so the root reads 1, confirm the model's real size in meters, and export the GLB again.

pyrofx effects work today, and new accounts start with $5 of usage.

MODULE // meshfx AVAILABLE

meshfx measures faults, checks repairs and makes LODs for a triangle budget. meshfx runs on the hosted API: try it in the Playground.

  • glTF unit: 1 meter, fixed by the spec
  • No unit field in the file to change
  • A wrong size comes from the geometry or a node scale

01 // WHY

Why a GLB comes in at the wrong size

The glTF spec fixes the unit at one meter, with +Y up, and no field in the file can change it. A GLB that looks 100 times too big was modeled in centimeters and exported with the numbers unchanged.

A GLB can also look right while hiding the problem. An exporter that keeps centimeter geometry may write a 0.01 scale on the root node to compensate. Every importer applies that scale, so the size looks correct, but the root carries 0.01 and anything you attach to it or scale from code inherits that factor.

02 // HOW TO

Fix it and export again

  1. Import the GLB into your 3D editor, select the root object and read its scale.
  2. Read the model's dimensions. A chair should be about 0.9 m tall.
  3. If the dimensions are wrong, scale the model to the right size. If they are right but a node scale is not 1, leave the size alone.
  4. Apply scale on every object, so all node scales read 1 and the vertex positions carry the size.
  5. Export a new GLB and check it in a glTF viewer or your engine.

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.

03 // NO RE-EXPORT

If you cannot export the GLB again

Scale it on import. In Godot, set Root Scale in the Import dock and keep Apply Root Scale on, which applies the factor into the meshes. In three.js, call gltf.scene.scale.setScalar(0.01) after GLTFLoader loads the file. Unreal Engine 5 converts glTF meters to its centimeters on import, so a correct GLB needs no factor there.

05 // FAQ

GLB scale questions

All questions →

README.FIX_MODEL_SCALE_GLB
Is GLB the right model format for Godot?

Yes. Godot imports glTF and GLB as its main 3D format and both use meters like Godot, so a correct GLB needs no import scale.

Why is my GLB the wrong size in Unity or Unreal Engine?

The meters in the file are wrong or a node carries a scale. Unreal Engine converts glTF meters to centimeters on import, so a correct GLB arrives right.

How do I fix incorrect object scale before exporting a GLB?

Scale the model to its real size in meters and apply the scale so every node reads 1. glTF has no unit option to set on export.

Can glTF store a model in centimeters?

No. The spec defines one unit as one meter, so a centimeter model has to be converted, either in the vertex positions or as a 0.01 node scale.

Explore meshfx outputs

Inspect compiled meshfx outputs and their reports. Hosted meshfx runs are available in the Playground.

All effects, guides and explainers →