01 — Export
Subsystem diagram: export.html · Code trace: trace-export · Runtime: 01 — Architecture
How Export Level turns your Blender scene into the two files the runtime loads. Editor-first — for Python module names and axis math, see 03 — Blender Add-on.
The two artifacts
| File | Contains |
|---|---|
level.glb | Meshes, hierarchy, lamps, cameras, materials (standard glTF), animation clips, GUIDs in node extras |
level.scene.json | Components, scene block (fog, env, post, input), per-entity light/camera/animation, materials[] NME overrides, debug flag |
Sidecar folders appear next to the export when needed: audio/, gui/, env/, post/, particles/, materials/, fonts/.
Where to click
Babylon Scene (viewport N-panel) → Export Level. Pick a .glb path; the manifest is written beside it with the same basename (Arena.glb → Arena.scene.json).
Same panel: Validate (checks only), Live Link (auto re-export on save), Debug Build (dev keys in the manifest).
Export pipeline (summary)
- Validate — warnings to the report / console (see 04 — Workflow)
- GUID pass — stable
bjs_idon every exported / referenced object; duplicates re-issued - Write glb — Blender glTF exporter (+Y-up, render-disabled objects skipped)
- Build manifest — components, scene block, lights, cameras, animations, materials
- Copy assets — sounds, GUI JSON, HDR/env, particles, fonts, NME JSON, button images
- Remember path — for Live Link on the next Ctrl+S
Step-by-step with source: trace-export.
What gets exported vs skipped
| Blender state | Result |
|---|---|
| Camera icon off (not renderable) | Excluded from glb and manifest entirely |
| Eye off (viewport hidden) | In glb + manifest with "visible": false |
| Collider → Make Invisible | Mesh hidden at runtime; physics kept |
| Ray Visibility → Shadow off | Mesh receive-only (no shadow casting) |
| Object with GUID, no components | Exported as addressable entity (empty transform node) |
First export checklist
- Scene has an active camera
- Script components point at files that exist on disk
- Export path sits under your app's
public/levels/(or copy there after export) - Run Validate if anything looks wrong at runtime
New to the kit? Start with Quickstart.