跪拜 Guibai
← All articles
Frontend · JavaScript · Programmer

A 47 MB GLB Shrinks to 8 MB Without Touching a Terminal

By 王霸天 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Confidential Web3D projects — defense, medical, industrial — can't use online compressors, and command-line glTF pipelines are slow to iterate. An offline GUI that diagnoses, compresses, and previews in one place removes both the security blocker and the friction of tuning Draco or Meshopt by hand.

Summary

Large GLB files kill Web3D load times, and many projects in defense, medical, or manufacturing cannot upload models to third-party services. A free, fully offline desktop app called Zipoly now handles the entire compression pipeline through a GUI. It auto-diagnoses geometry and texture bloat, recommends a compression engine and level, and runs Draco or Meshopt mesh compression alongside texture optimization.

A 47 MB model dropped to 8 MB — an 83% reduction — in about a minute, with a built-in 3D viewer to visually verify the result before shipping. The tool also batch-processes folders, converts between seven 3D formats, and keeps all data local, making it usable on air-gapped or confidential networks.

Loading the compressed output in Three.js requires wiring up the matching decoder (DRACOLoader or MeshoptDecoder), and the article includes the exact loader setup. Babylon.js and model-viewer work without extra config but are locked to Draco, since they don't support Meshopt.

Takeaways
GLB size comes from three buckets: geometry data, texture maps (usually the largest), and animation/node structure — diagnose before compressing.
Draco delivers high geometry compression (-70–90%) with broad framework support; Meshopt compresses even further and decodes 5–10× faster but only works with Three.js r136+.
Zipoly runs entirely offline, auto-generates a model health report (vertex count, oversized textures, missing normals), and recommends a compression preset.
Compression level 7 is the suggested default for general Web3D; levels 1–3 preserve precision for engineering/medical, levels 8–10 accept visible distortion for mobile or background assets.
A 47 MB GLB was reduced to 8 MB (83% smaller) in roughly one minute using the tool's Meshopt-based "Web 3D Scene" preset.
After compression, Three.js loaders must explicitly configure DRACOLoader or MeshoptDecoder; Babylon.js and model-viewer load Draco-compressed files directly but do not support Meshopt.
Small models under 1,000 faces or 100 KB can actually grow after compression due to metadata overhead.
Always preview the compressed model in the built-in 3D viewer — quantization artifacts are easier to spot by eye than by numbers.
Conclusions

The offline-only constraint isn't just a niche military requirement — it's a recurring blocker for any team under data-residency rules, and tooling that ignores it locks out a whole class of Web3D work.

Meshopt's 5–10× decode-speed advantage over Draco matters more as WebGPU matures, but Babylon.js and model-viewer still don't support it, splitting the ecosystem into two camps.

A GUI that bakes in automatic fallback from Meshopt to Draco removes the main risk of adopting the faster codec, which is otherwise a manual configuration headache.

The compression-level table (1–10) maps directly to real tradeoffs — precision for medical scans vs. visible distortion for distant scenery — and makes the quantization decision explicit rather than hidden behind a single slider.

Concepts & terms
Draco (KHR_draco_mesh_compression)
A glTF extension that compresses geometry data (vertices, indices) by 70–90%, with fast decoding. Supported broadly by Three.js, Babylon.js, and model-viewer.
Meshopt (EXT_meshopt_compression)
A newer glTF extension that compresses geometry and scene-graph data together, achieving higher ratios than Draco and decoding 5–10× faster. Currently supported only in Three.js r136+.
KTX2 / Basis Universal
A GPU-friendly texture format that encodes images into ETC1S or UASTC compressed representations, reducing texture payload significantly while enabling fast transcoding on the client.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