Log inGet started

procGraph (asset type)

Updated October 10, 2026

Shape

A <name>.procGraph/ folder containing:

  • init.luau: the graph's definition. Returns proc.define(function(g) … end), the graph named by its asset folder.
  • graph.json — the compiled form (proc.graph.v1), written by this type from init.luau. Generated, never hand-edited.
  • README.md, .metadata — the universal asset files.

Authoring

Edit init.luau. The type recompiles on the write, rewrites graph.json, and every live Generator bound to the asset re-cooks from it — there is no build step between saving and seeing the result.

A recompile is cheap however large the graph: node results are keyed by content, so recompiling an unchanged node reuses its cooked output, and an edit invalidates only that node and the ones downstream of it. Changing the last step of a landscape does not re-run the erosion above it.

Two words worth keeping apart, because both happen here:

  • compile — init.luau → graph.json. Produces the graph.
  • cook — each node performing its operation to produce a value. Runs the graph. Driven by a Generator, reported by procgen.cooks.

Using one

Through the ref rather than a path string: ref:eval("mesh") evaluates an output, ref:inputs() lists the knobs a Generator can override by name, ref:outputs() the values it produces, ref:validate() type-checks it, and ref:asOp() wraps it so another graph can composite it as a node.

Generated outputs (meshes, materials, textures, bundles) are persisted through their own asset types.

  • @builtin::systems.procgen.proc — the authoring + evaluation model.
  • procgen.toolbox — preview, spawn, bake, validate, ops, schema and the wider tool family.

In the Inspector

The Inspector shows the graph as nodes and wires, and edits it there. Every graph input, op, graph used as a node and output is a node; each input port that nothing is wired into carries the value that drives it, and a click on a value edits it where it stands (typing, dragging a number, flipping a switch, choosing from a list). Drag a node to move it, drag from a port to another port to connect, drag a connected input away to take its wire off, Delete removes the selection. A node is added from the op search under the graph, or from the procGraph assets, which stand as nodes that open their own asset on a double click. The graph's inputs and outputs are nodes too: their name, type, default and range, and an output's domain, are values on them, and the Inputs and outputs section declares new ones. Describes is the sentence search finds the graph by.

Every edit is written into init.luau with proc.saveSource and compiled by the type, so a live Generator re-cooks on it; the node positions are kept beside the graph in layout.json. The Result section scrubs the timeline of a graph that has one and shows what the selected node makes (procgen.preview with the target node:<id>), and the Preview section above it shows what the graph makes, live. Compile and Open for its source stay as they were.

  • asset-type
  • reference