Back to the blog

3D

A GLB, light enough for the web and AR.

Make a GLB smaller in your browser with nothing uploaded: fewer triangles, squeezed shapes and smaller pictures, with how far its shape moved measured.

By 5 min read

A GLB made smaller, with its size before and after

A large GLB loads slowly on a web page, and Google's AR viewer on Android asks for models under 10 MB and refuses them over 15 MB. KeepSimp makes a GLB smaller in your browser and measures what that cost.

Choose how many triangles, and a limit.

Open Compress GLB, drop the file, choose how many triangles to keep (all, about half, a quarter or a tenth) and, if you have one, a size limit. The shapes are squeezed with meshopt, which three.js, Babylon.js and model-viewer read; pictures are made smaller, one step at a time, only while the file is over the limit.

How far it moved, measured.

The smaller GLB is loaded again and compared with the model over its whole surface, both ways: the result says the farthest any point moved. On KeepSimp's sample knot (7,680 triangles, 52.9 mm across), keeping about half its triangles moved no point of its surface more than 0.23 mm and left it closed; a quarter, 0.46 mm, still closed; a tenth, 1.24 mm, and it no longer closed.

Keeping every triangle only squeezes how they are stored: the knot's 384 KB STL became a 119 KB GLB whose points moved at most 0.003 mm.

Download it, or keep it.

Download the GLB, or keep it as the model, so any other format can be written from it.

Further reading

Topics: compress glb · reduce glb file size · glb optimizer · gltf compressor · make glb smaller

A little less theory. A little more doing.

Try it on your own terms, with a free browser tool.

Try the tool