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/GLBHTMLScreenshot
Toolgen_save_worldgen_export_gltfgen_export_htmlgen_export_screenshot
GeometryParametric (editable)Baked meshesThree.js shapesRasterized image
MaterialsFull PBR paramsPBR (color, metallic, roughness)PBR (Three.js MeshStandardMaterial)Rendered
LightingFull (point, spot, directional)Not includedFull (Three.js lights)Rendered
BehaviorsFull (orbit, spin, bob, etc.)Not includedFull (JS animation loop)Static frame
AudioFull (ambience + emitters)Not includedFull (Web Audio API)Not included
CameraFull (position, look-at, FOV)Not includedFull (OrbitControls)Current view
EnvironmentFull (sky, fog, ambient)Not includedFull (background, fog)Rendered
Reloadable in GenYes (gen_load_world)Yes (gen_load_gltf)NoNo
Viewable externallyNoBlender, Unity, Unreal, webAny browserAny image viewer
File sizeSmall (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πŸ”—

InputOutput
No path{workspace}/exports/{timestamp}.glb
path/scene.glbWrites to that path
path/scene.gltfSplits into scene.gltf (JSON) + scene.bin (geometry)
path/sceneAppends .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.glb

HTML 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 viewer

Features of the HTML ViewerπŸ”—

  • No server required β€” open index.html directly 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πŸ”—

ParameterDefaultDescription
pathAuto-generated in workspaceOutput file path
width1920Image width in pixels
height1080Image 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πŸ”—

GoalFormat
Continue editing laterRON (gen_save_world)
Import into Blender / Unity / UnrealglTF (gen_export_gltf)
Share with anyone (no install needed)HTML (gen_export_html)
Social media / documentationScreenshot (gen_export_screenshot)
Archive the complete worldRON + HTML (save both)