# blender-glb-export

Export game-ready GLB assets from Blender headless (applied transforms, Y-up, materials) and gate them on triangle and size budgets before they enter an engine

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

## Purpose (spec/SPEC.md)

## Goal
Any .blend becomes a GLB that loads the same in three.js, Godot, Unity (glTFast) and Unreal (glTF importer), checked against budgets in one command.

## Steps
1. Model/animate in Blender (see `3d-blender-animation`).
2. Export headless: `blender -b scene.blend --python code/export_glb.py -- out.glb --apply-scale`.
3. Gate: `python3 ../tools/glbtool.py inspect out.glb --max-tris 100000 --max-bytes 10000000`.
4. Optional compression for the web: `npx gltf-transform optimize out.glb web.glb --compress draco --texture-compress ktx2`.
5. Import: three.js GLTFLoader (threejs/scene-with-glb-model), Godot drag-in, Unity glTFast, Unreal Interchange glTF.

## Edge cases
- Unapplied scale makes physics/colliders wrong in engines: use --apply-scale.
- Blender shader node setups beyond Principled BSDF don't export; bake them to textures.

## Don'ts
- Don't export hidden helper objects (keep them in a separate collection excluded from export).
- Don't skip the budget gate for mobile/web targets.



---

Canonical URL: https://logicpacks.io/packs/game-engines-public/blender-glb-export

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