Import and export
Export an asset or the whole scene as GLB, glTF, OBJ, STL or USDZ, import your own models, and back up or move a project with the .sandbox.json file.
What you build in Sandbox does not stay locked in Sandbox. Every asset and every scene exports to 5 standard formats, straight from the browser, with no server involved.
Export formats
| Format | File | Animations | Typical use |
|---|---|---|---|
| GLB | .glb | Yes (asset) | Blender, game engines, the web. One binary file. |
| glTF | .gltf | Yes (asset) | Same content as GLB in readable JSON, resources embedded. |
| OBJ | .obj | No | Geometry only, read by nearly every 3D tool. |
| STL | .stl | No | 3D printing (binary STL). |
| USDZ | .usdz | No | Augmented reality on iPhone and iPad (Quick Look). |
Materials
Export an asset
Open the asset editor
From the Build or Cast step, select the asset and click “Edit asset”.Pick a format
Under the asset, the export bar offersGLB,GLTF,OBJ,STLandUSDZ.Get the file
The file downloads under the asset’s name, for instance bronze-dragon.glb.
The asset is exported alone, pivot at the origin, at its real size. For an imported or library model, the file is loaded first then rebuilt. In GLB and glTF, its animation clips, including those borrowed from another skeleton, are included.
Export the scene
On the Publish step, the same bar exports the whole world: the terrain (stepped or smooth per your settings), the water plane if any, and every entity at its position, rotation and scale. Hidden entities and markers without an asset are not exported.
Each object is named role:tag (or role:asset name), which makes it easy to find in Blender. The scene export has no animation.
Use cases
3D printing
Export as STL and open the file in your slicer. Sandbox world units are metres: a library character is about 1.8 tall and will need scaling in the slicer. Voxels make solid pieces that print easily.
Augmented reality
A USDZ file opens straight in Quick Look on iPhone and iPad: send it by message or AirDrop and place the object on your table.
Other tools
GLB is the best choice for Blender, Unity, Godot or a three.js site: geometry, PBR materials, textures and animations in one file.
Import formats
The Import button on the Build step — and the one in the asset editor — accepts the following files. Everything is decoded in the browser.
| Extension | Becomes | Notes |
|---|---|---|
.glb .gltf | Model asset | Animations kept and playable by name. A .gltf must be self-contained (embedded resources). |
.fbx | Model asset | Animations kept. |
.obj | Model asset | Geometry only. |
.stl | Model asset | Geometry only. |
.vox | Voxel asset | MagicaVoxel file: first model, the file’s palette. |
.json | Asset | An exported Sandbox asset (.sandbox-asset.json). |
An imported model is scaled to about 1.8 units tall and stood on the ground. Files are capped at 12 MB and stored as base64 in the document. Details in Importing models.
Project files
Two Sandbox JSON formats let you back up and share your work offline.
| File | Content | Export | Import |
|---|---|---|---|
.sandbox.json | The full SandboxGame document | Publish step, or the Projects menu | Studio entry screen, Import button |
.sandbox-asset.json | One asset | Asset editor | Build step, Import button |
On import, a .sandbox.json goes through the migrations and gets a new project id: you work on a copy. It is how you move a project from one browser to another, since projects are saved locally.
const doc = JSON.parse(await file.text())
console.log(doc.format, doc.meta.title, doc.entities.length)/api/games/<id>?doc=1 returns its document, which you can save as .sandbox.json. See HTTP API.