← Back to Blog optimization

Draco Compression for GLB Files: Shrink Game Assets 80% in Unity

By BitSoul Team5/25/2026Updated 8/1/20264 min read74 views
Draco Compression for GLB Files: Shrink Game Assets 80% in Unity

Draco compression can cut your GLB geometry data by 70–90% — yet most indie developers ship raw, uncompressed meshes and wonder why their asset bundles bloat past 500 MB. Google's open-source Draco codec applies quantisation and entropy coding directly to vertex positions, normals, UVs, and indices, producing a binary payload far smaller than the original float arrays. The result: smaller downloads, faster streaming, and lower memory pressure at load time.

What Draco compression does to your geometry

Standard GLB stores vertex attributes as IEEE 754 floats — 32 bits per component, even for a simple cube. Draco replaces this with a quantised integer representation, then entropy-codes the integer deltas across the mesh's connectivity graph. For a typical game prop with 2,000–8,000 vertices, this drops geometry data from several hundred kilobytes to tens of kilobytes without any visible surface change at normal viewing distances.

What Draco compression does to your geometry — illustrated

Two parameters control the trade-off between size and fidelity:

| Parameter | Typical range | Effect |
|---|---|---|
| `quantization_bits` for position | 10–14 bits | Lower = smaller file, more surface snapping |
| `quantization_bits` for normals | 8–10 bits | Lower = blocky shading on curved surfaces |
| `compression_level` | 0–10 | Higher = smaller file, longer encode time |

For most game assets — props, environment pieces, weapons — position quantisation at 12 bits and normals at 10 bits is indistinguishable from the uncompressed original at typical in-game camera distances. Characters with fine facial detail may need 14-bit positions to avoid jaw/ear vertex snapping.

Draco is baked into the glTF 2.0 extension spec as `KHR_draco_mesh_compression`. Any GLB with this extension header requires the host engine to have Draco decode support linked at runtime.

How to encode Draco-compressed GLB files

The fastest path is gltf-pipeline, a Node.js CLI from the Cesium team:

```bash
npm install -g gltf-pipeline

# Encode with Draco — default settings
gltf-pipeline -i asset.glb -o asset_draco.glb --draco.compressionLevel 7

# Fine-tune quantisation
gltf-pipeline -i asset.glb -o asset_draco.glb \
--draco.compressionLevel 7 \
--draco.quantizePositionBits 12 \
--draco.quantizeNormalBits 10 \
--draco.quantizeTexcoordBits 10
```

For batch processing an entire asset library (relevant when you pull models from BitSoul's marketplace):

```bash
#!/bin/bash
for f in ./raw_assets/*.glb; do
name=$(basename "$f" .glb)
gltf-pipeline -i "$f" -o "./compressed/${name}_draco.glb" \
--draco.compressionLevel 7 \
--draco.quantizePositionBits 12 \
--draco.quantizeNormalBits 10
echo "Compressed: $f"
done
```

Run this after any new asset download. A 20 MB batch of environment props typically compresses to under 3 MB.

Loading Draco GLB files in Unity

Unity does not ship with a Draco runtime decoder. You must add the Draco for Unity package:

```
# In Unity Package Manager → Add package by name:
com.unity.cloud.draco
```

Once installed, the GLB/GLTF loader picks up `KHR_draco_mesh_compression` automatically. If you're using GLTFast (the recommended loader for runtime GLB imports), Draco support is enabled by installing both packages together:

```
com.atteneder.gltfast # GLTFast runtime loader
com.unity.cloud.draco # Draco decoder
```

Addressable bundles workflow:

```csharp
using GLTFast;
using UnityEngine;

public class DracoAssetLoader : MonoBehaviour
{
async void Start()
{
var gltf = new GltfImport();
bool success = await gltf.Load("https://cdn.example.com/prop_draco.glb");
if (success)
await gltf.InstantiateMainSceneAsync(transform);
}
}
```

Decode time for a 50 KB Draco-compressed GLB (representing a ~400 KB raw file) is typically under 8 ms on a mid-range mobile GPU — negligible in an async loading context.

Loading Draco GLB files in Unity — illustrated

Loading Draco GLB files in Godot 4

Godot 4.x includes built-in Draco decode support as of 4.1 — no plugin required. Import a Draco-compressed GLB through the standard `Import` dock and Godot handles decompression transparently.

For runtime loading via `ResourceLoader`:

```gdscript
extends Node3D

func _ready():
var gltf_doc = GLTFDocument.new()
var gltf_state = GLTFState.new()

var err = gltf_doc.append_from_file(
"res://assets/prop_draco.glb",
gltf_state
)

if err == OK:
var scene = gltf_doc.generate_scene(gltf_state)
add_child(scene)
else:
push_error("Failed to load Draco GLB: " + str(err))
```

Gotcha: Godot's editor import pipeline may silently fall back to the non-Draco mesh data if it can't locate the extension. Always verify the imported mesh vertex count against your Blender source to confirm Draco decode ran correctly rather than using an uncompressed fallback path.

When NOT to use Draco — trade-offs

Draco is not universally beneficial. Before compressing every asset in your pipeline, check these cases where it hurts:

For static environment props, architecture, vehicles, and weapons — which make up the majority of assets on BitSoul's marketplace — Draco compression is essentially free quality-neutral size reduction and should be part of every release pipeline.

---

*This post is part of the Ultimate Guide to Free 3D Game Assets — BitSoul's complete reference for formats, texturing, rigging, optimization, and engine integration.*

Tags: optimization game-assets 3d-models unity godot workflow tutorials

Skip the modelling — download it instead

A free BitSoul account gets you 2 game-ready models every month plus 25 AI Engine credits to generate one of your own, no card required. Clean topology, PBR textures, and GLB downloads that drop straight into Unreal, Unity, Godot or Blender — plus OBJ and 3D-printable STL export.

Create a free account → Browse 846 models