Skip to content

Last updated:

Model Compression ​

Model Compression is Zipoly's core feature: it applies Draco (KHR_draco_mesh_compression) or Meshopt (EXT_meshopt_compression / gltfpack) geometry compression to glTF/GLB models, reducing file size by 70–90%, with optional KTX2/WebP texture compression, in both single-file and batch modes. This is the default page when you open the app.

Compression Workflow ​

  1. Import the model — click "Choose File" or drag & drop a .glb / .gltf file. After import, Zipoly automatically shows model statistics and a health check (duplicate vertices, oversized textures, etc.), along with suggested compression parameters
  2. Choose the engine — pick Draco or Meshopt per the table below; when in doubt, keep the default Meshopt
  3. Set the compression level — the default 7 suits most scenarios
  4. Start compressing — click "Start Optimize"; progress is shown live on the right
  5. Verify the result — check the comparison window and always click "Preview" to confirm the model still looks right — only your eyes can judge that

glTF / GLB input only

Compression accepts only .glb and .gltf files. Other formats such as FBX or OBJ must first be converted to GLB via Format Conversion.

Step 2: Choose the engine ​

DracoMeshopt (recommended)
Compression ratioHighHigher
Load speedFastFaster (WebGPU-friendly)
Texture compressionJPEG / WebP / KTX2BasisU (ETC1S / UASTC)
Framework supportNative in Three.js / Babylon.js / model-viewerThree.js only (decoder required)
Best forLegacy projects, broad compatibilityNew projects, maximum performance

Not sure which one? Choose Meshopt

If Meshopt is unavailable, Zipoly automatically falls back to Draco with a notice — processing never stalls.

Meshopt compression settings

Meshopt loading limitations

Models compressed with Meshopt cannot be loaded directly by Babylon.js or model-viewer — only Three.js (r136+) is supported. If your project uses either of those frameworks, choose the Draco engine instead.

Step 3: Set the compression level ​

Default is 7, suitable for most scenarios.

LevelUse case
0 (RAW)No geometry compression — baseline for comparison
1–3Engineering / medical models, precision first
4–6Product showcases, architectural visualization
7 (default)General Web3D — the best starting point
8–9Mobile, low bandwidth; minor artifacts acceptable
10Distant decoration; visible geometric distortion

Higher is not always better

Level 10 can shift vertex positions and deform surfaces, producing visible "jaggies" or broken faces. Start with 7, and only step down if you see issues — don't start at the maximum.

Step 4: Start compressing ​

Click "Start Optimize" — progress is shown live on the right.

Start compression

Step 5: Verify the result ​

After compression, check the comparison window. We recommend clicking "Preview" every time to verify the visuals, since unsuitable parameters are best caught by eye.

Compression result comparison

Batch Compression ​

Enable "Batch Mode" → pick a folder → start. Zipoly recursively scans all .glb / .gltf files in subfolders and supports pause / resume / cancel.

Texture settings in batch mode

Batch mode shares the same parameters as single-file mode, including engine, compression level and texture settings. Confirm the parameters before starting a batch run.

Texture Settings ​

Click the "Texture Settings" button to configure texture processing.

Draco texture settings

Draco engine: JPEG (best compatibility) / WebP (30% smaller) / KTX2 (GPU-native, best performance)

Meshopt engine: BasisU built-in — pick ETC1S (small size) or UASTC (high quality), or skip texture compression

ETC1S for color maps, UASTC for normal/specular maps

ETC1S compresses more aggressively with some loss; UASTC is near-lossless but larger — ideal for detail-critical textures like normal maps and specular maps.

Texture optimization only applies to GLB

If the target format is glTF (textures stored separately), the KTX2 / WebP conversion options under Texture Settings have no effect. Set the target format to GLB when you need texture compression.

Loading Compressed Models in Your Project ​

Why do I need to configure a loader?

Draco and Meshopt are lossy geometry compression algorithms. Browsers cannot decode them natively — the loader must decode them at runtime. The code below is required.

Draco:

js
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js'
import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js'

const dracoLoader = new DRACOLoader()
// Recommended: copy the decoder files into your project's public folder (no external CDN dependency)
// cp node_modules/three/examples/jsm/libs/draco public/draco -r
dracoLoader.setDecoderPath('/draco/')

const loader = new GLTFLoader()
loader.setDRACOLoader(dracoLoader)
loader.load('model_optimized.glb', gltf => scene.add(gltf.scene))

Meshopt:

js
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js'
import { MeshoptDecoder } from 'three/addons/libs/meshopt_decoder.module.js'

const loader = new GLTFLoader()
loader.setMeshoptDecoder(MeshoptDecoder)
loader.load('model_optimized.glb', gltf => scene.add(gltf.scene))

Meshopt + KTX2 textures (configure both):

js
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js'
import { MeshoptDecoder } from 'three/addons/libs/meshopt_decoder.module.js'
import { KTX2Loader } from 'three/addons/loaders/KTX2Loader.js'

// renderer is your THREE.WebGLRenderer instance
const ktx2Loader = new KTX2Loader()
// Recommended: copy the transcoder files into your project's public folder (no external CDN dependency)
// cp node_modules/three/examples/jsm/libs/basis public/basis -r
ktx2Loader.setTranscoderPath('/basis/')
ktx2Loader.detectSupport(renderer) // detects the KTX2 sub-formats your GPU supports

const loader = new GLTFLoader()
loader.setMeshoptDecoder(MeshoptDecoder)
loader.setKTX2Loader(ktx2Loader)
loader.load('model_optimized.glb', gltf => scene.add(gltf.scene))

Babylon.js and model-viewer users

Both frameworks have built-in Draco support — no configuration needed, just load the file. Compress with the Draco engine for them (Meshopt is not supported).

Advanced Quantization Parameters (Draco only) ​

Click "Advanced Parameters" to fine-tune precision. Most users can keep the defaults.

Draco quantization parameters
ParameterDescriptionRecommended range
Position precision qpVertex coordinate precision — higher means more accurate but larger files8–12
Normal precision qnAffects lighting detail6–10
UV precision qtAffects texture mapping accuracy6–10
Generic attribute precision qaQuantization for generic attributes like vertex colors — off by defaultAs needed

Quantization vs. compression level

Quantization parameters are independent of the compression level. If the model is still distorted after lowering the compression level, the quantization precision may be too low — increase qp separately.

FAQ ​

Draco or Meshopt — which one? ​

Most new projects should pick Meshopt (higher compression, faster decoding); if your project uses Babylon.js or model-viewer, you must pick Draco (those runtimes don't support Meshopt but have built-in Draco). Zipoly falls back to Draco automatically when Meshopt isn't available.

Does compression lose precision? ​

Yes — Draco/Meshopt are lossy geometry algorithms. Level 7 (default) is visually lossless for most content. If you see deformation or jagged artifacts, lower the level (e.g. 9 → 7) or raise the position precision qp; for measurement-grade industrial models use level 1–3 and verify with a preview.

The file got larger after compression? ​

Typical for very simple models (< 1,000 faces) or tiny files (< 100KB), where metadata overhead outweighs savings. Lower the level or skip compression.

The compressed model fails to load? ​

Both Draco and Meshopt require a runtime decoder configured on the page — see Loading Compressed Models in Your Project above. Babylon.js and model-viewer have built-in Draco support and need no configuration.

I need to compress a whole project of models ​

Use batch mode: toggle the batch switch → choose a folder → start. Zipoly recursively scans all .glb/.gltf files and processes them with the current settings, with pause/resume/cancel.

References ​

The compression algorithms and extensions Zipoly uses are all glTF official standards:

Built for Web3D developers