topotopo
v0.5.3
Published
An open-source procedural geometry engine: node graphs in JSON, cooked headless and deterministic, exported to Unreal, Blender and Houdini. Built for LLM agents through MCP, and for people through the CLI.
Maintainers
Readme
TopoTopo
TopoTopo is an open-source procedural geometry engine. You describe geometry as a node graph in JSON; the engine cooks it headless and deterministic, and exports it to Unreal, Blender and Houdini. Built for LLM agents through MCP, and for people through the CLI. It runs on Node and WebAssembly with no GPU, every cook is reproducible from the graph and its seeds, and the core is browser-ready.
200+ node types: generators, curves and splines (Bezier/NURBS), sweeps, deformers, attributes and groups, polygon modelling (bevel, knife, bridge, quad fill), UVs (xatlas unwrap, LSCM), remeshing (isotropic, quad, voxel) and LOD, scattering and instancing, robust booleans, Voronoi fracture, an SDF/implicit toolkit and sampled SDF grids, heightfield terrain (masks, hydraulic and thermal erosion, roads, scattering), procedural textures and bakes, cloth draping and inflation (XPBD), L-systems, text, loops, a frame solver, in-graph checks, and code nodes. TopoTopo's own packages, ready-made generators (walls, houses, roofs, stairs, props, trees, rocks, roads, PCG helpers), are used like nodes. Every node documents its params and carries an example that is cooked in the tests.
Familiar to Houdini users: SOP-style nodes, attributes, groups and
.geoexport; Houdini node names work as aliases. Blender Geometry Nodes and Unreal PCG users will recognise the rest.Rust/WASM kernels: a straight skeleton (pitched roofs and polygon offsets from any footprint, holes included), sampled SDF grids with CSG, morphology and sharp dual contouring (
voxel_remesh), field-aligned quad remeshing (remesh_quad), and heightfield erosion and drainage (virtual-pipe and stream-power models, D8/D-infinity flow) are compiled from a Rust crate in kernels/ to WebAssembly: deterministic, no native build.Time: every cook happens at a frame. Only time-dependent nodes re-cook when the frame changes, and the
solvernode advances a simulation frame by frame from its cached previous state.Agent and MCP support: TopoTopo ships an MCP server, so LLM agents can build graphs in one call, read text summaries, look at a multi-view render, edit incrementally with content-hash caching, and verify their work with
assert,explainanddiff. JS escape hatches (wranglewith@Psyntax,script,sdf_expr) cover what the node library does not.Pipeline output: glTF/GLB through gltf-transform (materials from the
materialnode with embedded base colour, normal, roughness and ORM maps, including textures generated in the graph, vertex colours, uv, custom attributes, polylines and points; optional meshopt compression and quantization), Houdini.geo(every attribute and group, packed prims asPackedGeometry), CSV point streams with Unreal PCG columns, points JSON, USDA (UsdPreviewSurface materials), OBJ, PLY, STL and lossless JSON, with Y/Z-up and scale. Mesh splitting follows thenameattribute, for Unreal, Blender and Houdini. Thefilenode reads the same formats back (glTF with meshopt and external buffers,.geoand uncompressed.bgeo, CSV).Scene and folder import. Give the
filenode a GLB/glTF scene, a.blendfile, or a folder of models. Scene empties become points, shared meshes stay packed, and object names, hierarchy paths and custom properties arrive as attributes..blenduses Blender's own headless exporter (install Blender;TOPOTOPO_BLENDERselects the executable). Folders load supported files in name order;nameis the file stem, or<stem>/<name>for files with multiple object names, ready forcopy_to_points {variants: 'name'}.Instancing: packed primitives (Houdini's packed prims) keep a million copies as a million points plus one shared mesh:
copy_to_points {pack: true}(with variants),pack,unpack. Transforms, merges, deletes and attribute nodes work on the instances; other nodes unpack them automatically with a warning. GLB export writesEXT_mesh_gpu_instancingwith per-instance attributes, USDA aPointInstancerwith per-instance primvars, CSV and points JSON an instance stream (one row per instance with its transform and aMeshcolumn, plus a sidecar and one GLB per source mesh, for Unreal PCG), and the renderer draws them within a triangle budget.Terrain: heightfield volumes with noise, masks, erosion (droplet, virtual pipes, stream power, thermal), drainage maps, roads and scatter; export as Unreal Landscape heightmaps (16-bit PNG or RAW
.r16with a JSON sidecar holding the import scale) and 8-bit weight layers, or as oneunreal_landscapebundle: heightmap, every layer, a manifest with the exact Landscape import settings, the meshes and the instance stream.Textures: a Substance Designer / Houdini Copernicus style image node family for PBR materials (noise, patterns, cells, grunge, shapes and signed distance fields with offsets, booleans and bevels, flood fill, blends, levels and histogram tools, warps, slope and directional blur, make it tile, normal, height, curvature and AO conversions, channel packing), with widths and distances in metres so a graph gives the same maps at any resolution, and bakes from meshes in uv space (AO, curvature, thickness, normals and height from a high-res mesh, island ids, masks, vertex colour). Your own PNGs (8 or 16 bit, grey or colour) load as images with
image_fileand go through the same nodes. Images travel with the geometry, materials reference them asimage:<name>, and glTF/USD exports carry them, so assets ship with textures whose licence is the graph's.Live preview and controls: a local three.js page that refreshes whenever a graph changes. Click any node to see its result. A graph's exposed
paramsappear as sliders, checkboxes, selects and colour pickers; dragging one re-cooks only the nodes that read it, the newest value replacing a cook still running, and the page shows which node is cooking and for how long, with a Stop button. Drop your own files anywhere on the page: they land in the packageinputs/folder (withtopotopo view, theinputs/folder beside the graph file), show as grey reference layers (a PNG as a flat picture), andfilenodes read them asinputs/<name>.
Documentation: topotopo.dev has the node reference, TopoTopo's own packages, the example
renders and the release notes, generated from this repository (npm run site).

