Skip to content
← Back to Blog optimization

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

By BitSoul3D4 min read173 views

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.

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

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:

ParameterTypical rangeEffect
quantization_bits for position10–14 bitsLower = smaller file, more surface snapping
quantization_bits for normals8–10 bitsLower = blocky shading on curved surfaces
compression_level0–10Higher = 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:

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):

#!/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:

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:

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.


Need drop-in assets for this workflow? Grab the 67-model Weapons Bundle on the BitSoul marketplace and drop them straight into your project.

Tags: weapons

Skip the modeling — download it instead

A free BitSoul3D account gets you 2 GLB downloads every month for personal use plus 25 one-time AI Engine credits, no card required. PBR-textured GLB downloads with a full 3D preview before you buy, for Unreal, Unity, Godot or Blender — OBJ and 3D-printable STL come with any purchase or paid plan.

Browse 1,051 models — from $4.99 → or start free (2 downloads a month)