Three.js World Generation
For production meshes and Blender assembly, also read 3d-asset-generation.
Three.js remains the semantic interactive/blockout renderer; Blender is the
production renderer when the brief calls for dense reference-grade scenery.
The production handoff must include target dimensions for imported assets,
semantic scatter exclusion zones, terrain-following water/path geometry,
landmark visibility policy, camera clearance, and global/regional/walk review
frames. These are world-spec contracts, not manual Blender cleanup notes.
Create a persistent scene graph, not a sequence of unrelated 2D shots. Preserve the user's explicit constraints, infer missing construction details separately, establish the global terrain first, and refine selected regions without disturbing the world-wide spatial contract.
Choose the fidelity tier explicitly
blockout: procedural primitives, vertex colors, semantic/layout validation, fast iteration. Never call this production-quality, reference-grade, or visually equivalent to WorldClaw.
production: licensed local GLTF/GLB catalogs, a minimum eight-model palette across four semantic categories, three PBR terrain layers, asset provenance, walk-level repetition review, and no primitive landmark fallback.
For a hero video or any reference showing populated textured environments, use production. If its catalog/material/provider requirements cannot be met, stop at preflight or the asset gate. Do not render a blockout as the final deliverable.
Read first
- Read references/worldclaw-principles.md when planning or explaining the coarse-to-fine method.
- Read references/world-spec.md before authoring a
world_spec or calling threejs_world.
- Read
hyperframes-core, hyperframes-animation, and hyperframes-animation/adapters/three.md before editing the emitted workspace.
- Read
threejs-loaders, threejs-materials, threejs-textures, threejs-lighting, and threejs-postprocessing for production-tier work.
Route the request
- Use the
animation pipeline for design-led, explanatory, abstract, or music-led world films.
- Use the
cinematic pipeline for trailer-like mood, dramatic reveals, or source-plus-world edits.
- Choose HyperFrames when the deliverable is the code-native Three.js world. Choose Blender for reference-grade hero rendering and FFmpeg only to package Blender's numbered frames and approved audio. Record that choice at proposal; do not silently switch after approval.
- Keep this as a capability inside existing pipelines. Do not create a new pipeline merely because a scene is 3D.
Workflow
1. Separate intent from completion
Record two lists before planning:
explicit_constraints: only facts the user supplied.
inferred_details: scale, region coverage, terrain operators, densities, palette refinements, and camera details added to make the world executable.
Never smuggle an inferred landmark, biome, or story beat into the explicit list.
2. Plan globally
Author one shared world_spec containing:
- world scale, terrain resolution, elevation range, and seed;
- semantic regions with normalized centers, radii, landform operators, palette, and scatter recipes;
- atmosphere and lighting shared across all regions;
- explicit landmarks with stable IDs and world-space placement;
- a complete camera path with time, position, target, and field of view.
Prefer 3-7 regions. Each region must contribute a distinct silhouette, surface read, or functional role.
3. Build the terrain foundation
For production, first call threejs_asset_catalog to install rights-safe catalogs under projects/<id>/assets/3d/catalogs/<catalog-id>/. Record source, license, archive hash, model inventory, and every selected model in the asset manifest. Then call threejs_world with quality_tier: "production" and the installed catalog paths.
from tools.graphics.threejs_world import ThreeJSWorld
result = ThreeJSWorld().execute({
"operation": "build",
"world_spec": world_spec,
"output_path": "projects/<id>/hyperframes",
"duration_seconds": 60,
"render_mode": "cinematic",
"quality_tier": "production",
"asset_catalog_paths": ["projects/<id>/assets/3d/catalogs/kenney-nature-kit"],
})
Treat world.json, world-spec.js, world-runtime.js, and world-report.json as editable assets. Do not flatten them into a video until the assets gate is approved.
4. Inspect regionally
Build a second pass with render_mode: "semantic" or "wireframe" when spatial problems are hard to see in the cinematic material pass. Inspect snapshots from global, regional, and walk-level viewpoints.
Maintain an issue queue with stable subjects:
- terrain transition or silhouette;
- landmark scale, pose, or contact;
- scatter density, slope rejection, or repetition;
- material contrast and atmosphere;
- camera clearance, clipping, or weak framing.
Fix only the affected region or object when possible. Preserve the seed, region IDs, camera times, and unrelated parameters.
5. Refine with bounded loops
Run at most three render-guided refinement rounds:
- build the workspace;
- run the unified HyperFrames
check gate and snapshot representative times;
- inspect frames and update the issue queue;
- change the narrowest relevant spec fields;
- rebuild with the same seed and compare.
Stop when no substantial issue remains or the iteration budget is reached. Report residual limitations rather than disguising them with overlays.
6. Compose without overwriting
For browser-native delivery, set render_runtime: "hyperframes" and composition_mode: "atelier"; video_compose must preserve the authored workspace. For reference-grade video, render a Blender PNG sequence with resume: true, then set render_runtime: "ffmpeg" for packaging. Preserve the world spec and .blend as the editable source of truth.
Quality gates
- Terrain is continuous and region boundaries blend without obvious seams.
- Every landmark touches its support surface and remains inside world bounds.
- Scatter respects region affinity, slope limits, and deterministic seed behavior.
- Global, regional, and walk-level frames all read as the same continuous world.
- Camera paths remain above terrain, avoid clipping, and provide at least one scale-establishing reveal.
- World source remains editable after render: regions, landmarks, camera keys, and palette have stable IDs or fields.
- HyperFrames
check and post-render review pass before delivery. Use the legacy validate or inspect operations only when supporting an older runtime.
- Production beauty frames contain textured assets at foreground, midground, and background depths; no dominant object may read as an untextured box, cone, octahedron, or dodecahedron.
- Production requires at least four semantic asset categories, eight distinct models, three PBR terrain layers, one regional composition review per camera-critical region, and explicit repetition/contact findings.
Boundaries
- The production catalog path materially improves geometry and surface richness, but it still does not reproduce WorldClaw's GPT-Image-2, SAM3, SAM3D, Hunyuan3D, BlenderMCP, or four-H20 implementation.
- Do not claim articulated assets, game physics, navigation meshes, or interaction logic unless another tool explicitly adds them.
- Do not use unseeded randomness, wall-clock animation, remote models, or render-time asset fetches.
- Do not delete the lower-level
threejs-* skills. They are the subsystem references used when extending this runtime.
1---2name: threejs-world-generation3description: Build deterministic, editable, free-viewpoint Three.js worlds from text or structured briefs. Use for cinematic 3D terrain, semantic regions, procedural biomes, explicit landmarks, environmental scattering, camera fly-throughs, world diagnostics, or requests for a real 3D environment rather than generated 2D footage. Integrates OpenMontage's threejs_world tool with HyperFrames; do not use for a single isolated 3D object or a flat parallax scene.4---5
6# Three.js World Generation
7
8For production meshes and Blender assembly, also read `3d-asset-generation`.
9Three.js remains the semantic interactive/blockout renderer; Blender is the
10production renderer when the brief calls for dense reference-grade scenery.
11
12The production handoff must include target dimensions for imported assets,
13semantic scatter exclusion zones, terrain-following water/path geometry,
14landmark visibility policy, camera clearance, and global/regional/walk review
15frames. These are world-spec contracts, not manual Blender cleanup notes.
16
17Create a persistent scene graph, not a sequence of unrelated 2D shots. Preserve the user's explicit constraints, infer missing construction details separately, establish the global terrain first, and refine selected regions without disturbing the world-wide spatial contract.
18
19## Choose the fidelity tier explicitly
20
21- `blockout`: procedural primitives, vertex colors, semantic/layout validation, fast iteration. Never call this production-quality, reference-grade, or visually equivalent to WorldClaw.
22- `production`: licensed local GLTF/GLB catalogs, a minimum eight-model palette across four semantic categories, three PBR terrain layers, asset provenance, walk-level repetition review, and no primitive landmark fallback.
23
24For a hero video or any reference showing populated textured environments, use `production`. If its catalog/material/provider requirements cannot be met, stop at preflight or the asset gate. Do not render a blockout as the final deliverable.
25
26## Read first
27
28- Read [references/worldclaw-principles.md](references/worldclaw-principles.md) when planning or explaining the coarse-to-fine method.
29- Read [references/world-spec.md](references/world-spec.md) before authoring a `world_spec` or calling `threejs_world`.
30- Read `hyperframes-core`, `hyperframes-animation`, and `hyperframes-animation/adapters/three.md` before editing the emitted workspace.
31- Read `threejs-loaders`, `threejs-materials`, `threejs-textures`, `threejs-lighting`, and `threejs-postprocessing` for production-tier work.
32
33## Route the request
34
35- Use the `animation` pipeline for design-led, explanatory, abstract, or music-led world films.
36- Use the `cinematic` pipeline for trailer-like mood, dramatic reveals, or source-plus-world edits.
37- Choose HyperFrames when the deliverable is the code-native Three.js world. Choose Blender for reference-grade hero rendering and FFmpeg only to package Blender's numbered frames and approved audio. Record that choice at proposal; do not silently switch after approval.
38- Keep this as a capability inside existing pipelines. Do not create a new pipeline merely because a scene is 3D.
39
40## Workflow
41
42### 1. Separate intent from completion
43
44Record two lists before planning:
45
46- `explicit_constraints`: only facts the user supplied.
47- `inferred_details`: scale, region coverage, terrain operators, densities, palette refinements, and camera details added to make the world executable.
48
49Never smuggle an inferred landmark, biome, or story beat into the explicit list.
50
51### 2. Plan globally
52
53Author one shared `world_spec` containing:
54
55- world scale, terrain resolution, elevation range, and seed;
56- semantic regions with normalized centers, radii, landform operators, palette, and scatter recipes;
57- atmosphere and lighting shared across all regions;
58- explicit landmarks with stable IDs and world-space placement;
59- a complete camera path with time, position, target, and field of view.
60
61Prefer 3-7 regions. Each region must contribute a distinct silhouette, surface read, or functional role.
62
63### 3. Build the terrain foundation
64
65For production, first call `threejs_asset_catalog` to install rights-safe catalogs under `projects/<id>/assets/3d/catalogs/<catalog-id>/`. Record source, license, archive hash, model inventory, and every selected model in the asset manifest. Then call `threejs_world` with `quality_tier: "production"` and the installed catalog paths.
66
67```python
68from tools.graphics.threejs_world import ThreeJSWorld
69
70result = ThreeJSWorld().execute({
71 "operation": "build",
72 "world_spec": world_spec,
73 "output_path": "projects/<id>/hyperframes",
74 "duration_seconds": 60,
75 "render_mode": "cinematic",
76 "quality_tier": "production",
77 "asset_catalog_paths": ["projects/<id>/assets/3d/catalogs/kenney-nature-kit"],
78})
79```
80
81Treat `world.json`, `world-spec.js`, `world-runtime.js`, and `world-report.json` as editable assets. Do not flatten them into a video until the assets gate is approved.
82
83### 4. Inspect regionally
84
85Build a second pass with `render_mode: "semantic"` or `"wireframe"` when spatial problems are hard to see in the cinematic material pass. Inspect snapshots from global, regional, and walk-level viewpoints.
86
87Maintain an issue queue with stable subjects:
88
89- terrain transition or silhouette;
90- landmark scale, pose, or contact;
91- scatter density, slope rejection, or repetition;
92- material contrast and atmosphere;
93- camera clearance, clipping, or weak framing.
94
95Fix only the affected region or object when possible. Preserve the seed, region IDs, camera times, and unrelated parameters.
96
97### 5. Refine with bounded loops
98
99Run at most three render-guided refinement rounds:
100
1011. build the workspace;
1022. run the unified HyperFrames `check` gate and snapshot representative times;
1033. inspect frames and update the issue queue;
1044. change the narrowest relevant spec fields;
1055. rebuild with the same seed and compare.
106
107Stop when no substantial issue remains or the iteration budget is reached. Report residual limitations rather than disguising them with overlays.
108
109### 6. Compose without overwriting
110
111For browser-native delivery, set `render_runtime: "hyperframes"` and `composition_mode: "atelier"`; `video_compose` must preserve the authored workspace. For reference-grade video, render a Blender PNG sequence with `resume: true`, then set `render_runtime: "ffmpeg"` for packaging. Preserve the world spec and `.blend` as the editable source of truth.
112
113## Quality gates
114
115- Terrain is continuous and region boundaries blend without obvious seams.
116- Every landmark touches its support surface and remains inside world bounds.
117- Scatter respects region affinity, slope limits, and deterministic seed behavior.
118- Global, regional, and walk-level frames all read as the same continuous world.
119- Camera paths remain above terrain, avoid clipping, and provide at least one scale-establishing reveal.
120- World source remains editable after render: regions, landmarks, camera keys, and palette have stable IDs or fields.
121- HyperFrames `check` and post-render review pass before delivery. Use the legacy `validate` or `inspect` operations only when supporting an older runtime.
122- Production beauty frames contain textured assets at foreground, midground, and background depths; no dominant object may read as an untextured box, cone, octahedron, or dodecahedron.
123- Production requires at least four semantic asset categories, eight distinct models, three PBR terrain layers, one regional composition review per camera-critical region, and explicit repetition/contact findings.
124
125## Boundaries
126
127- The production catalog path materially improves geometry and surface richness, but it still does not reproduce WorldClaw's GPT-Image-2, SAM3, SAM3D, Hunyuan3D, BlenderMCP, or four-H20 implementation.
128- Do not claim articulated assets, game physics, navigation meshes, or interaction logic unless another tool explicitly adds them.
129- Do not use unseeded randomness, wall-clock animation, remote models, or render-time asset fetches.
130- Do not delete the lower-level `threejs-*` skills. They are the subsystem references used when extending this runtime.