Terrain node

hf_to_mesh

Convert the heightfield to a polygon grid mesh (quads, normals facing +Y). Writes point attributes N (from the height gradient), Cd (see 'color'), uv (0..1 over the terrain) and one float point attribute per layer; prim attributes material='terrain', name='terrain'. Other geometry on the input passes through. 512^2 = 262k quads; use step=2 for lighter meshes.

Inputs

Parameters 9

stepint
Default 1Range 1 to 64

Use every Nth cell (2 = 4x fewer polygons). 1 = full res.

colormenu
Default terrainOptions terrain height mask none

Point colour Cd: terrain = procedural grass/dirt/rock/snow from slope, height and erosion masks; height = colour_ramp over normalised height; mask = colour_ramp over the 'color_layer' mask; none.

color_layerstring
Default mask

Layer used when color = mask.

color_rampramp

RGB ramp [[pos,[r,g,b]],...] for 'height' or 'mask' colouring.

[
 [
  0,
  [
   0.1,
   0.25,
   0.08
  ]
 ],
 [
  0.45,
  [
   0.45,
   0.42,
   0.25
  ]
 ],
 [
  0.75,
  [
   0.45,
   0.43,
   0.4
  ]
 ],
 [
  1,
  [
   0.95,
   0.95,
   0.97
  ]
 ]
]
snow_linefloat
Default 0.78Range 0 to 1.01

Terrain colouring: normalised height above which gentle slopes are snow (1.01 = no snow).

rock_slopefloat
Default 34Range 0 to 90

Terrain colouring: slope (deg) above which rock shows.

layers_as_attribstoggle
Default on

Copy every heightfield layer to a point float attribute of the same name (e.g. 'flow', 'mask') for later nodes.

keep_heightfieldtoggle
Default off

Also keep the heightfield on the output (normally dropped so the viewport shows only the mesh).

skirttoggle
Default off

Add vertical side walls down to below the lowest point (solid block look for renders/3D printing).

Use it

Add it from the node menu (right-click empty graph space or Tab, then type hf_to_mesh), ask the AI for it by name, or add it with a graph op from the API or MCP:

{"op":"add","type":"hf_to_mesh","name":"my_hf_to_mesh","params":{},"inputs":["src"]}

Any parameter can also be an expression such as "=sin(F*0.1)". See Parameters & expressions.