Export (glTF, HTML, Screenshots)
Export (glTF, HTML, Screenshots)π
LocalGPT Gen can export worlds in multiple formats β each preserving different aspects of the scene.
Format Comparisonπ
| RON (native) | glTF/GLB | HTML | Screenshot | |
|---|---|---|---|---|
| Tool | gen_save_world | gen_export_gltf | gen_export_html | gen_export_screenshot |
| Geometry | Parametric (editable) | Baked meshes | Three.js shapes | Rasterized image |
| Materials | Full PBR params | PBR (color, metallic, roughness) | PBR (Three.js MeshStandardMaterial) | Rendered |
| Lighting | Full (point, spot, directional) | Not included | Full (Three.js lights) | Rendered |
| Behaviors | Full (orbit, spin, bob, etc.) | Not included | Full (JS animation loop) | Static frame |
| Audio | Full (ambience + emitters) | Not included | Full (Web Audio API) | Not included |
| Camera | Full (position, look-at, FOV) | Not included | Full (OrbitControls) | Current view |
| Environment | Full (sky, fog, ambient) | Not included | Full (background, fog) | Rendered |
| Reloadable in Gen | Yes (gen_load_world) | Yes (gen_load_gltf) | No | No |
| Viewable externally | No | Blender, Unity, Unreal, web | Any browser | Any image viewer |
| File size | Small (text) | Medium (binary meshes) | Small-medium (inline JS) | Small (PNG) |
glTF/GLB Exportπ
Export the scene as a standard glTF 2.0 binary file. This is the universal 3D interchange format β supported by Blender, Unity, Unreal Engine, Godot, web viewers, and virtually every 3D tool.
Usageπ
Ask your agent to export the scene as glTF, or call the tool directly:
{
"name": "gen_export_gltf",
"arguments": {
"path": "my-world.glb"
}
}Whatβs Exportedπ
- Meshes β all primitives and loaded meshes with positions, normals, UVs, and indices
- Materials β PBR metallic-roughness (base color, metallic factor, roughness factor)
- Transforms β position, rotation (quaternion), scale for every entity
- Hierarchy β parent-child relationships preserved as glTF node tree
Whatβs NOT Exportedπ
- Behaviors (animations) β glTF supports animations but Gen doesnβt write them yet
- Audio β no glTF equivalent
- Lighting β not baked into the glTF (the viewer provides its own)
- Environment (sky, fog) β viewer-dependent
Output Locationπ
| Input | Output |
|---|---|
| No path | {workspace}/exports/{timestamp}.glb |
path/scene.glb | Writes to that path |
path/scene.gltf | Splits into scene.gltf (JSON) + scene.bin (geometry) |
path/scene | Appends .glb automatically |
Opening in External Toolsπ
# Blender
blender --python-expr "import bpy; bpy.ops.import_scene.gltf(filepath='scene.glb')"
# Three.js (web)
const loader = new GLTFLoader();
loader.load('scene.glb', (gltf) => scene.add(gltf.scene));
# macOS Quick Look (GLB files open natively)
open scene.glbHTML Exportπ
Export the world as a self-contained HTML file that runs in any browser. This is the only export format that preserves everything β geometry, materials, lighting, behaviors, audio, camera, and environment.
Usageπ
Save the world first, then export β ask your agent, or call the tools:
{"name": "gen_save_world", "arguments": {"name": "my-castle"}}
{"name": "gen_export_html", "arguments": {}}Whatβs Exportedπ
- Geometry β all shapes rendered as Three.js meshes
- Materials β PBR via
MeshStandardMaterial(color, metallic, roughness, emissive, alpha) - Lighting β point, spot, directional lights with color and intensity
- Behaviors β full animation system (orbit, spin, bob, pulse, swing, bounce, path_follow, look_at, with pivots and phases) running in a JS animation loop
- Audio β procedural ambience and spatial emitters via Web Audio API (wind, rain, forest, ocean, fire, water, hum)
- Camera β OrbitControls with the saved camera position and look-at target
- Environment β background color, fog, ambient light
Output Locationπ
The HTML file is written to the world skillβs export/ directory:
gen-workspace/skills/my-castle/
βββ world.ron # Native format
βββ SKILL.md # Metadata
βββ history.jsonl # Edit history
βββ export/
βββ index.html # β self-contained HTML viewerFeatures of the HTML Viewerπ
- No server required β open
index.htmldirectly in a browser, works offline - Mouse controls β orbit (left-drag), zoom (scroll), pan (right-drag) via Three.js OrbitControls
- Responsive β resizes with the browser window
- Audio autoplay β ambient and spatial audio start on first click (browser autoplay policy)
- Animations β all behaviors run at 60fps in the browser
Sharingπ
The HTML file is completely self-contained (no external dependencies). Share it by:
- Uploading to any static host (GitHub Pages, Netlify, Vercel)
- Sending the file directly β recipients just open it in a browser
- Embedding in an iframe on any website
Screenshot Exportπ
Capture a high-resolution image of the current scene.
Usageπ
{
"name": "gen_export_screenshot",
"arguments": {
"path": "scene-capture.png",
"width": 1920,
"height": 1080
}
}Parametersπ
| Parameter | Default | Description |
|---|---|---|
path | Auto-generated in workspace | Output file path |
width | 1920 | Image width in pixels |
height | 1080 | Image height in pixels |
An agent uses screenshots while it builds to see what it made and course-correct. gen_screenshot (the in-scene version) captures to a file and answers with its path; with inline: true it also returns the picture itself, for an agent that cannot read the serverβs files.
World Export (gen_export_world)π
A convenience tool that exports the entire saved world as glTF:
{
"name": "gen_export_world",
"arguments": {
"format": "glb"
}
}
Exports to the world skillβs export/ directory (e.g., gen-workspace/skills/my-castle/export/scene.glb). Supports "glb" (default) or "gltf" format.
Choosing an Export Formatπ
| Goal | Format |
|---|---|
| Continue editing later | RON (gen_save_world) |
| Import into Blender / Unity / Unreal | glTF (gen_export_gltf) |
| Share with anyone (no install needed) | HTML (gen_export_html) |
| Social media / documentation | Screenshot (gen_export_screenshot) |
| Archive the complete world | RON + HTML (save both) |