Setup
Requires Node ≥ 22.18.
As a package. The npm package ships compiled JavaScript (dist/) with a topotopo command:
npx topotopo --catalog # node types by category
npx topotopo --help-node scatter # one node's params, defaults and example
npx topotopo --help-topic export # a help topic (the MCP help tool's text)
npx topotopo graph.json --render out.png --export out.glb # cook, render, export
npx topotopo graph.json --export-all # every output's export target, into its package's exports/
npx topotopo view graph.json # live 3D viewer, re-cooks on save; drops go to inputs/ beside it
npx topotopo mcp --package /absolute/path/to/package # the MCP server over stdioThe current release is v0.4 (release notes); earlier ones:
v0.3, v0.2, the first tagged release. To try unreleased changes, build the tarball from a clone: npm pack, then
npm install -g ./topotopo-<version>.tgz (or, without -g, into a folder of your own).
import { Engine } from 'topotopo' gives the engine API (src/index.ts) with its type declarations, and
import { createNodeHost, openPackage } from 'topotopo/node' the Node host and packages with the packages they use, for a
script that cooks package outputs itself (a world generator): openPackage(engine, dir) puts the packages a package uses, its
graphs and assets in the engine's root scope, and packages.addFor(graph) adds what a graph names on first use.
From a clone. Development runs the TypeScript sources directly (Node type stripping); there is no build step for
working on the code or running the tests. npm run build (run by npm pack) compiles src/ to dist/ for the package.
npm installnpm testnpm test cooks every node type and checks geometry invariants, compares golden fingerprints, runs random-graph
property tests and a wrangle fuzz, checks the node reference is current and cooks every node's documented example,
round-trips every file format and runs the MCP server end to end, the way a real client would. See
Testing. To re-render the examples into examples/renders:
npm run showcaseTo browse the examples in the live 3D viewer without an MCP client:
npm run previewThe viewer opens a package (topotopo edit <package>, the MCP server's package, or topotopo view graph.json) with
the package's default graph in view; the browser tab is named after the package. A package's graphs are the files in
graphs/ and the graph files beside its manifest, <id>.topo. A package without graphs shows its name, a pointer to
TopoTopo's built-in packages and what to ask your agent; a folder that is no package says so and how to make it one. The left panel
has four tabs: Scene (the graph's nodes and guides), Outputs, Inputs and, in a package, Packages (see
Packages). Outputs, the default, shows each graph's results, one card per result, and their textures;
click one to inspect it alone, and Scene in the top bar returns to the whole scene. Publish extra results in graph
JSON with "outputs": {"rotor": {"node": "rotor_final", "label": "Rotor"}}, keeping "output" as the default (a
named output of the output node is the default one, marked so). Each card says what the result is with the words
packages and search use, mesh, instances, points, curves, terrain, textures, material, volume or scene, and its size in a line
beside it ("2049 × 2049 samples, 2 m apart"), and offers only the formats that write it, each with a line saying what
it writes (a terrain: 16-bit PNG or RAW heightmap with its JSON sidecar, mask PNGs, the Unreal Landscape bundle; a
mesh: GLB, glTF, USD, OBJ …). While a result cooks again its card keeps its picture; a card whose cook was stopped
says it is out of date.
Download gets the result in the format you pick as a browser download: the file itself, or one zip when the
format writes several files (a heightmap and its sidecar, a textures folder). Export writes it into exports/:
the first click asks for a format and a file there and stores that target in the graph ("export": "glb", or
{"format": "obj", "path": "parts/rotor.obj", "up_axis": "z"}, on the graph or on an output); later clicks overwrite
the same file, the card's details give its full path, and Export all writes every target. MCP export {output}
and the CLI's --export-all write the same targets. Downloads and exports both carry the record of how they were
made (see below); in the Saved files and Inputs lists a sidecar or .source.json shows with the file it describes.
A heightfield's details have a layer picker: the terrain shows that layer (the mask by default) in red. Inputs
lists your files in inputs/, with Add input (or drop files anywhere on the page); the agent is told about new
ones in its next tool answer. Images open in a 2D viewer with layers and channels (generated textures default to
RGB; use A to inspect packed alpha/AO); JPEG/WebP are for viewing only. Exports always go into the package's
exports/: the folder of the nearest .topo file above the graph, from the viewer, the CLI and the agent alike (a
graph file in no package exports beside itself). For topotopo view graph.json, inputs/ is beside that graph.
The Controls panel, at the top of the right column, holds the graph's exposed vars; Properties below it says
what the selection is. Above the controls, and in the status bar, the cook in progress: the node cooking and the time
so far, then the last cook's time, or the failing node and its message. Stop in the status bar ends a cook at the
next node (long nodes such as erosion stop between their iterations; others finish first, and the line says so); the
view keeps the last finished result. Changing a value while a cook runs starts over with the newest value. The status
bar also says what the view shows and its size; other messages appear over the view and clear themselves. edge
check in the top bar draws open, non-manifold and flipped edges as the render tool does.
Guides lay a scene out by hand where sliders are not enough: the guides tools in the top bar (or Shift+1–4)
place nulls, draw curves and areas and drag volumes, on your reference layers or the ground. In select mode, drag a
guide to move it and a point (a CV, a null, a volume's corner) to move that point; double-click a curve's line to add
a CV and a CV to remove it; every change is one undo step. Guides are saved as inputs/markers.json, curves and areas
as polylines and nulls as points, each with its name and role, and a graph reads them like any input
({"type": "file", "params": {"path": "inputs/markers.json", "missing": "empty"}}, which cooks before the first guide
exists). The scene cooks again after a guide edit, and an agent reads the same file. Try it on the example village:
topotopo edit examples/guided_town. There, curves named road… become roads with lamp posts, fence… fences, areas
named house… houses on that footprint, forest… woods; volumes clear the woods, and nulls named bench…, lamp…
or tree… place one.

With topotopo view graph.json the graph file stays as you wrote it: the values you tune are kept by the viewer,
through exports, output switches and saves of the file (a value goes back to the file's only when its declaration in
params changes or the var is removed). A mark shows each value that differs from the file; ↺ takes one back,
Reset all takes all of them back, and Save values writes them into the file's vars. The viewer's writes to
the file (saved values, export targets) change only those values: formatting, key order and number spellings stay.
The default TopoTopo keymap uses right-drag orbit around the surface beneath the cursor, middle-drag pan and wheel zoom toward the cursor. F/A frame, 1–4 select cameras, 5–7 change shading, O toggles orthographic and Space toggles quad view. Maya, Houdini and Blender presets, including previously saved choices, remain available.
Threads. Heavy per-element work (noise displacement, attribute noise, occlusion rays, point wrangles) runs in
chunks on a pool of worker threads, and independent graph branches cook concurrently. The output is the same bit for
bit with or without it. TOPOTOPO_WORKERS sets the number of threads (default: CPU threads − 1; 0 turns the pool
off). Threads start on first use and stop after 30 s idle (TOPOTOPO_WORKERS_IDLE_MS); small inputs stay on the main
thread.
Connect to Claude Code
With the package, the server is the mcp subcommand of the topotopo command:
claude mcp add topotopo -- npx -y topotopo mcp --package /absolute/path/to/packageFrom a clone, the repository includes .mcp.json (it runs node src/mcp/server.ts), so opening a Claude
Code session in this folder offers the topotopo server. To register a clone from anywhere, use an absolute path:
claude mcp add topotopo -- node /absolute/path/to/topotopo/src/mcp/server.ts --package /absolute/path/to/topotopo/packageOther MCP clients (Claude Desktop, …)
With the package:
{
"mcpServers": {
"topotopo": {
"command": "npx",
"args": ["-y", "topotopo", "mcp", "--package", "C:/path/to/package"]
}
}
}From a clone, run the sources instead: "command": "node", "args": ["C:/path/to/topotopo/src/mcp/server.ts",
"--package", "C:/path/to/topotopo/package"] (node src/cli.ts mcp … is the same server).
Options: --viewer (start the live preview immediately), or set TOPOTOPO_PORT, TOPOTOPO_PACKAGE,
TOPOTOPO_SCRIPT_TIMEOUT_MS, TOPOTOPO_SIM_TIMEOUT_MS and TOPOTOPO_WORKERS. The server exits when the client closes its stdin.
The package folder holds graphs/ (one JSON file per graph), assets/ (saved assets), inputs/ and exports/.
inputs/ is where you put your own material: meshes, guide curves and points, blockouts and PNG masks from Blender,
Houdini or Unreal (glTF, OBJ, STL, PLY, .geo, CSV, PNG). The agent's inputs tool lists and describes them, and a
file node reads one as inputs/<file> (a PNG as an image for the texture nodes). Naming objects path.river, zone.park, site.well, volume.no_trees or
blockout.house tells the agent what they mean (help topic inputs).
When the server starts, it makes its folder a package (an <id>.topo and a starter graphs/main.json, so that its
graphs can use packages, TopoTopo's own among them) if the folder is in no package and holds nothing but these four
folders, or nothing at all, as a new one does; the default folder, <cwd>/topotopo, takes the name of the
folder it is in. A folder with anything else in it, such as a repository or a folder of your own files, stays as it is
until you say so: workspace {action: "init"} (or topotopo init <folder>) makes it a package. A folder inside a package
works in that package's folder. The first reply the agent gets says which of these happened.
MCP tools
| tool | purpose |
|---|---|
| catalog | node types by category (filter/search), with the outputs of the packages the open package uses and of TopoTopo's own packages |
| help | exact node docs (params, defaults, ranges, aliases, examples) and topics: graph, inputs, expressions, time, wrangle, groups, attributes, sdf, heightfield, textures, loops, instancing, rbd, pcg, curves, particles, assets, packages, uv, render, export, verify, cloth, workspace, recipes; a package output's params, inputs, version and note, also one search found that the package does not use yet |
| build | create/replace a graph and cook it; dry_run, mode: "merge", optional render, frame (also on edit, inspect, render, export); params declare the vars a person tunes (type, desc, min, max, options, label, step), shown as controls in the viewer |
| edit | incremental ops: set, add, insert-after, remove (auto-rewire), connect, rename, replace, output, vars, bypass |
| inputs | list the files in the package inputs/ folder (kind, size, date, counts, bbox, object names; PNG size and bit depth) and describe one: polygons vs open polylines vs loose points vs packed prims, bbox, attributes, groups, every name / role value, materials |
| inspect | one-screen summary (counts, triangles, bbox to the millimetre, parts, materials, images, uv state, open edges), detail: "budget" (triangles per part, per LOD and per node), detail: "scene" (the glb export read back: nodes, sockets, parents, meshes, materials, images), attribute stats, topology health (a closed solid or why not: open edges counted after welding uv/normal seam splits, non-manifold edges, flipped faces, inward pieces, degenerate faces, each with the part and world position of the first one and the fix; pieces, volume, genus, render/export triangle slivers), element listings, images (size and per-layer ranges), detail: "uv" (exact uv overlaps split into in-tile, tiling and across-LOD overlap with parts and positions, collapsed and out-of-tile triangles, charts, utilization, per-piece texel density; json: true) |
| render | PNG with persp/front/right/top views (every 3D view fits the bounds; zoom is relative to that fit), three-quarter views (front_left, back_right, …), size: "1600x600" for wide views, transparent background, grid: false, a reference image behind the views (underlay, underlay_opacity, underlay_fit), scene empties as labelled dots (sockets), turntable, a uv view (quad_uv), uv checker, a texture view of images and textures: true for base colour maps on meshes, colour by attribute (+ legend), group highlight, flipped normals in blue; opt-in overlays: section view and clip plane with filled caps, edge overlays (wireframe all / hard / boundary / groups), glyphs (N, up, orient, v), group / piece / attribute labels and point / prim numbers, shading flat / matcap / ao, shading: "pbr" (the exported metallic-roughness material with its base colour, normal, orm and roughness maps under a fixed studio rig; deterministic, exposure in stops), scale: 2, view_labels: false (no view labels or axis gizmo, as in the built-in packages' thumbnails), bounds (world-space [[x0, y0, z0], [x1, y1, z1]] that every 3D view frames, so a timelapse or turntable shares one camera), footer: false (no footer strip), heightfield_res (heightfield quads drawn per side, default 256, or "full"), heightfield_layer (the heightfield layer drawn in red, default the mask, or "none"); a footer line names what is shown (help topic render) |
| export | glb / gltf / obj / usda / ply / stl / json / geo / csv / points.json (packed instances: instance rows + meshes sidecar + one GLB per source); heightfields: png16 / r16 (+ JSON sidecar with the Unreal import numbers) / mask_png / unreal_landscape (a directory bundle); images: textures (one PNG per image; glb/gltf embed and usda writes the textures materials use); every export records its source (graph, vars, seeds, frame, version) to be made again |
| graphs | list / get / delete / rename / duplicate package graphs (stored as JSON in the package's graphs/) |
| assets | save a graph with vars as a reusable node type (like an HDA); list / get / delete; fork copies a package output's graph (TopoTopo's own included) into the package's assets to edit |
| explain | describe a node's geometry in words: "reads as" summary, pieces, watertight, genus, flipped normals, symmetry planes, principal axis, wall thickness, degenerate faces, attributes, groups |
| diff | compare two graphs, nodes or frames: counts, bbox delta, attribute/group changes, heightfields, images and SDF grids, Hausdorff and mean distance, verdict; render: true adds an overlay (grey same, blue only b, orange only a) |
| preview | start the live viewer and return its URL |
| workspace | the workspace around the open package: show it, list or unlist its shared libraries with libraries (when the person names one), or make a folder one with init_workspace; the person's registered workspaces and libraries (the web app): list / get (with thumbnail) / create / set / bake, and open, which makes a package the folder every tool and the viewer work in, or init, which makes the server's folder a package; the packages the open package uses: packages (one line each; with package, one package's outputs), search (the outputs of every place the package looks in by words, kind and tag, and whether the package can use them), use, remove, follow (a package's working folder for the session), publish (with dry_run: true a dry run, which the agent shows the person before publishing), outdated (the newer versions and their notes) and update (a before/after with overlay renders, applied with the versions it showed when the person says so) |
Graph format
{
"vars": { "count": 200 },
"nodes": {
"ground": { "type": "terrain", "params": { "size": [30, 30], "height": 3 } },
"pts": { "type": "scatter", "in": ["ground"], "params": { "count": "=count", "seed": 1 } },
"rock": { "type": "sphere", "params": { "type": "ico", "level": 2, "radius": 0.3 } },
"rough": { "type": "noise_displace", "in": ["rock"], "params": { "amplitude": 0.08, "frequency": 4 } },
"rocks": { "type": "copy_to_points", "in": ["rough", "pts"] },
"out": { "type": "merge", "in": ["ground", "rocks"] }
}
}The conventions are Houdini's: Y-up, metres, degrees, and attributes such as P N Cd uv pscale orient up width name class.
Any param can be an expression: a string starting with = is evaluated as JavaScript with the graph vars
("=count * 2"), the cook time (frame, time, fps, timeInc) and functions that read other nodes of the same
graph: npoints('pts'), nprims, nvertices, bbox('base').size.y (also min, max, center), centroid,
detail('n', 'attr'), point('n', i, 'P'), prim('n', i, 'attr') and ch('box1/size') for another node's param.
Referenced nodes become dependencies: they are cooked first, editing them re-cooks the reader, and unknown names or
cycles are reported before cooking. Node names must be string literals; these functions are not available in vars.
Expressions run in a sandbox that sees only these names, Math, the conversions (Number, parseFloat, parseInt,
String, Boolean, isFinite, isNaN) and the helpers listed by help {topic: "expressions"}.
Code reads graph vars the same way, by their bare name: wrangle, script, sdf_expr, heightfield_layer, the
parametric nodes and the expressions of group and assert (@P.y += height, not vars.height). Vars are read-only,
and a node re-cooks when a var its code names changes. A var's name must be one code can read: not a JavaScript
keyword, a helper (noise, rand, length …), a built-in or the time (frame, time); validation names the clash.
Group patterns look like top, !top, 0-10 or @P.y>0.5. A wrangle snippet looks like this (amplitude and seed
are graph vars):
@P.y += noise(mul(@P, 2)) * amplitude;
@Cd = hsv2rgb(rand(@ptnum, seed), 0.6, 1);
if (@P.y < 0) removepoint(0, @ptnum);Security
A graph is code: "=expr" params and the code of wrangle, script, sdf_expr and similar nodes are JavaScript
taken from the graph JSON. On Node, expressions and wrangles run sandboxed in separate vm realms with a timeout
(TOPOTOPO_SCRIPT_TIMEOUT_MS, default 30 s): an expression sees only graph vars, the cook time, Math and the
documented helpers (no process, require, import, fetch or globalThis), and a runaway loop fails its node
instead of hanging the process. The same timeout covers script, heightfield_layer and the parametric nodes, an
sdf_expr field wherever it is sampled (sdf_to_mesh and sdf_grid run their whole sampling under it), and reading
whatever such code throws. Params that count something have upper bounds (larger values are clamped), and the
long-running nodes (rbd_settle, rbd_stack, drape, inflate, particles, heightfield_erode, remesh_quad) stop
with an error after TOPOTOPO_SIM_TIMEOUT_MS (default 10 minutes; the WASM calls of the last two only when the worker
pool is on). That contains mistakes, not attackers: sandboxed code can still allocate memory and burn CPU until the
timeout, combinations of large params and inputs can still exhaust memory, and a vm realm is not a hard security
boundary. Do not cook graphs from untrusted sources in a privileged process.
Node types
Image cutouts and atlases: workflow guide, example graph. Four general nodes crop images, trace masks, extend edge pixels and pack aligned maps. Material alpha masking is preserved in GLB and shown in the live and headless previews.
| category | nodes |
|---|---|
| generate | box grid sphere tube torus platonic points point_grid parametric_surface terrain lsystem text beam (beams between points or along curve segments, any profile) |
| curve | image contours trace_image; parametric_curve line circle curve spiral shape2d resample carve ends sweep polywire revolve extrude offset_curve boolean2d fill loft voronoi2d triangulate2d bezier nurbs (Bezier/NURBS curve prims, evaluated exactly wherever they are used) convert_curve spline_fit fillet_curve offset_curve_3d project_curve curve_attribs straight_skeleton (skeleton, polygon offset, pitched roof) |
| transform | transform match_size mirror |
| deform | noise_displace twist bend taper smooth peak jitter ray soft_transform lattice path_deform point_deform rest |
| attribute | attrib_create attrib_randomize attrib_promote attrib_delete attrib_rename attrib_copy attrib_transfer attrib_array attrib_noise attrib_string (names from a pattern, find/replace, case) color material measure connectivity (float/int tuples, strings, and float[]/int[]/string[] array attributes) |
| measure | curvature occlusion (ambient occlusion, cavity, thickness) distance assert (in-graph checks: watertight, counts, bbox, edge length, degenerate, self-intersections, attributes, groups, expression) |
| group | group delete group_promote group_expand group_combine group_delete group_rename (point, vertex, prim and edge groups) |
| topology | sort normal fuse clean reverse facet triangulate subdivide poly_extrude solidify (constant-thickness shell, mitred folds, rims; invalid results are errors) poly_bevel grid_split fill_holes bound decimate remesh (voxel) remesh_isotropic remesh_quad (field-aligned, quad-dominant) mesh_repair lod knife polysplit edge_divide dissolve edge_collapse polybridge polyfill remove_interior (faces buried inside other parts) |
| copy | copy_xform scatter (count or density per m², density attribute + 0..1 mask, blue noise, relaxation, exact min distance, per-prim cap) copy_to_points (real copies or packed instances; variants by attribute or weights) pack unpack |
| pcg | mask (slope, height, curvature, occlusion, distance, direction, noise, attribute, group, inside; combine) attribute_from_map (PNG → attribute by uv or planar projection) orient (orient/N/up from normals, a surface, curve tangents, a direction or target; random yaw, tilt, scale) points_along_curve cluster (k-means, radius) prune (overlap, density, expression, near geometry) |
| solid | convex_hull boolean clip minkowski smooth_solid voronoi_fracture slice |
| sdf | sdf_shape sdf_expr sdf_combine sdf_modify sdf_from_mesh sdf_to_mesh (implicit, lazily sampled); sampled grids (Rust/WASM): sdf_grid grid_combine grid_offset grid_blur grid_dilate grid_erode grid_resample grid_to_mesh (sharp dual contouring or marching cubes) grid_to_sdf voxel_remesh |
| heightfield | heightfield heightfield_noise heightfield_from_mesh heightfield_from_image heightfield_to_mesh heightfield_to_sdf heightfield_remap heightfield_blur heightfield_terrace heightfield_clip heightfield_cutout heightfield_layer heightfield_mask_by_feature heightfield_mask_by_object heightfield_mask_noise heightfield_mask_blur heightfield_mask_expand heightfield_erode heightfield_fill_sinks heightfield_flow heightfield_project heightfield_path heightfield_scatter heightfield_resample heightfield_transform heightfield_crop (grids in XZ with named layers; tiles cropped from a map match it; export png16/r16/mask_png for Unreal Landscape) |
| uv | uv_project uv_transform uv_unwrap (xatlas) uv_flatten (LSCM) uv_layout uv_autoseam |
| texture | generators tex_noise tex_pattern tex_cells (with crystal facets) tex_gradient tex_constant tex_shape tex_sdf_shape (signed distance in metres) tex_grunge (dirt, leaks, spots) tex_splatter tex_scratches tex_text; PNG files image_file; filters tex_blend tex_levels tex_curves tex_blur tex_directional_blur tex_slope_blur tex_warp (directional, slope, vector, non-uniform, multi-directional) tex_transform tex_make_tile tex_edge_detect (Sobel, or lines of a width in metres along an outline) tex_invert tex_threshold tex_clamp tex_quantize tex_auto_levels tex_histogram_scan tex_histogram_range tex_histogram_select tex_normal_from_height (relief in metres) tex_normal_blend (reoriented normal blending) tex_normal_normalize tex_normal_invert tex_height_from_normal tex_curvature tex_ao (ground-truth AO in metres) tex_height_to_ao tex_channel (ORM packing) tex_colorize tex_tile_sampler (scale, rotation and intensity maps, several stamps, id and colour outputs) tex_output; shapes and regions in metres tex_sdf_from_mask tex_sdf_op (offset, round, stroke) tex_sdf_boolean tex_sdf_to_mask tex_bevel tex_distance tex_flood_fill; cutouts and atlases tex_crop tex_dilate tex_pack; bakes in uv space bake_ao bake_curvature bake_thickness bake_position bake_normal bake_world_normal bake_height bake_island_id bake_mask bake_vertex_color; texture_to_material tex_to_heightfield heightfield_to_tex (images are 2D float layers carried on the geometry, each named after the node that made it; glb/usda embed them, export format textures writes PNGs) |
| sim | particles (Houdini POPs in one node: emission from points, gravity, drag, wind, curl noise, point/heightfield/SDF fields, attraction, floor and mesh collisions with die/slide/bounce, trails as polylines; steps with the frame, each frame's state cached; bit-identical on the worker pool) rbd_settle (drop pieces onto a terrain, container or ground until they rest; Rapier rigid bodies, packed instances stay packed) rbd_stack (drop them one at a time into piles) drape (XPBD cloth: colliders, floor, pins, wind, self collision) inflate (pressure: cushions, balloons) |
| code | wrangle script |
| flow | merge switch null input foreach solver graph_ref (plus saved assets) |
| io | file (obj, stl, ply, glb/gltf, geo/bgeo, csv, points.json, json), scene_null (named scene empty / attachment socket: a meshless glTF node under the root, an empty or a mesh) |
| package | the outputs of packages by full name, TopoTopo's own among them: topotopo/architecture/stairs topotopo/architecture/house topotopo/architecture/roof_skeleton topotopo/props/crate topotopo/nature/tree_lowpoly topotopo/nature/forest_patch topotopo/street/road_strip …; every one is listed with its thumbnail under TopoTopo's own packages |
Every node's inputs, parameters (types, defaults, ranges, options, aliases) and outputs are listed in the generated node reference.
Examples
examples/ holds the showcase graphs, each rendered by npm run showcase into examples/renders:
rocks on terrain, an L-system tree, a Voronoi-fractured sphere, an SDF creature, a procedural building (foreach,
grid_split, inset/extrude windows), an engraved sign (text + boolean), a Voronoi city, spiral stairs (copy_xform + sweep), wrangle waves, a CSG
bracket, a solver growth animation (rendered at the frame named by its meta.frame), polygon editing (loop cuts, knife,
bridge, quad fill, dissolve), bevels (rounded box, chamfered top edges, a star with a rounded rim), a UV toolkit demo, and a
render-overlay demo (render_modes: section view, hard edges, normal glyphs, group labels, matcap). A graph's meta.render
takes any render tool option. The forest example is the PCG chain (mask → scatter → orient → prune → packed copies of three weighted tree variants from 30,000 candidates), pcg_scatter puts lamp posts along a road and cluster-coloured rocks away from it, and terrain_erosion is an eroded
heightfield with a road and rocks on its steep slopes. unreal_demo is the Unreal 5.8 demo scene: an eroded 253 × 253 heightfield that fits an
Unreal Landscape exactly, weight layers, a road, and packed trees and rocks with variants and materials; npm run export:demo writes its file set
(landscape bundle, scene.glb, scene.usda, scene.geo, instances.csv with meshes) to out/unreal_demo/.
splines shows the curve toolkit: a NURBS road projected onto bumpy ground, a boardwalk with filleted corners and
offset handrails, and a Bezier letter extruded. street_block is a street block built only from TopoTopo's own packages
(see TopoTopo's own packages). textures is a brick wall material made only from texture
nodes and the props package's crate with baked AO and curvature turned into worn paint on its edges and an ORM map,
rendered with textures: true next to the texture view. texture_lab is worn painted metal from texture nodes only:
SDF plates and rivets, edge wear from curvature, chipped by grunge and slope blur, brushed steel under the paint, a paint
tint per plate from flood fill, rust running from the rivets, AO and an ORM map.
guided_town (examples/guided_town, a package of its own) is a village laid out with the
viewer's guides: a road, house footprints, a fence, woods and a clearing in its inputs/markers.json, built from
TopoTopo's own packages; open it with topotopo edit examples/guided_town and drag them.
house_city spawns the architecture package's house on a grid of lots with per-lot parameters, and skeleton_roofs shows
straight-skeleton roofs (an L-shaped house, a courtyard roof around a hole, nested offsets). deformers (lattice,
path_deform, soft_transform), measures (curvature, occlusion, distance, assert) and remesh_lod (isotropic remesh,
repair, LOD levels) cover their node families; voxel_remesh compares sharp dual contouring with marching cubes on a
sampled SDF grid, quad_remesh shows field-aligned quads on a noisy sphere, a bevelled box, a rock and a tube, and
erosion_models erodes one ridged terrain four ways (TypeScript and WASM droplets, virtual pipes, pipes plus stream
power), and terrain_tiles bends escarpments and a river with domain-warped noise, with one tile of the map cooked on
its own (heightfield_crop) floating above the area it matches. particles runs particles down an eroded massif from emitters on its ridges (the heightfield as gradient field and
collision surface, curl noise, sliding contacts; trails coloured by age) next to a fountain bouncing on a plane.
rbd_settle drops the nature package's rocks onto the rocks_on_terrain landscape until they rest (rigid bodies) and piles
crates on a pad with rbd_stack. drape is the cloth family: a tarp draped over a stack of the props package's crates, a
banner pinned between two poles in the wind, and a box inflated into a cushion.
To cook a graph from the command line:
node src/cli.ts examples/tree.json --render out/tree.png --export out/tree.glb
node src/cli.ts examples/csg_bracket.json --render out/bracket.png --section x:0.3 --wireframe hard --labels groups --shading matcap
node src/cli.ts examples/csg_bracket.json --views front --size 1600x700 --underlay ref.png --render out/compare.png # a reference image behind the view
node src/cli.ts examples/street_block.json --inspect budget # triangles per part, per LOD and per node
node src/cli.ts examples/street_block.json --inspect scene # what the glb export holds: nodes, sockets, materials, images
node src/cli.ts examples/terrain_erosion.json --node road --export out/terrain.png # 16-bit heightmap + terrain.json (Unreal)
node src/cli.ts examples/unreal_demo.json --node landscape --format unreal_landscape --export out/level # Landscape bundle
node src/cli.ts examples/forest.json --node forest --export out/trees.csv --pcg # instance rows + trees.meshes.json + trees_meshes/*.glb
node src/cli.ts examples/rocks_on_terrain.json --var seed=11 --var rock_count=300 --render out/rocks.png # vars for one run
node src/cli.ts view examples/unreal_demo.json # live viewer at http://127.0.0.1:7341: node list, per-node geometry, re-cook on save
node src/cli.ts --help-topic export # a help topic; --catalog ends with the list--var name=value sets a graph var for one run without editing the file (repeat it; numbers, true/false and JSON
values are parsed, other text is a string; an unknown name lists the graph's vars). --output <name> renders, exports
and inspects a named output (the graph's "outputs") instead of the default one; --output naming a node (or --node
naming an output) says which flag to use. Relative paths inside a graph (file nodes, texture maps) read from its package
folder: the nearest folder with a .topo file at or above the graph file, else the graph file's folder (the MCP server
and the viewer use the same rule), and --export-all writes into that folder's exports/. Several --render flags
share one cook: the options after a --render apply to that render, those before the first to every render (a warning
names options left after the last of several). Renders draw heightfields at up to
256 quads per side, so a 513 × 513 field shows at 257 × 257 and the footer says so; --heightfield-res full draws
every sample. They show the mask layer in red; --heightfield-layer flow shows another layer (none: none).
Every export records how it was made in a source block: the graph's name and the SHA-256 of its JSON as cooked, the
output and node, frame and fps, every var after overrides, the seeds the graph sets, the format and options, and the
TopoTopo version; the options are every one the format reads, the defaults included, so a later default change does not
change what a record replays. Heightmaps (png16, r16) keep it in their .json sidecar, instance rows in <name>.meshes.json
and the Unreal Landscape bundle in landscape.json; every other export writes <file>.source.json next to the file (a
textures folder gets source.json inside it), and glTF also carries it in asset.extras.source. The same graph,
values and options give the same bytes, so the manifest is enough to make the export again: pass its output
(--output) or node (--node), --frame, --fps, one --var name=<value as JSON> per var, --format and every
option as its flag (--up-axis z, --custom-attribs / --no-custom-attribs, --layers a,b; help topic export).
Animated graphs cook at a frame (--frame 40) or over a range. With --frames, output paths may contain {frame} or
{frame:04}; without a pattern, .0001-style frame numbers are inserted before the extension:
node src/cli.ts examples/solver_growth.json --frames 1-48 --render "out/growth_{frame:04}.png" --export out/growth.glbUnreal Engine 5.8
The optional TopoTopoPCG plugin reads CSV or points.json
directly into PCG, resolves mesh names through the instance sidecar and editable asset mappings, and provides a
TopoTopo Instance Spawner backed by Unreal's Static Mesh Spawner. Tools > Import TopoTopo scene imports
the GLB prototypes and materials, places the CSV instances as HISM components, and can import an exact-fit
Landscape heightmap. Generate the sample with npm run export:demo; the plugin README gives installation,
the two-node PCG graph, coordinates, automation tests and editor verification steps. It is separate from the npm
package; copy it into your Unreal project's Plugins/ directory.
Godot 4.7
A package inside a Godot project imports into it as <id>.topo: each published output becomes a plain GLB that Godot
imports itself (sockets as Node3D, LOD pieces as sibling meshes, packed instances as MultiMeshInstance3D), and a
textures output becomes PNGs. Levels place and load the GLBs; their Advanced Import Settings survive every recook.
Only outputs whose sources changed cook again, only files whose bytes changed are written, and a failed output keeps
its last good GLB. The GLBs, their .import files and the record <package>/.topotopo/godot.json are committed, so a
teammate or build machine without TopoTopo still builds the game.
topotopo godot setup <godot project folder> [--no-enable]
topotopo godot status <godot project folder> [--strict] [--json]
topotopo cook <.topo | package folder | folder>... --for godot [--into <folder>] [--flat] [--skip a,b] [--instancing packed|expand] [--adopt] [--force] [--no-cache] [--timeout <s>] [--report <file>] [--progress json] [--quiet]
topotopo cook --jobs <jobs.json> [--force] [--no-cache] [--progress json]godot setup copies the plugin into addons/topotopo/, records where TopoTopo is, hides each package's TopoTopo
folders from Godot (.gdignore), enables the plugin, adds the cook's files to .gitignore and keeps the addon out of
every export preset. godot status --strict exits 1 when a package is stale, failed, never cooked or exposes its
folders: run it in CI after godot --headless --import. topotopo cook --for godot writes exactly what the plugin
writes (options from <id>.topo.import, flags override them). Exit codes: 0 ok, 1 an output or package failed, 2 a
usage or setup error. --help-topic godot has the details; the plugin's contract is
integrations/godot/PROTOCOL.md.
In the editor, the plugin (integrations/godot/addons/topotopo) cooks
in the background while you work: save a graph in TopoTopo's viewer (right-click a .topo or one of its outputs:
Open in TopoTopo) or let an agent change it over MCP, and the changed GLBs reimport and open levels update. A
failed output shows Godot's ImportFail icon on the .topo, an Output line naming the node, a toast and a row in the
TopoTopo panel, while levels keep the last good GLB. Without TopoTopo on a machine, the committed outputs are used
and godot --headless --path <project> --script res://addons/topotopo/tools/check.gd checks them in CI. To try it,
set up the demo project with topotopo godot setup integrations/godot/demo and follow its
README.
Web app
topotopo web is a file explorer of your workspaces and libraries with TopoTopo's knowledge on top, at
http://127.0.0.1:7340. Every folder is a page that mirrors the folder on disk, so you audit a game where its files are.
topotopo workspace add D:/games/my-game
topotopo library add props D:/shared/props
topotopo web- Front page: each registered workspace and library as a card with a few pictures from inside and its counts of packages, folders, files and flags; TopoTopo's built-in library last. The search finds every package by name, tag and the packages it uses, and their outputs by name, kind and tag.
- Folder pages at
/w/<workspace>/<path>/and/l/<library>/<path>/: the folder's flags, its notes, a card per subfolder (with a picture and counts) and its files by type: images to view large, sounds and videos in players, models (.glb,.gltf) in 3D on a click, the rest to open or download. The same addresses serve the files, read only and with ranges (players seek); SVG and HTML are downloads only. - Notes: every
.mdand.txtfile in a folder is a box on its page: aREADMEfirst, then documents, then text files, each in file name order (01-overview.mdfirst). A folder of many notes shows 24 as boxes (always those with a flag) and lists the rest with its files; a link to one of them opens it on its folder's page. Markdown renders (front matter as the note's properties, headings, lists, emphasis, code, quotes, tables, links, images; raw HTML stays text). A link shows what it leads to: an image, a sound or video in a player, a model as a 3D view, a folder or package as a card titled with the link's words, a YouTube or Vimeo address in its privacy player (youtube-nocookie.com, player.vimeo.com, the only outside content the web app loads), a heading (#usage,other.md#setup), anything else as a link. Alone in its paragraph the card, picture or player stands in its place; in running text the link stays a link, marked with an icon, and the card, picture or player follows the paragraph. Paths are read from the note's folder (/from the workspace's root);res://from the Godot project,/Game/from Unreal'sContent/. A link to a missing file is struck through. A path that leaves the tree, names a drive or a network share (\\host\share) or passes hidden folders stays text and is never looked up. - Packages: a folder with a
.topofile shows its package on its page, in one piece: the baked preview in 3D (the wheel scrolls the page until you click into it, or hold Ctrl), description, tags and links, Open in editor and Re-bake, its published outputs, versions, the packages that use it and those it uses, its graphs and exports; then its notes and attachments. Previews bake by themselves when graphs change; after a failed bake the last good preview stays, marked. - Flags, at the top of a page and counted on the cards of the folders above it: a link in a note to a missing file, a preview that did not cook (with why), a package that publishes versions and has none or has changes no version holds, an export older than its graph (its recorded source no longer matches the graph), published outputs that no package of the workspace uses. Each says what to do. Audits run in the background and are made again for the workspace or library that changed; a very large tree is audited in part, and its pages say where it stopped.
- Hidden: dot folders,
node_modules,topotopo-packages/, a package'sversions/andpackages/, the engines' caches (.godot,Intermediate,Saved,DerivedDataCache,Binaries) and the files Godot writes beside yours (*.import,*.uid), also when reached by another name (a link, a Windows short name); Unreal's.uassetand.umapfiles are one line with a count. An engine project inside a workspace is one card that opens as pages of its own, not audited.
Each package keeps a stable address for boards and wikis: /p/<workspace or library>/<id> leads to its folder page,
/p/<…>/<id>/thumb.png is its thumbnail and /embed/<…>/<id> a 3D view to frame. Workspaces and libraries share one
set of names; a library inside a registered workspace shows as the workspace's folder. The web app listens on
127.0.0.1 only and never cooks in its own process.
Workspaces, packages and libraries
Three words: a workspace is a folder tree, one production (a game, an archviz job), with topotopo-workspace.json
at its root; every folder in it with a .topo file is a package, and the packages of a workspace find each other
by themselves; a library is a shared folder of packages registered on this machine (topotopo library add <name>
<folder>), which a workspace lists to use it. TopoTopo's built-in library is always there.
The workspace's preferred place is inside the engine's content folder: the Godot project folder or a folder in it,
Unreal's Content/ or a folder in it. Explorer, the engine and the web app then show one tree, and each package's
exports/ lies inside the engine project, where the engine imports from. Plain folders group packages (a Godot project
keeps its content in assets/):
my-game/ the Godot project
project.godot
topotopo-workspace.json {"name": "my-game", "libraries": ["props"], "engine": {"type": "godot", "project": "project.godot"}}
topotopo-packages/ one copy of each package version the workspace uses
assets/props/lantern/ a package: lantern.topo, graphs/, inputs/, exports/, attachments/
assets/levels/yard/ a package that uses studio/rocks from the props librarytopotopo workspace init makes a folder a workspace: it finds the engine project at or above the folder, else one
below it (--engine godot:<path>|unreal:<path>|none names it), and says when Unreal will not see the workspace (outside
the project's Content/ or a plugin's), which packages lie outside an engine project found below it, and which Godot
export presets would ship TopoTopo's files, with the exclude_filter entries to add (*/attachments/*, */graphs/*,
*/inputs/*, *.topo, */exports/*.source.json, */exports/.outputs.json). topotopo workspace library add props lists a
shared library for the workspace (a registered name, or a folder outside the workspace, written as its path from the
workspace); remove unlists it. The tools never add a library by themselves.
Where a package finds packages: in a workspace, in the workspace itself, then in the shared libraries its file lists,
in order, then in TopoTopo's built-in library. Outside a workspace, in the library the package is in (read from the
package's own checkout, so its siblings come from the same worktree), then in every other registered library, then in
the built-in library. A name comes from the first place that has it, and the same name in a later place is not used
(topotopo packages and search say so). Only the built-in library has the packages named topotopo/…. Two folders of
one workspace or library publishing the same name leave that name out until one is renamed, and publishing blocks.
The scan that finds a workspace's packages does not enter a package (a package holds no other), and skips dot folders,
node_modules, topotopo-packages, Unreal's Binaries, Intermediate, Saved, DerivedDataCache,
__ExternalActors__ and __ExternalObjects__, C#'s bin and obj beside a project file, a folder holding another
engine project, another workspace and a TopoTopo checkout.
Godot. Inside a Godot project TopoTopo keeps a .gdignore in each package's versions/, packages/ and inputs/,
its working folders, so Godot imports none of them; topotopo check adds one that is missing. attachments/,
exports/ and graphs/ stay visible to the engine, until topotopo godot setup hides graphs/, assets/ and
exports/ too for the Godot plugin (see Godot 4.7). Files Godot writes beside ours (*.import, *.uid,
*.translation) never count as TopoTopo's: a package publishes the same version with or without them.
Unreal. Auto Reimport (Editor Preferences, Loading and Saving) watches Content/ and imports a new or changed
source file. Keep TopoTopo's working folders out of it with these exclude wildcards: */versions/*, */packages/*,
*/inputs/*, */topotopo-packages/*. The *.uasset files Unreal writes beside an export never count as TopoTopo's.
Packages
A package can use the published outputs of other packages by name, as node types: {"type": "studio/trees/pine"}, or
studio/trees for the package's default output. An output's params are the vars of its graph that its node reads, and
its inputs are that graph's input nodes. A package that publishes versions has its author name it once in its manifest ("name":
"studio/trees"); each version is a frozen copy in its versions/ folder, numbered big.small
by what changed for the packages that use it (a removed or renamed output, param or input, a narrower range or a
removed option makes a big version). A package that uses another keeps a copy of the version it uses, so it cooks the
same on every machine and what it uses never changes by itself: outside a workspace in its own packages/, named in
its manifest; in a workspace in the workspace's topotopo-packages/, whose uses names one version of each package for
the whole workspace, so an update shows the before/after of every place any package uses the updated package and
changes them all. A package that publishes versions keeps its own copies, since they are published with it. Hashes read
text files with LF line ends, so a checkout that turns them into CRLF changes nothing, and init writes a
.gitattributes that keeps versions/ and packages/ byte for byte.
The first build or edit that names a package adds it, once the graph validates; a rejected graph adds and writes
nothing. A graph-file cook adds it too and says so; --locked makes it fail instead, for a build machine. topotopo
remove drops a package no graph names any more, with the copies nothing else uses. Only a package uses packages:
topotopo init (MCP: workspace {action: "init"}) makes a folder one, and the MCP server makes its folder one when it
starts if the folder is in no package and holds nothing but graphs/, assets/, exports/ and inputs/, or nothing
at all. A package's own graphs name its other outputs the same way, a house of the package's walls: they resolve to the
same version, with no entry in uses, and outputs that name each other in a loop are refused. To tune a package while
looking at one that uses it, --follow studio/trees (or the MCP workspace tool's follow) uses the package's
working folder for one session. Exports record the package versions they used. TopoTopo's built-in packages are used,
copied and locked like any other (a newer version in a TopoTopo release shows as an update).
An export target is a path inside the package's exports/ folder ("export": {"format": "glb", "path":
"props/crate.glb"}); with the workspace inside the engine project, the engine imports it from there.
Every published output says what it is. Publishing cooks it as a package that uses this one would, in the package's
own scope, and records its kind (mesh, instances, points, curves, terrain, textures, material, volume, or
scene for several of these), its tags and its description, from the graph's outputs: {"pine": {"node": "out", "kind":
"mesh", "tags": ["conifer", "low-poly"], "description": "…"}}. A kind written there is checked: publishing refuses
an output of another kind, or one that cooks to nothing, and build and the viewer warn before that. An output of
another kind than before makes the version big; tags and descriptions are small changes. A material output holds
materials and their maps with no geometry (texture nodes into texture_to_material with no mesh); another package puts
it on its meshes through the material node's second input, and publishing records each map's size (help topic
materials). Publishing checks the
outputs' declarations first and stops there when one is wrong, says each problem once, and names a version number only
for what would publish. topotopo publish --dry-run (MCP: publish {dry_run: true}) runs every check and says the
version number it would get, its changes, blocks and warnings, writing nothing. topotopo search conifer --kind mesh
(MCP: workspace {action: "search"}) finds outputs in the places the package looks in and TopoTopo's built-in library,
and in a workspace also in the registered libraries it does not list, saying the workspace library add that lists one.
topotopo outdated lists the packages a package uses that have newer versions, with their notes, and the update to run
for each. topotopo update studio/trees shows a before/after first: every place the package uses the updated package, cooked
with the version in use and the new one, what changed and the notes in between, without writing anything (a big
version is named with --to, and the before/after says what the package's graphs must change: params it no longer
has, values its narrower range clamps, options it dropped). It ends with the command that applies exactly that update,
--from the version in use --to the new one with --apply.
In the live viewer (topotopo edit levels/forest, or topotopo view on a graph in a package) the Packages tab
has Find packages, a search of the places the package looks in and TopoTopo's built-in packages, and a box per
package in use: its
version and a badge (up to date, update available, live), the nodes that use it (a click shows one), and its outputs,
folded, with the ones in use marked. Where a package has a working folder of its own, Source: Published 1.1 | Live
folder shows that folder's unpublished edits for the viewer session, and every save there cooks the scene
again; results and exports that use it are marked as holding unpublished edits. Update to 1.2… shows first what
changes in each place the package uses it (a with the version in use, b with the new one, or both overlaid, chosen
over the view) and applies it only when you confirm; a big version whose graphs must change asks once more and gives a
line to copy for your agent. The Scene tree marks the nodes of a package with an update or a live folder. In a
package that publishes versions the tab shows its last version, whether it changed since, and Check publish, the dry run.
The commands (a folder named must exist; without one, the current folder's package):
topotopo workspace [folder]
topotopo workspace init [folder] [--name n] [--engine godot:<path>|unreal:<path>|none] [--library <name or folder>] [--follow | --no-follow]
topotopo workspace library add|remove <name or folder> [--workspace <folder>]
topotopo workspace add|list [folder]
topotopo init [folder] [--name owner/name]
topotopo use owner/name [folder] [--version 1.1]
topotopo remove owner/name [folder]
topotopo packages [owner/name] [folder]
topotopo publish [folder] --note "..." [--big] [--dry-run]
topotopo search [words] [folder] [--kind k] [--tag t]
topotopo outdated [folder]
topotopo check [folder]
topotopo update owner/name [folder] [--to 1.4] [--render <folder>]
topotopo update owner/name [folder] --from 1.3 --to 1.4 --applytopotopo workspace init game
topotopo init game/assets/trees --name studio/trees
topotopo publish game/assets/trees --dry-run
topotopo publish game/assets/trees --note "first version"
topotopo workspace library add props --workspace game
topotopo search conifer --kind mesh ./game/levels/forest
topotopo use studio/trees game/levels/forest
topotopo packages game/levels/forest
topotopo outdated game/levels/forest
topotopo update studio/trees game/levels/forest
topotopo update studio/trees game/levels/forest --from 1.0 --to 1.1 --applytopotopo --help-topic packages and --help-topic workspace (MCP: help {topic: "packages"}) have the details.
TopoTopo's own packages
TopoTopo comes with packages of its own, four packages of ready-made generators in its built-in library
(library/), used by full name like any package's outputs. topotopo/architecture has walls with windows
and doors, whole houses, roofs (gable, hip, and straight-skeleton roofs for any footprint), stairs, railings, pillars,
arches, floors, trusses and scaffolds; topotopo/nature rocks, cliffs, trees, bushes and logs, and forests, grass and
rock fields that dress a surface; topotopo/props barrels, crates, pallets, sandbag walls and pipe runs;
topotopo/street roads, lamp posts, bollards, benches, street signs, fences and cables:
{ "nodes": { "stairs": { "type": "topotopo/architecture/stairs", "params": { "steps": 16, "style": "open" } } } }TopoTopo carries them built in, so they work offline and every package finds them without listing a library: the first
graph that names an output copies its package's version into the package's packages/ and locks it, as for any package,
and a newer version in a TopoTopo release shows as an update (topotopo outdated) instead of changing a scene by
itself. A graph outside a package cannot use them: topotopo init makes its folder one (the MCP server makes a
folder one that holds nothing but TopoTopo's own folders). Each output documents its typed parameters (help {nodes: ["topotopo/architecture/stairs"]}, or
docs/nodes.md), puts its pivot at the base (Y up, metres), and tags every piece with
name and material attributes, so exports split and shade cleanly. Outputs that follow a curve (railing, fence,
pipe_run, road_strip) take it as input 0 and those that dress a surface (scatter_rocks, forest_patch,
grass_clumps) take the surface as input 0; without an input they build a default one, which is what the thumbnails
show. A built-in package's pieces build on each other (the house is the package's walls and roof), and its default output
(topotopo/nature alone, or topotopo/nature/lineup) lines its outputs up. Every output has its kind pinned and tags
a game developer searches by (conifer, modular, masonry, street-furniture): topotopo search --tag
street-furniture. assets {action: "fork", name: "topotopo/architecture/stairs"} copies
an output's graph into the package's assets to edit. examples/street_block.json builds a
street block from the built-in packages alone (transform, merge and copy nodes just place them):

npm run builtin rewrites the built-in packages' line-ups, their thumbnails and the tables below. npm run builtin -- --publish nature
--note "..." publishes a built-in package's next version, numbered as for any package (TopoTopo's own packages are published there
and nowhere else), and npm test fails while a built-in package's working folder differs from its newe
