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.

272 node types · 37 ready-made outputs in 4 packages · 25 example graphs · Apache-2.0

InstallNode referenceExamplesGitHub

A town street ready for a level: a road with kerbs, pavements and lamp posts, a row of houses along one side and a small park with paths, trees and benches on the other.
Market streetA town street ready for a level: a road with kerbs, pavements and lamp posts, a row of houses along one side and a small park with paths, trees and benches on the other.
A landscape for Unreal Engine: an eroded terrain sized to fit an Unreal Landscape exactly, with paint layers, a road, and trees and rocks as instances.
Unreal landscapeA landscape for Unreal Engine: an eroded terrain sized to fit an Unreal Landscape exactly, with paint layers, a road, and trees and rocks as instances.
A mountain valley worn by rain: sharp ridges, gullies and sediment fans, with a river along the valley floor, as a terrain for a game engine.
Eroded valleyA mountain valley worn by rain: sharp ridges, gullies and sediment fans, with a river along the valley floor, as a terrain for a game engine.
A town quarter built from a plan: the ground is cut into irregular lots along streets, and every lot gets a house that follows its shape, with a roof that fits.
Town from lotsA town quarter built from a plan: the ground is cut into irregular lots along streets, and every lot gets a house that follows its shape, with a roof that fits.
A stone wall that breaks into pieces which fall and come to rest on the ground, for a destruction effect or a ruin.
Fracture and settleA stone wall that breaks into pieces which fall and come to rest on the ground, for a destruction effect or a ruin.
A burst of sparks for an effect: hot sparks fly out from a point, fall, bounce on the floor and cool down over a few seconds.
SparksA burst of sparks for an effect: hot sparks fly out from a point, fall, bounce on the floor and cool down over a few seconds.
A set of tileable game materials made from scratch: rough stone blocks, wood planks and worn painted metal, each with colour, normal and packed roughness maps.
Material setA set of tileable game materials made from scratch: rough stone blocks, wood planks and worn painted metal, each with colour, normal and packed roughness maps.
A rough, broken scan turned into a game-ready asset: holes filled, tangles removed, even triangles, clean UVs and levels of detail.
Asset cleanupA rough, broken scan turned into a game-ready asset: holes filled, tangles removed, even triangles, clean UVs and levels of detail.

What it does

Install

Requires Node ≥ 22.18.

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 its package's inputs/
npx topotopo refresh graph.json generated.json             # a regenerated graph over graph.json, keeping the values a person tuned
npx topotopo mcp --package /absolute/path/to/package    # the MCP server over stdio

From a clone (Node runs the TypeScript sources directly, there is no build step):

git clone https://github.com/topotopo-dev/topotopo
cd topotopo
npm install
npm test

Connect an agent (MCP)

TopoTopo ships an MCP server: an agent builds a graph in one call, looks at a render, edits it incrementally and checks its work. With Claude Code:

claude mcp add topotopo -- npx -y topotopo mcp --package /absolute/path/to/package

Other MCP clients (Claude Desktop, …):

{
  "mcpServers": {
    "topotopo": {
      "command": "npx",
      "args": ["-y", "topotopo", "mcp", "--package", "C:/path/to/package"]
    }
  }
}

Tools:

  • catalog
  • help
  • build
  • edit
  • inputs
  • inspect
  • render
  • export
  • graphs
  • assets
  • explain
  • diff
  • preview
  • workspace

A first graph

A graph is JSON: named nodes, their inputs and params. Save this as graph.json and cook it with npx topotopo graph.json --render out.png --export out.glb.

{
  "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. An asset faces +Z, as in glTF and Houdini: the front view looks at it from +Z, the back view from −Z.

Documentation