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

FormatFileAnimationsTypical use
GLB.glbYes (asset)Blender, game engines, the web. One binary file.
glTF.gltfYes (asset)Same content as GLB in readable JSON, resources embedded.
OBJ.objNoGeometry only, read by nearly every 3D tool.
STL.stlNo3D printing (binary STL).
USDZ.usdzNoAugmented reality on iPhone and iPad (Quick Look).

Materials

Every material is converted to a standard PBR material before export: voxel vertex colours, textures and emission are kept, but toon shading and the chosen render style are not. Exports match the “realistic” look.

Export an asset

  1. Open the asset editor

    From the Build or Cast step, select the asset and click “Edit asset”.
  2. Pick a format

    Under the asset, the export bar offers GLB, GLTF, OBJ, STL and USDZ.
  3. 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.

ExtensionBecomesNotes
.glb .gltfModel assetAnimations kept and playable by name. A .gltf must be self-contained (embedded resources).
.fbxModel assetAnimations kept.
.objModel assetGeometry only.
.stlModel assetGeometry only.
.voxVoxel assetMagicaVoxel file: first model, the file’s palette.
.jsonAssetAn 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.

FileContentExportImport
.sandbox.jsonThe full SandboxGame documentPublish step, or the Projects menuStudio entry screen, Import button
.sandbox-asset.jsonOne assetAsset editorBuild 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.

read a .sandbox.jsonJavaScript
const doc = JSON.parse(await file.text())
console.log(doc.format, doc.meta.title, doc.entities.length)
A published game can be downloaded too: /api/games/<id>?doc=1 returns its document, which you can save as .sandbox.json. See HTTP API.

See also