generate nodes
13 node types in the generate category.
beam#
aliases: strut post rafter joist brace member lumber girder beams
Beams between two points, between point pairs or along every segment of curves: a rectangle (or any closed profile on input 1) swept straight, with an up vector, caps, uv in metres and a prim name. Posts, rafters, joists, struts, trusses.
Without input 0 one beam runs from start to end. With input 0 every segment of its curves (polylines, and the edges of polygons) becomes a beam (from "segments"), or, for points only, each consecutive pair (0-1, 2-3 …: from "pairs"); "auto" picks segments when there are curves. The profile lies across the beam: its first axis runs to the side, its second along up projected square to the beam (a beam along up takes +Z, else +X, as up), then roll turns it about the beam. The default profile is a size[0] × size[1] rectangle (width to the side, height up), centred on the line; offset shifts it (offset [0, size[1] / 2] puts the line along the bottom face, e.g. joists resting on a line). A closed curve on input 1 replaces it, drawn flat in any plane (shape2d's XZ: x to the side, -z up; XY: x to the side, y up): an I-beam, a channel, a round bar; every closed loop is swept, each capped on its own (switch caps off for hollow sections). extend lengthens the start and end (negative shortens, e.g. by half a post's width). uv: along the beam (u) and around the profile (v) in metres × uv_scale; caps are mapped flat. Point attributes of the input (Cd, …) are blended along each beam and prim attributes copied from the curve a beam follows; name (with {index} for the beam number) names every beam's prims, "" keeps the curve's name.
Inputs
| # | name | description |
|---|---|---|
| 0 | path | optional: curves (each segment a beam) or points (pairs); else start → end (optional) |
| 1 | profile | optional: a closed cross-section curve, drawn flat (else the size rectangle) (optional) |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
start | vec3 | [0,0,0] | start point when input 0 is not connected aliases: from p0 a | |
end | vec3 | [0,3,0] | end point when input 0 is not connected aliases: to p1 b | |
from | enum | "auto" | input 0: every curve segment, or consecutive point pairs (auto: segments when there are curves) options: auto segments pairsaliases: mode | |
size | vec2 | [0.1,0.2] | 0.. | rectangle profile [width to the side, height up] in metres aliases: section dimensions |
up | vec3 | [0,1,0] | which way the profile's second axis (the height) faces, projected square to the beam aliases: up_vector | |
roll | float | 0 | turn the profile about the beam, degrees | |
offset | vec2 | [0,0] | shift of the profile [to the side, up] in metres (the line is its origin) | |
extend | vec2 | [0,0] | lengthen [start, end] along the beam in metres (negative shortens) aliases: overhang extension | |
divisions | int | 1 | 1..1000 | segments along the length (for later bending) aliases: segments rows |
caps | bool | true | close both ends aliases: cap end_caps | |
uv_scale | float | 1 | 0.. | uv units per metre (uv in metres at 1) |
name | string | "beam" | prim name of every beam ({index} = the beam number; "" = keep the input curve's name) aliases: prim_name |
Writes: polygons; prim groups sides, caps; prim string name, prim int beam (the beam number); vertex uv
Example
{
"nodes": {
"frame": {
"type": "curve",
"params": { "points": [[0, 0, 0], [0, 2.4, 0], [3, 2.4, 0], [3, 0, 0]] }
},
"posts": {
"type": "beam",
"in": ["frame"],
"params": {
"size": [0.12, 0.12],
"up": [0, 0, 1],
"name": "timber_{index}"
}
}
},
"output": "posts"
}
box#
aliases: cube
Axis-aligned box (watertight quads, optional divisions, box-mapped uv).
Inputs
None (generator).
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
size | vec3 | [1,1,1] | edge lengths X Y Z (a single number = uniform) aliases: scale dims | |
center | vec3 | [0,0,0] | center position aliases: t translate position pos origin | |
divisions | ivec3 | [1,1,1] | 1..512 | quads along X Y Z aliases: divs div |
Writes: vertex uv
Example
{ "type": "box", "params": { "size": [2, 1, 1], "center": [0, 0.5, 0] } }
Used in the examples cloth_drape, corridor_panels, fracture_settle, market_street, material_set, rail_along_curve, scifi_panel, stair_flight, weathered_cabinet, worn_machine.
grid#
Flat grid of quads (default lies on the XZ ground plane facing +Y).
Inputs
None (generator).
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
size | vec2 | [4,4] | width and depth | |
divisions | ivec2 | [10,10] | 1..2048 | quads along each side aliases: rows cols res resolution |
plane | enum | "xz" | orientation plane (xz = ground, facing +Y; xy = facing +Z; yz = facing +X) options: xz xy yz | |
center | vec3 | [0,0,0] | center position aliases: t translate position pos origin |
Writes: point uv
Example
{ "type": "grid", "params": { "size": [10, 6], "divisions": [20, 12] } }
Used in the examples cloth_drape, guided_town, market_street, ocean_surface, town_from_lots, weathered_cabinet.
lsystem#
aliases: l_system turtle plant tree
Lindenmayer system: grammar rewriting + 3D turtle → branching curves (with width) and leaf points. Plants, trees, fractals.
Turtle starts at the origin heading +Y. Symbols: F/G draw forward, f/g move without drawing, + - yaw, & ^ pitch, \ / roll, | turn around, [ ] push/pop branch, ! shrink width (width_scale), " scale step (step_scale), J K M emit leaf points (groups J/K/M + leaves) with N/up/orient/pscale. A number in parentheses overrides the step or angle: F(0.5) +(10). Rules: {"F": "FF-[-F+F]+[+F-F]"}; stochastic: {"F": [["F[+F]F", 0.6], ["F[-F]F", 0.4]]}.
Inputs
None (generator).
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
axiom | string | "A" | start string aliases: premise start | |
rules | json | {"A":"F[&+A][&-A][^A]","F":"F"} | rewrite rules: {symbol: replacement} or {symbol: [[replacement, weight], ...]} | |
generations | int | 5 | 0..16 | rewrite iterations aliases: iterations depth |
angle | float | 28 | turn angle in degrees | |
step | float | 0.3 | forward step length aliases: length step_size | |
step_scale | float | 0.9 | multiplier applied by " | |
width | float | 0.08 | initial branch diameter (point attribute width) | |
width_scale | float | 0.7 | multiplier applied by ! | |
auto_taper | bool | true | also shrink width and step on each [ branch | |
branch_scale | float | 0.85 | auto_taper step multiplier per branch level | |
angle_variance | float | 0 | 0.. | random ± degrees added to every turn |
step_variance | float | 0 | 0..1 | random ± fraction on every step |
tropism | vec3 | [0,-1,0] | bending direction (e.g. gravity) | |
tropism_strength | float | 0 | bending amount per step (0 = off; ~0.05-0.3) | |
seed | float | 0 | random seed | |
max_length | int | 400000 | 1..50000000 | safety cap on the expanded string length |
Writes: polylines with point width/depth, prim depth; leaf points in groups leaves, J, K, M with N, up, orient, pscale
Example
{
"type": "lsystem",
"params": {
"generations": 4,
"angle": 25,
"tropism_strength": 0.1,
"seed": 2
}
}
Used in the example lsystem_tree.
parametric_surface#
Surface from a JS expression of (u, v) returning [x,y,z]; optional wrapping for closed surfaces.
The expression runs sandboxed like a wrangle and reads graph vars by their bare name; all points together must be computed within the script timeout (TOPOTOPO_SCRIPT_TIMEOUT_MS, default 30 s).
Inputs
None (generator).
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
expr | code | "[(1+0.5*cos(v*TAU))*cos(u*TAU), 0.5*sin(v*TAU), (1+0.5*cos(v*TAU))*sin(u*TAU)]" | JS expression of u, v returning [x,y,z] | |
u_range | vec2 | [0,1] | u start/end | |
v_range | vec2 | [0,1] | v start/end | |
divisions | ivec2 | [48,24] | 1..2048 | quads along u and v |
wrap_u | bool | false | u is periodic: join last column to first (no seam) | |
wrap_v | bool | false | v is periodic | |
flip | bool | false | reverse face winding |
Writes: vertex uv
Example
{
"type": "parametric_surface",
"params": {
"expr": "[(u - 0.5) * 4, 0.25 * sin(u * TAU * 2), (v - 0.5) * 2]",
"divisions": [64, 16]
}
}
platonic#
Platonic solids: tetrahedron, cube, octahedron, dodecahedron, icosahedron.
Inputs
None (generator).
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
shape | enum | "icosahedron" | solid type options: tetrahedron cube octahedron dodecahedron icosahedron | |
radius | float | 1 | circumradius | |
center | vec3 | [0,0,0] | center position aliases: t translate position pos origin |
Example
{ "type": "platonic", "params": { "shape": "dodecahedron", "radius": 0.5 } }
point_grid#
aliases: lattice_points points_from_volume
3D lattice of points (optionally jittered) — e.g. for scattering, voxel art, instancing.
Inputs
None (generator).
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
counts | ivec3 | [5,1,5] | 1..100000 | points along X Y Z |
size | vec3 | [4,0,4] | extent along X Y Z | |
center | vec3 | [0,0,0] | center position aliases: t translate position pos origin | |
jitter | float | 0 | 0.. | random offset as a fraction of the spacing |
seed | float | 0 | random seed |
Example
{
"type": "point_grid",
"params": {
"counts": [10, 1, 10],
"size": [9, 0, 9],
"jitter": 0.3,
"seed": 1
}
}
points#
aliases: add point
Explicit points (and optional per-point attributes) from lists. No primitives.
Inputs
None (generator).
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
positions | json | [[0,0,0]] | list of [x,y,z] (2-number entries are placed on the ground: [x, 0, z]) aliases: points pts P | |
attribs | json | {} | per-point attributes: {"pscale": [1, 0.5], "Cd": [[1,0,0],[0,1,0]], "name": ["a","b"]} | |
polyline | enum | "none" | also connect the points as a polyline / polygon options: none open closed |
Example
{
"type": "points",
"params": {
"positions": [[0, 0, 0], [1, 0, 0], [1, 1, 0]],
"attribs": { "pscale": [1, 2, 3] }
}
}
Used in the examples cloth_drape, fracture_settle, market_street, rail_along_curve, scifi_panel, sparks.
sphere#
Sphere: polar uv-sphere, geodesic icosphere, or quad sphere. Watertight, with point normals.
Inputs
None (generator).
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
type | enum | "uv" | uv = latitude/longitude, ico = geodesic triangles, quad = spherified cube options: uv ico quad | |
radius | float | 1 | 0.. | radius aliases: rad r |
scale | vec3 | [1,1,1] | non-uniform scale (ellipsoid) | |
center | vec3 | [0,0,0] | center position aliases: t translate position pos origin | |
rows | int | 16 | 2..2048 | uv: latitude bands |
cols | int | 32 | 3..2048 | uv: longitude segments aliases: columns segments |
level | int | 3 | 0..7 | ico: subdivision level (20*4^level triangles) aliases: frequency subdivisions |
divisions | int | 8 | 1..512 | quad: quads per cube-face edge |
Writes: point N; uv (uv type)
Example
{
"type": "sphere",
"params": { "type": "quad", "radius": 0.5, "divisions": 6 }
}
Used in the examples asset_cleanup, blob_creature, growth.
terrain#
aliases: landscape
Terrain mesh: a ground grid displaced by fractal noise, with height attribute and normals (for erosion, masks and Unreal heightmaps use the heightfield nodes).
Inputs
None (generator).
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
size | vec2 | [20,20] | extent in X and Z | |
divisions | ivec2 | [128,128] | 1..2048 | grid resolution (quads) aliases: resolution res |
height | float | 3 | vertical scale (amplitude) aliases: amplitude amp | |
frequency | float | 0.12 | base noise frequency (features per unit) aliases: freq | |
noise | enum | "simplex" | base noise options: perlin simplex value worley | |
fractal | enum | "fbm" | layering mode (ridged = mountain ridges) options: fbm ridged turbulence none | |
octaves | int | 6 | 1..12 | fractal octaves |
roughness | float | 0.5 | amplitude gain per octave | |
lacunarity | float | 2 | frequency gain per octave | |
offset | vec3 | [0,0,0] | noise space offset (scroll the terrain) | |
terrace | float | 0 | 0.. | terrace step height (0 = off) |
floor | float | -1000000000 | clamp heights below this (flat water/valley floor) | |
falloff | float | 0 | 0..1 | island falloff: lower the edges (0 = off, 1 = strong) |
seed | float | 0 | random seed | |
center | vec3 | [0,0,0] | center position aliases: t translate position pos origin |
Writes: point height (0..1), point N, point uv
Example
{
"type": "terrain",
"params": {
"size": [40, 40],
"divisions": [96, 96],
"height": 6,
"fractal": "ridged",
"falloff": 0.5,
"seed": 3
}
}
text#
aliases: font type lettering
Text from a TrueType/OpenType font: filled faces, outlines, or an extruded solid, in the XY plane facing +Z (a solid stands out towards +Z from its back face).
Lettering for signs, signage, labels, plaques and logos. The letters lie in the XY plane and face +Z, placed by center: x and y where align and valign put the text, z the plane of the faces and outlines, and of the back face of a solid (depth > 0), whose front face is at center z + depth. So letters on a wall at z = 0 stand out from it towards +Z; turn and move the result to face elsewhere. back false leaves the back face of a solid off (letters mounted on a wall, whose back is never seen: fewer triangles, an open solid). To engrave, set center z to minus half the depth (the letters straddle the surface) and subtract the text from the surface with boolean; to emboss, merge it onto the surface or union it. curve_segments 2 (the default) suits signs; 4 to 8 for large lettering seen up close (each step adds about a third more triangles).
Inputs
None (generator).
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
text | string | "TopoTopo" | text (use \n for new lines) | |
font | string | "" | font file path or system family name ("" = the bundled DejaVu Sans, identical on every machine) | |
size | float | 1 | font size (em height in units) | |
weight | float | 400 | 1..1000 | font weight on the wght axis of a variable font: 100 thin, 400 regular, 700 bold, 900 black (clamped to the range the font has, with a warning). A font without a wght axis (the bundled DejaVu Sans, a static file) is drawn at its own weight; any weight but 400 then warns aliases: wght font_weight |
align | enum | "center" | horizontal alignment options: left center right | |
valign | enum | "bottom" | vertical alignment options: baseline center bottom top | |
depth | float | 0 | 0.. | extrusion depth (> 0 makes a solid) |
output | enum | "auto" | auto = solid if depth > 0, else faces options: auto faces outlines solid | |
line_spacing | float | 1.2 | line height as a multiple of size | |
curve_segments | int | 2 | 1..32 | segments per glyph curve: 2 suits signs; 4 to 8 for large lettering seen up close |
back | bool | true | solid: its back face at center z (false leaves it off: letters on a wall, whose back is never seen; the solid is then open) aliases: back_face | |
center | vec3 | [0,0,0] | position: x and y where align and valign put the text; z the plane of faces and outlines, and the back face of a solid aliases: t translate position pos origin |
Example
{ "type": "text", "params": { "text": "OPEN", "size": 0.5, "depth": 0.1 } }
Used in the example machined_bracket.
torus#
Torus (ring) around the Y axis.
Inputs
None (generator).
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
radius | float | 1 | major radius (center of tube) aliases: major_radius R | |
radius2 | float | 0.25 | minor radius (tube thickness) aliases: minor_radius tube_radius r | |
rows | int | 16 | 3..2048 | segments around the tube |
cols | int | 48 | 3..2048 | segments around the ring |
center | vec3 | [0,0,0] | center position aliases: t translate position pos origin |
Writes: vertex uv
Example
{
"type": "torus",
"params": { "radius": 1.5, "radius2": 0.3, "rows": 12, "cols": 36 }
}
tube#
aliases: cylinder cone
Cylinder / cone / frustum along an axis, optional end caps (watertight when capped).
Inputs
| # | name | description |
|---|---|---|
| 0 | sheet | trim sheet for trim_band (a trim_sheet node; optional) (optional) |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
radius | float | 0.5 | 0.. | radius (both ends unless radius_top is set) aliases: rad r |
radius_top | float | -1 | top radius; -1 = same as radius; 0 = cone apex | |
height | float | 1 | length along the axis aliases: h length | |
rows | int | 1 | 1..2048 | segments along the axis |
cols | int | 24 | 3..2048 | segments around aliases: columns segments sides |
caps | bool | true | close the ends with n-gons | |
axis | enum | "y" | axis direction options: y x z | |
center | vec3 | [0,0,0] | center position aliases: t translate position pos origin | |
trim_band | string | "" | trim sheet band (or rectangle) to map onto ("" = the node's own uv): u runs along the path at the band's period, v fills the band across the circumference (its cols are the segments: faces gives every side the whole band). A comma list ("stone, coping") gives one band per segment of the circumference (its cols are the segments: faces gives every side the whole band), cycled. "sheet:band" picks a sheet when several are carried. Help topic trim_sheets. aliases: trim | |
trim_around | enum | "wrap" | wrap: consecutive segments of the circumference (its cols are the segments: faces gives every side the whole band) on the same band share it by length (one band wrapped round); faces: every segment fills the whole band options: wrap faces | |
trim_cap | string | "" | band for the caps at real size ("" = the sheet's first band of kind cap, else the first trim_band) | |
trim_offset | float | 0 | shift u along the path, metres (staggers the joints of pieces side by side) |
Writes: vertex uv; with trim_band: prim trim_band, trim_sheet and detail trim_sheets
Example
{
"type": "tube",
"params": { "radius": 0.3, "radius_top": 0.1, "height": 2, "cols": 16 }
}
Used in the examples machined_bracket, rail_along_curve, rusty_drum, scifi_panel, stair_flight, weathered_cabinet, worn_machine.