# export-glb-draco

Convert FBX/OBJ/GLTF/STL/.blend to a web-ready GLB with optional Draco mesh compression via headless Blender, and inspect the result (meshes, animations, extensions, size) with a stdlib script.

- **Space:** 3d-blender-animation-public (https://github.com/Tech-Realm/space-3d-blender-animation-public/tree/main/export-glb-draco)
- **Level:** L1 (as the registry reports it)
- **Keys it needs (names only):** none
- **Tools:** blender, python3
- **Routes:** local-blender, gltf-transform; checks: 2
- **Uses:** new (no recorded use yet)
- **Install:** `logicpacks pack use 3d-blender-animation-public/export-glb-draco` or MCP `get_pack 3d-blender-animation-public/export-glb-draco`
- **Files:** CHANGELOG.md, code/convert.py, code/fbx_demo.py, code/glb_info.py, outcome/EVIDENCE.md, outcome/checks.yaml, outcome/results.json, pack.yaml, spec/SPEC.md, spec/source.md

## Purpose (spec/SPEC.md)

Convert FBX/OBJ/GLTF/STL/.blend to a web-ready GLB with optional Draco mesh compression via headless Blender, and inspect the result (meshes, animations, extensions, size) with a stdlib script.

## Goal

One command turns whatever 3D file a client or tool hands us into a compact GLB a browser (three.js, model-viewer) can load.

## Steps

1. Convert: `blender -b --factory-startup --python code/convert.py -- --in model.fbx --out model.glb --draco --level 6` (`--in demo` makes a test mesh).
2. Inspect: `python3 code/glb_info.py model.glb` (expect `KHR_draco_mesh_compression` in extensionsUsed when --draco).
3. Optional extra squeeze with gltf-transform: `npx -y @gltf-transform/cli optimize model.glb model.opt.glb --compress draco --texture-compress webp`.
4. Load it in the three.js viewer pack (needs DRACOLoader when Draco is on).
5. Keep the original source file next to the GLB in storage; GLB is a delivery format.

## Edge cases

- Draco compresses geometry only; big files are usually textures: resize to 2K and use WebP/KTX2.
- FBX from some tools carries cm units: check scale after import (apply scale before export).
- Animations: export with `export_animations=True`; Draco keeps skinning data but test playback.
- Our product hit 'doesn't support uploading GLB and other formats' in an upload flow: check the server's allowed MIME/extension list (model/gltf-binary for .glb).

## Don'ts

- Don't ship an uncompressed 50 MB GLB to phones.
- Don't Draco-compress a mesh you still need to edit; keep the uncompressed master.
- Don't hotlink models from a home server on a live site; copy them to the site's own storage/CDN.



---

Canonical URL: https://logicpacks.io/packs/3d-blender-animation-public/export-glb-draco

Developed by TechRealm (techrealm.online), the software team. Operated by Al Jash Trading (Establishment), Abu Dhabi, since 1994, the legal entity that hosts and is responsible for the service. Economic licence CN-1030597, Abu Dhabi Registration Authority. Address: Office 5, Bani Yas West 4, Bani Yas, Abu Dhabi, UAE. Website: https://aljashtrading.com. Contact: hello@logicpacks.io, security@logicpacks.io, WhatsApp +1 713 632 2262 (https://wa.me/17136322262).

Machine-readable index: [/llms.txt](/llms.txt). Plain facts: [/about.md](/about.md). Safety: [/safety.md](/safety.md).
