heightfield nodes

26 node types in the heightfield category.

heightfield#

aliases: heightfield_create hf height_field

Create a flat heightfield: a terrain grid in XZ (Y up) with height and mask layers. Start of every terrain workflow.

Houdini: HeightField. A heightfield is a volume carried in the geometry (like an SDF), not polygons: a regular grid of samples with named float layers (height = world Y, mask 0..1, plus flow, sediment, debris, water and any user layer). Samples sit on the grid nodes, so size 20 at resolution 0.1 gives 201 × 201 samples, the way Unreal counts landscape vertices. render draws it as a shaded grid (mask in red, color_by any layer); heightfield_to_mesh makes polygons; export png16/r16 writes an Unreal Landscape heightmap.

Inputs

None (generator).

Parameters

nametypedefaultrangedescription
sizevec2[20,20]extent in X and Z (metres), rounded up to whole cells
resolutionfloat0.10.001..cell size: distance between samples (metres)
aliases: grid_spacing cell_size spacing voxel_size divsize
samplesivec2[0,0]0..16785409sample counts [nx, nz]; when nx > 1 they override resolution (cell = size.x / (nx - 1), depth = (nz - 1) × cell), e.g. [505, 505] for Unreal
centervec3[0,0,0]field centre: X and Z place the grid, Y is added to the initial height
aliases: t translate position pos
heightfloat0initial height (world Y)
aliases: initial_height elevation
namestring"heightfield"heightfield name (shown by inspect)

Writes: heightfield volume with layers height, mask

Example

{ "type": "heightfield", "params": { "size": [20, 20], "resolution": 0.1 } }

Used in the examples eroded_valley, forest_on_terrain, terrain_tiles, unreal_landscape.

heightfield_blur#

aliases: hf_blur heightfield_smooth

Blur a heightfield layer (gaussian or box, radius in metres): soften terrain, smooth masks before scattering.

Houdini: HeightField Blur. Separable running-sum boxes (gaussian = three box passes), clamped at the borders, so any radius costs the same.

Inputs

#namedescription
0heightfieldgeometry with a heightfield

Parameters

nametypedefaultrangedescription
layerstring"height"layer to blur
radiusfloat10..blur radius (metres)
aliases: size distance
modeenum"gaussian"gaussian (smooth, radius = 2 sigma) or box (flat average)
options: gaussian box
aliases: filter type
iterationsint11..50repeat the blur
mask_layerstring""optional 0..1 layer that blends the result in ("" = everywhere), e.g. "mask"
aliases: mask

Writes: the layer

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "n": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": { "amplitude": 2, "element_size": 1 }
    },
    "b": {
      "type": "heightfield_blur",
      "in": ["n"],
      "params": { "radius": 0.5 }
    }
  },
  "output": "b"
}

Used in the example terrain_tiles.

heightfield_clip#

aliases: hf_clip heightfield_clamp

Clamp a heightfield layer below and/or above a value (flat lake beds, plateaus, sea level).

Houdini: HeightField Clip.

Inputs

#namedescription
0heightfieldgeometry with a heightfield

Parameters

nametypedefaultrangedescription
layerstring"height"layer to modify
minfloat0lowest value kept (when clip_min)
aliases: low floor
maxfloat10highest value kept (when clip_max)
aliases: high ceiling
clip_minbooltrueraise values below min to min
clip_maxbooltruelower values above max to max
mask_layerstring""optional 0..1 layer that blends the result in ("" = everywhere), e.g. "mask"
aliases: mask

Writes: the layer

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "n": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": { "amplitude": 3 }
    },
    "c": {
      "type": "heightfield_clip",
      "in": ["n"],
      "params": { "min": -0.5, "clip_max": false }
    }
  },
  "output": "c"
}

Used in the example terrain_tiles.

heightfield_crop#

aliases: hf_crop heightfield_tile heightfield_cut_tile

Crop heightfields (every layer) to world bounds or to one tile of a grid, with an optional margin; the samples stay exactly where they were (no resampling).

Cut a tile out of a whole map to preview or process it at full resolution, then build on the tile: nodes that work at world positions (noise, terrace, remap, masks by height or slope …) give the tile the same values as the same area of the map. mode tile: the field's cells are split evenly into tiles (nx, nz), tile (i, j) counting from min X / min Z, and neighbouring tiles share their border samples (as Unreal landscape tiles do). mode bounds: the samples covering min..max in X and Z (bounds between samples grow to the next sample; parts outside the field are dropped). margin keeps extra samples on every side (metres, rounded up to whole samples, or samples; less at the field's own border) for filters that read neighbours, such as blur, curvature, path and project. The crop is recorded in detail attributes: crop_core_min / crop_core_max (world X, Z of the tile or bounds without the margin: crop to them in mode bounds to drop the margin again), crop_margin (samples kept beyond the core on the −X, +X, −Z, +Z sides), crop_offset (the first sample's index in the input grid), crop_source_samples (the input's sample counts) and, in mode tile, crop_tile and crop_tiles (bounds mode keeps those of an earlier tile crop). With several heightfields each is cropped (tiles by its own grid) and the attributes describe the first. Other geometry passes through.

Inputs

#namedescription
0heightfieldgeometry with a heightfield

Parameters

nametypedefaultrangedescription
modeenum"tile"tile = one tile of a tiles grid over the field; bounds = the samples covering min..max
options: tile bounds
tilesivec2[2,2]1..4096tile mode: number of tiles along X and Z
aliases: grid tile_count
tileivec2[0,0]0..4095tile mode: tile index [column along X, row along Z], counting from 0 at min X / min Z
aliases: index tile_index
minvec2[-5,-5]bounds mode: world X and Z of the min corner (metres)
aliases: bounds_min
maxvec2[5,5]bounds mode: world X and Z of the max corner (metres)
aliases: bounds_max
marginfloat00..extra border kept on every side, in margin_unit (less at the field's own border): the reach of the filters that follow
aliases: padding overlap
margin_unitenum"metres"margin in metres (rounded up to whole samples) or in samples
options: metres samples
aliases: margin_units

Writes: the cropped heightfields with all their layers; detail crop_core_min, crop_core_max, crop_margin, crop_offset, crop_source_samples (tile mode also crop_tile, crop_tiles)

Example

{
  "nodes": {
    "map": {
      "type": "heightfield",
      "params": { "size": [40, 40], "resolution": 0.25 }
    },
    "tile": {
      "type": "heightfield_crop",
      "in": ["map"],
      "params": { "tiles": [4, 4], "tile": [1, 2], "margin": 2 }
    },
    "hills": {
      "type": "heightfield_noise",
      "in": ["tile"],
      "params": { "amplitude": 3, "element_size": 12 }
    },
    "core": {
      "type": "heightfield_crop",
      "in": ["hills"],
      "params": { "mode": "bounds", "min": [-10, 0], "max": [0, 10] }
    }
  },
  "output": "core"
}

Used in the example terrain_tiles.

heightfield_cutout#

aliases: heightfield_cutoutbyobject hf_cutout heightfield_cut

Set a layer to a value outside a mask or outside a shape's footprint (cut terrain to a shape, flatten around a plot).

Houdini: HeightField Cutout by Object. With a shape connected (closed polygons, projected along Y), samples outside its footprint get value; without one, the mask layer decides (soft: result = value + (layer − value) × mask). invert cuts inside instead; feather softens the edge (metres). write_mask stores the keep-mask in a layer.

Inputs

#namedescription
0heightfieldgeometry with a heightfield
1shapeoptional closed polygons whose footprint is kept (optional)

Parameters

nametypedefaultrangedescription
layerstring"height"layer to modify
valuefloat0value written outside
aliases: height
mask_layerstring"mask"mask that keeps the layer (when no shape is connected)
invertboolfalsecut inside the shape/mask instead
featherfloat00..soft edge width (metres)
aliases: blend falloff
write_maskstring""also store the keep-mask in this layer ("" = no)

Writes: the layer (and write_mask)

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "n": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": { "amplitude": 2 }
    },
    "c": {
      "type": "circle",
      "params": { "radius": 8, "plane": "xz", "segments": 48 }
    },
    "cut": {
      "type": "heightfield_cutout",
      "in": ["n", "c"],
      "params": { "value": -1, "feather": 1 }
    }
  },
  "output": "cut"
}

heightfield_erode#

aliases: hf_erode erosion heightfield_erosion heightfield_hydro_erode

Droplet or virtual-pipe hydraulic erosion with thermal talus relaxation and optional stream-power incision.

Houdini: HeightField Erode. method droplet (the default; backend js, or kernel for the same model in WASM): seeded droplets erode below their carrying capacity and deposit as they slow or dry; each iteration also relaxes slopes above thermal_talus_angle. Droplet settings are in metres, so the same params erode the same terrain alike at any spacing (an 8 m preview like the 2 m map, finer detail aside): rain_density counts droplets per m² per iteration, max_distance and erosion_radius are metres, and erosion_rate, deposition_rate, evaporation, inertia, gravity and thermal_rate act per droplet step of a third of erosion_radius, with sediment_capacity a volume in those steps cubed; the node converts them to the field's cells (a cell of a third of the radius takes them as given: the defaults at 0.1 m). For a terrain λ times larger keep the rest and multiply erosion_radius and max_distance by λ and divide rain_density by λ² (a 4 km map at 2 m: erosion_radius 6, max_distance 60, rain_density 0.005). Erosion is not local: droplets and water cross tile borders and start at seeded positions over the whole field, so a tile with a margin erodes like the same area of the map only statistically. Pipe uses four-direction shallow-water flux, velocity-based carrying capacity, sediment transport, rainfall and evaporation, with a CFL-limited timestep; stream_power adds K × drainage^m × slope^n incision. Pipe methods require backend kernel, or auto after the kernels have been loaded; their rates are per second, and their iterations are time steps that the cell size limits (CFL), so finer fields simulate less time per iteration unless time_step is below the limit of every spacing. Closed boundaries conserve terrain material. Open boundaries let water leave; droplet also loses carried sediment, while pipe retains sediment and settles it on return. Every method writes height. Thermal relaxation adds to debris. Droplets write flow and water and add to sediment when rain produces droplets. Droplet flow is normalised to 0..1 on a log scale, and water is a normalised resting-water mask. Pipe and stream_power write flow and water and add to sediment when rainfall or an existing lake supplies water. They normalise flow to 0..1 by its maximum and write water depth in metres. They also update an existing lake with the final depth inside its original footprint. A thermal-only pass preserves flow, water, sediment and lake. Kernel backends add wear (eroded depth) from both hydraulic and thermal erosion. Pipe rainfall is uniform and deterministic; its seed is reserved for API consistency. Use flow/sediment/debris with heightfield_mask_by_feature or heightfield_to_mesh color terrain.

Inputs

#namedescription
0heightfieldgeometry with a heightfield

Parameters

nametypedefaultrangedescription
methodenum"droplet"droplet = seeded particles; pipe = shallow-water grid; stream_power = pipe plus drainage-driven incision
options: droplet pipe stream_power
backendenum"js"js preserves the original droplet result; kernel loads WASM; auto uses WASM only if already loaded, otherwise js (pipe methods require WASM)
options: auto kernel js
iterationsint500..5000rain passes; pipe methods use thermal_interval to schedule thermal passes
aliases: iter steps
seedfloat0random seed
erosion_ratefloat0.30..1droplet: fraction of the free capacity picked up per droplet step (a third of erosion_radius); pipe: erosion rate per second
aliases: erodability erode_rate erosion
deposition_ratefloat0.30..1droplet: fraction of the excess sediment dropped per droplet step; pipe: deposition rate per second
aliases: deposit_rate deposition
sediment_capacityfloat10..how much sediment fast, steep water can carry (higher = deeper gullies, bigger fans); droplet: a volume in droplet steps cubed, the same in metres at any spacing
aliases: capacity
evaporationfloat0.10..1droplet: water fraction lost per droplet step; pipe: evaporation rate per second
aliases: evaporation_rate
rain_amountfloat10..water per droplet; pipe rainfall depth in metres per second, multiplied by rain_layer if set
aliases: rain water_amount
rain_densityfloat20..droplet only: droplets per square metre per iteration (at most one per sample: coarse fields cap it)
aliases: droplets
inertiafloat0.10..1droplet only: share of its heading a droplet keeps per droplet step; 0 = always steepest descent, higher = smoother, longer channels
gravityfloat40..acceleration on slopes (droplet: speed² gained per droplet step of drop at slope 1; pipe: m/s²)
min_slopefloat0.010..droplet only: minimum capacity (as a slope), keeps flats eroding a little
erosion_radiusfloat0.30.001..droplet only: erosion brush radius in metres (about a gully's half-width; at least one sample); a third of it is the droplet step the per-step settings refer to
aliases: brush_radius
max_distancefloat30..droplet only: how far a droplet travels at most (metres; at least one step)
aliases: travel_distance droplet_distance
thermal_talus_anglefloat400..89thermal: angle of repose in degrees (steeper slopes shed material)
aliases: talus_angle repose_angle cut_angle
thermal_ratefloat0.10..1thermal: fraction of the excess moved per thermal pass (droplet: on cells of a droplet step, scaled to the spacing; 0 = no thermal erosion)
aliases: thermal
thermal_intervalint11..10000pipe/stream_power only: thermal pass every N iterations and on the final iteration; skips intervening relaxations without multiplying thermal_rate (1 preserves the default result)
hardness_layerstring""optional 0..1 layer: 1 = rock that does not erode
freeze_layerstring""optional 0..1 layer: 1 = frozen (unchanged), e.g. under buildings or roads
rain_layerstring""pipe only: optional nonnegative layer multiplying uniform rain_amount (0 = dry)
time_stepfloat00..pipe only: maximum timestep in seconds; 0 chooses it automatically from cell size, gravity and water velocity (CFL)
stream_power_kfloat0.010..stream_power only: incision coefficient K in K × drainage^m × slope^n
aliases: incision_k
stream_power_mfloat0.50..stream_power only: exponent m of contributing drainage area
aliases: incision_m
stream_power_nfloat10..stream_power only: exponent n of downhill slope
aliases: incision_n
fill_sinksboolfalsestream_power only: route incision over a depression-filled surface each iteration without raising the ground; fully hard/frozen cells stay protected
boundaryenum"closed"closed: water remains inside (material conserved); open: water exits, carrying sediment for droplet, while pipe retains sediment
options: closed open

Writes: height, plus layers used by the active processes: flow, sediment, water and lake for hydraulic erosion, debris for thermal relaxation, and wear with the kernel backend

Example

{
  "nodes": {
    "hf": {
      "type": "heightfield",
      "params": { "size": [20, 20], "resolution": 0.1 }
    },
    "n": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": {
        "fractal": "ridged",
        "amplitude": 4,
        "element_size": 8,
        "range": "positive"
      }
    },
    "e": {
      "type": "heightfield_erode",
      "in": ["n"],
      "params": { "iterations": 60 }
    }
  },
  "output": "e"
}

Used in the examples eroded_valley, unreal_landscape.

heightfield_fill_sinks#

aliases: hf_fill_sinks

Fill closed terrain depressions for drainage, retaining deep lakes when requested.

Deterministic eight-neighbour priority flood (Barnes et al., 2014). Raises terrain to its lowest spill elevation so every unmasked cell has a route to the border; epsilon adds a minimum rise per receiver step so ordinary downhill flow can cross filled flats. With epsilon 0 the filled surface may be flat: use heightfield_flow fill_sinks to resolve its receivers. max_depth retains an entire connected depression when its deepest required fill exceeds the limit. Retained beds stay unchanged and lake stores standing-water depth in metres up to the spill surface, not a 0..1 mask; fill stores only actual added terrain thickness. Pipe and stream_power erosion use lake as initial water and update its depths inside the retained footprint; their water layer is the same depth quantity across the whole field. Droplet water remains a legacy normalised activity mask. A 0..1 mask_layer protects hard/frozen samples with value 1 as unchanged outlets; protected outlets and retained lakes are exceptions to border drainage. Loads the WASM kernel.

Inputs

#namedescription
0heightfieldgeometry with a height layer

Parameters

nametypedefaultrangedescription
epsilonfloat00..minimum elevation rise in metres per receiver step; 0 fills to the spill level, positive values give strictly descending routes (at least one Float32 step)
max_depthfloat00..retain whole connected depressions deeper than this many metres as lakes; 0 fills every depression
mask_layerstring""optional 0..1 hardness/frozen layer: value 1 remains unchanged and acts as a drainage outlet; lower values may be filled
write_fillbooltruewrite fill: actual added terrain thickness in metres, nonnegative
write_lakebooltruewrite lake: retained standing-water depth in metres above the unchanged bed, zero outside lakes

Writes: filled height; optional fill and lake depth layers; other layers preserved

Example

{
  "nodes": {
    "hf": {
      "type": "heightfield",
      "params": { "size": [8, 8], "resolution": 0.5 }
    },
    "bowl": {
      "type": "heightfield_layer",
      "in": ["hf"],
      "params": { "expression": "min(2, (x*x + z*z) / 8)" }
    },
    "fill": {
      "type": "heightfield_fill_sinks",
      "in": ["bowl"],
      "params": { "epsilon": 0.001 }
    }
  },
  "output": "fill"
}

heightfield_flow#

aliases: hf_flow heightfield_drainage

Compute downhill drainage accumulation and flow direction for river masks.

Routes contributing cell area downhill without modifying height. D8 sends it to the steepest of eight neighbours; D-infinity splits flow between receivers on the steepest triangular facet. By default local minima retain drainage. fill_sinks routes over a priority-flood filled surface and resolves flats with stable receivers, without modifying the stored height or lake layers. The direction layer records the dominant receiver: E, SE, S, SW, W, NW, N, NE = 0..7, and 255 for a sink. Drainage is contributing area in square metres, ln(1 + area) with log_scale (the default), so thresholds are absolute; normalise divides by the field's largest value instead, which depends on the field's extent. Drainage only counts area inside the field: a tile sees rivers that enter it as starting at its border, so route the whole map (or a tile with a margin that holds the catchments) and crop. Loads the erosion WASM kernel.

Inputs

#namedescription
0heightfieldgeometry with a height layer

Parameters

nametypedefaultrangedescription
methodenum"dinf"D8 chooses one steepest receiver; D-infinity splits contributing area between two downslope receivers
options: d8 dinf
fill_sinksboolfalseroute over a priority-flood filled surface with stable flat receivers, preserving the original height; false leaves local minima as sinks
normaliseboolfalsedivide drainage by its largest value on the field (0..1, after log_scale); depends on the field's extent
aliases: normalize
log_scalebooltruewrite ln(1 + area in m²) to reveal small tributaries alongside main rivers

Writes: layers drainage and direction; all existing layers preserved

Example

{
  "nodes": {
    "hf": {
      "type": "heightfield",
      "params": { "size": [20, 20], "resolution": 0.5 }
    },
    "n": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": { "fractal": "ridged", "amplitude": 4 }
    },
    "f": { "type": "heightfield_flow", "in": ["n"] }
  },
  "output": "f"
}

Used in the examples eroded_valley, unreal_landscape.

heightfield_from_image#

aliases: heightfield_file heightmap_import hf_from_image heightfield_image

Load a heightmap or mask from an 8/16-bit PNG (grey or colour) into a heightfield layer.

Houdini: HeightField File. One sample per pixel; image column = X, row = Z with row 0 at the field's min Z (the layout export png16 writes, so a round trip lines up). Values 0..1 map to height_min..height_max (use the numbers from the export sidecar; 0 and 1 for masks). The image covers size.x metres along X (or (pixels − 1) × resolution) around center, Z following its aspect. With a heightfield connected, the image is written into layer of that field instead of creating one: placed in the world the same way (fit world: every sample reads the image at its own X/Z, bilinear, so a tile reads the same values as the whole map; samples outside the image keep the layer), or stretched over the connected field (fit field, which depends on that field's extent).

Inputs

#namedescription
0heightfieldoptional: write the image into this field (optional)

Parameters

nametypedefaultrangedescription
pathpath""PNG file or URL; a relative path reads from the package folder (nearest .topo file), else the graph's folder
aliases: file filename
layerstring"height"layer to write
height_minfloat0value for black (0)
aliases: min low
height_maxfloat10value for white (1)
aliases: max high
channelenum"luminance"which channel of a colour image
options: luminance average r g b a
sizevec2[20,20]image extent along X (metres; Z follows the image aspect): a new field's size, or where the image lies over a connected field (fit world)
resolutionfloat00..pixel spacing (metres); > 0 overrides size (extent = (pixels - 1) × resolution)
centervec3[0,0,0]field centre: X and Z place the grid, Y is added to the initial height
aliases: t translate position pos
fitenum"world"with a heightfield connected: world = the image lies at center/size in the world and each sample reads it at its X/Z; field = stretch the image over the connected field (depends on its extent)
options: world field
aliases: placement
flip_zboolfalseimage row 0 at max Z instead of min Z
namestring"heightfield"new field name

Writes: the layer (a new field also gets height and mask)

Example

{
  "type": "heightfield_from_image",
  "params": {
    "path": "terrain.png",
    "size": [100, 100],
    "height_min": 0,
    "height_max": 25
  }
}

heightfield_from_mesh#

aliases: heightfield_project_mesh mesh_to_heightfield hf_from_mesh

Make a heightfield from polygons by projecting them along Y: height = highest (or lowest) surface, mask = 1 where hit.

Houdini: HeightField Project onto a new HeightField. Every sample takes the Y of the mesh surface straight above/below it (exact: the triangles are rasterised onto the grid, same result as a vertical ray per sample). The field covers the mesh's XZ bounds plus padding unless size is set. Samples that miss get the mesh's lowest Y (miss "min"), 0, or background.

Inputs

#namedescription
0meshpolygons (terrain scans, sculpted meshes, building footprints)

Parameters

nametypedefaultrangedescription
resolutionfloat0.10.001..cell size (metres)
aliases: grid_spacing cell_size spacing voxel_size
paddingfloat00..extra border around the mesh bounds (metres)
sizevec2[0,0]field extent in X and Z; 0 = the mesh bounds (+ padding)
centervec3[0,0,0]field centre when size is set
directionenum"down"down = the highest surface (looking from above), up = the lowest
options: down up
missenum"min"height where nothing is hit: the mesh's lowest Y, 0, or the background value
options: min zero background
backgroundfloat0height for misses when miss = background
maskbooltruewrite mask = 1 where the mesh was hit, 0 elsewhere
namestring"heightfield"heightfield name

Writes: heightfield volume with layers height, mask

Example

{
  "nodes": {
    "g": { "type": "grid", "params": { "size": [10, 10] } },
    "n": { "type": "noise_displace", "in": ["g"], "params": { "amplitude": 1 } },
    "hf": {
      "type": "heightfield_from_mesh",
      "in": ["n"],
      "params": { "resolution": 0.1 }
    }
  },
  "output": "hf"
}

heightfield_layer#

aliases: heightfield_copylayer heightfield_layerclear hf_layer heightfield_wrangle heightfield_expr

Layer operations: compute a layer from an expression over layers ("height * mask + 2"), copy, rename, delete or fill.

Houdini: HeightField Layer / Copy Layer / Layer Clear, plus a volume wrangle for heightfields. Expression variables: every layer by name (height, mask, flow …), value (the target layer's current value), x z (world position), i j (sample indices), u v (0..1 over the field), cell (cell size), b_<layer> = a layer of the heightfield in input 1 sampled at x, z, the graph vars by their bare name (a layer or sample variable of the same name comes first, with a warning), and all wrangle helpers (clamp fit smoothstep noise min max pow …). A body with "return" works too. Write expressions in x z (and layers) to get the same values on a tile as on the whole map: i j u v count from the field's own corner and extent.

Inputs

#namedescription
0heightfieldgeometry with a heightfield
1otheroptional second heightfield: its layers as b_<name> (optional)

Parameters

nametypedefaultrangedescription
operationenum"expression"expression: layer = expression; copy/rename: layer ← source; delete: remove layer; fill: layer = value
options: expression copy rename delete fill
aliases: op mode
layerstring"height"target layer (created if missing). For delete, use names or patterns separated by spaces or commas. * matches any number of characters and ? matches one.
expressioncode"height"JS expression per sample (or a body with return)
aliases: expr code
sourcestring"mask"source layer for copy/rename
valuefloat0fill value
mask_layerstring""optional 0..1 layer that blends the result in ("" = everywhere), e.g. "mask"
aliases: mask

Writes: the target layer

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "n": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": { "amplitude": 2, "range": "positive" }
    },
    "l": {
      "type": "heightfield_layer",
      "in": ["n"],
      "params": {
        "layer": "snow",
        "expression": "smoothstep(1.2, 1.8, height)"
      }
    }
  },
  "output": "l"
}

Used in the examples eroded_valley, forest_on_terrain, terrain_tiles, unreal_landscape.

heightfield_mask_blur#

aliases: hf_mask_blur

Blur a mask layer (radius in metres): soft mask edges for blending and scattering.

Houdini: HeightField Blur on the mask layer. Same filter as heightfield_blur with layer "mask".

Inputs

#namedescription
0heightfieldgeometry with a heightfield

Parameters

nametypedefaultrangedescription
layerstring"mask"layer to blur
radiusfloat10..blur radius (metres)
aliases: size distance
modeenum"gaussian"gaussian (smooth, radius = 2 sigma) or box (flat average)
options: gaussian box
aliases: filter type
iterationsint11..50repeat the blur
mask_layerstring""optional 0..1 layer that blends the result in ("" = everywhere), e.g. "mask"
aliases: mask

Writes: the mask layer

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "m": { "type": "heightfield_mask_noise", "in": ["hf"] },
    "b": {
      "type": "heightfield_mask_blur",
      "in": ["m"],
      "params": { "radius": 0.5 }
    }
  },
  "output": "b"
}

Used in the examples eroded_valley, forest_on_terrain, unreal_landscape.

heightfield_mask_by_feature#

aliases: heightfield_maskbyfeature hf_mask_by_feature heightfield_mask_slope

Mask terrain by a feature: slope angle, height range, curvature (valleys/ridges), facing direction, flow, or ambient occlusion.

Houdini: HeightField Mask by Feature. Computes a 0..1 mask from one feature, shapes it with ramp, then combines it with the existing mask layer (mode). Chain several to combine features (mode multiply = and, max = or). slope: 1 between min_angle and max_angle, fading over angle_falloff degrees. height: absolute Y range. curvature: concave = valleys (the surface is below its blurred self by curvature_threshold), convex = ridges. direction: downhill facing, 0° = +X, 90° = +Z, within direction_spread. flow: a flow layer (from heightfield_erode) above min_flow. occlusion: horizon-based ambient occlusion over occlusion_radius (8-direction sweep), 1 = enclosed.

Inputs

#namedescription
0heightfieldgeometry with a heightfield

Parameters

nametypedefaultrangedescription
featureenum"slope"what to mask by
options: slope height curvature direction flow occlusion
layerstring"mask"mask layer to write
modeenum"replace"combine with the existing mask
options: replace add subtract multiply max min
aliases: combine operation
min_anglefloat300..90slope: lowest angle in the mask (degrees)
aliases: min_slope
max_anglefloat900..90slope: highest angle in the mask (degrees)
aliases: max_slope
angle_fallofffloat50..slope: soft edge (degrees)
aliases: slope_falloff
min_heightfloat0height: lowest Y in the mask
max_heightfloat1000height: highest Y in the mask
height_fallofffloat0.50..height: soft edge (metres)
curvature_typeenum"concave"curvature: concave = valleys and creases, convex = ridges and peaks
options: concave convex
curvature_radiusfloat10..curvature: feature scale (metres)
curvature_thresholdfloat0.050..curvature: depth (metres) below/above the blurred surface for a full mask
directionfloat0direction: downhill facing in degrees (0 = +X, 90 = +Z, 180 = −X, 270 = −Z)
aliases: facing aspect
direction_spreadfloat450..180direction: half-width of the facing band (degrees)
flow_layerstring"flow"flow: layer to read
min_flowfloat0.5flow: value where the mask starts (erode's flow: ~0.3 sheet flow, > 0.6 channels)
flow_fallofffloat0.20..flow: soft edge above min_flow
occlusion_radiusfloat50..occlusion: how far to look for the horizon (metres)
rampramp[[0,0],[1,1]]reshape the feature mask (0..1 → 0..1) before combining
invertboolfalseinvert the feature mask
blurfloat00..blur the feature mask (metres) before combining

Writes: the mask layer

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "n": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": { "amplitude": 4, "fractal": "ridged", "element_size": 6 }
    },
    "m": {
      "type": "heightfield_mask_by_feature",
      "in": ["n"],
      "params": { "feature": "slope", "min_angle": 35 }
    }
  },
  "output": "m"
}

Used in the examples eroded_valley, forest_on_terrain, unreal_landscape.

heightfield_mask_by_object#

aliases: heightfield_maskbyobject hf_mask_by_object

Mask terrain by geometry: under a mesh's footprint, or within a distance of curves or points (roads, rivers, building plots).

Houdini: HeightField Mask by Object. footprint: samples under the polygons (projected along Y), grown by distance; distance: samples within distance of the curves/points (XZ). Both fade to 0 over falloff metres. Exact: polygons are rasterised onto the grid and curve segments measured per sample.

Inputs

#namedescription
0heightfieldgeometry with a heightfield
1objectpolygons, curves or points

Parameters

nametypedefaultrangedescription
byenum"auto"auto = footprint for polygons, distance for curves and points
options: auto footprint distance
aliases: method source
distancefloat10..full-mask distance from the curves/points, or growth of the footprint (metres)
aliases: radius width
fallofffloat10..soft edge beyond distance (metres)
layerstring"mask"mask layer to write
modeenum"replace"combine with the existing mask
options: replace add subtract multiply max min
aliases: combine operation
invertboolfalseinvert the object mask

Writes: the mask layer

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "c": {
      "type": "curve",
      "params": {
        "points": [[-8, 0, -6], [0, 0, 2], [8, 0, 4]],
        "smooth": true
      }
    },
    "m": {
      "type": "heightfield_mask_by_object",
      "in": ["hf", "c"],
      "params": { "distance": 1.5, "falloff": 2 }
    }
  },
  "output": "m"
}

heightfield_mask_expand#

aliases: heightfield_maskexpand heightfield_mask_shrink hf_mask_expand heightfield_mask_dilate

Grow (dilate) or shrink (erode) a mask by a distance in metres, with a soft edge.

Houdini: HeightField Mask Expand / Shrink. The mask is thresholded, an exact Euclidean distance transform measures the distance to the region, and the result fades over falloff. Growing keeps the original values inside (max), shrinking never adds (min).

Inputs

#namedescription
0heightfieldgeometry with a heightfield

Parameters

nametypedefaultrangedescription
layerstring"mask"mask layer
distancefloat1grow (+) or shrink (−) distance (metres)
aliases: amount radius
fallofffloat0.50..soft edge (metres)
thresholdfloat0.50..1mask values at or above this count as inside

Writes: the mask layer

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "m": {
      "type": "heightfield_mask_noise",
      "in": ["hf"],
      "params": { "contrast": 4 }
    },
    "e": {
      "type": "heightfield_mask_expand",
      "in": ["m"],
      "params": { "distance": 0.5 }
    }
  },
  "output": "e"
}

heightfield_mask_noise#

aliases: hf_mask_noise

Noise into a mask layer (clamped 0..1): break up masks, vary scatter density and materials.

Houdini: HeightField Mask Noise. Same noise as heightfield_noise (domain warp included) with mask defaults: range positive, mode replace; use mode multiply to break up an existing mask. A band around 0.5 of a warped mask noise traces meandering lines: rivers, paths, strata.

Inputs

#namedescription
0heightfieldgeometry with a heightfield

Parameters

nametypedefaultrangedescription
layerstring"mask"mask layer to write
modeenum"replace"how the noise combines with the mask
options: replace add subtract multiply max min
aliases: combine operation method
noiseenum"simplex"base noise
options: perlin simplex value worley
aliases: basis noise_type
fractalenum"fbm"layering: fbm = rolling hills, ridged = mountain ridges, turbulence = billowy
options: fbm ridged turbulence none
amplitudefloat1noise height (metres for the height layer)
aliases: amp height scale
element_sizefloat30.001..size of the largest features (metres); frequency = 1 / element_size
aliases: elementsize feature_size wavelength
frequencyfloat00..features per metre; > 0 overrides element_size
aliases: freq
octavesint41..12fractal octaves (detail levels)
roughnessfloat0.50..1amplitude gain per octave (higher = rougher)
aliases: gain persistence
lacunarityfloat2.011..frequency gain per octave
rangeenum"positive"zero_centered: noise in [-amplitude, amplitude]; positive: [0, amplitude]
options: zero_centered positive
offsetvec3[0,0,0]noise-space offset (scrolls the pattern; Y picks another slice)
aliases: translate_noise noise_offset
seedfloat0random seed
warp_amplitudefloat00..domain warp: how far (metres) a second noise moves each sample's lookup along X and Z, bending ridges, valleys and contours into meanders (0 = off)
aliases: warp warp_amount
warp_element_sizefloat100.001..domain warp: size of the bends (metres); frequency = 1 / warp_element_size
warp_frequencyfloat00..domain warp: bends per metre; > 0 overrides warp_element_size
warp_octavesint31..8domain warp: fractal octaves of the warp noise (more = wigglier bends)
warp_seedfloat0domain warp: seed of the warp noise (independent of seed)
contrastfloat10..sharpen (> 1) or soften (< 1) the noise around 0.5 before combining

Writes: the mask layer (0..1)

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "m": {
      "type": "heightfield_mask_noise",
      "in": ["hf"],
      "params": { "element_size": 4, "contrast": 2 }
    }
  },
  "output": "m"
}

Used in the examples forest_on_terrain, unreal_landscape.

heightfield_noise#

aliases: hf_noise heightfield_mountain

Add (or multiply, replace, max, min) fractal noise on a heightfield layer: mountains, hills, dunes, mask variation.

Houdini: HeightField Noise. Noise is sampled at each sample's world X/Z, so it is resolution-independent and a tile of a map gets the map's values. For mountains use fractal ridged, amplitude a few metres, element_size about a third of the field. Domain warp (warp_amplitude > 0) moves each lookup by a second noise, in metres: ridges, escarpments and valleys meander instead of running straight (warp_element_size a few times element_size for broad bends, smaller for wiggles; terrace the result for meandering cliff bands). mask_layer blends the result in by a 0..1 layer.

Inputs

#namedescription
0heightfieldgeometry with a heightfield

Parameters

nametypedefaultrangedescription
layerstring"height"layer to modify
modeenum"add"how the noise combines with the layer
options: replace add subtract multiply max min
aliases: combine operation method
noiseenum"simplex"base noise
options: perlin simplex value worley
aliases: basis noise_type
fractalenum"fbm"layering: fbm = rolling hills, ridged = mountain ridges, turbulence = billowy
options: fbm ridged turbulence none
amplitudefloat1noise height (metres for the height layer)
aliases: amp height scale
element_sizefloat50.001..size of the largest features (metres); frequency = 1 / element_size
aliases: elementsize feature_size wavelength
frequencyfloat00..features per metre; > 0 overrides element_size
aliases: freq
octavesint61..12fractal octaves (detail levels)
roughnessfloat0.50..1amplitude gain per octave (higher = rougher)
aliases: gain persistence
lacunarityfloat2.011..frequency gain per octave
rangeenum"zero_centered"zero_centered: noise in [-amplitude, amplitude]; positive: [0, amplitude]
options: zero_centered positive
offsetvec3[0,0,0]noise-space offset (scrolls the pattern; Y picks another slice)
aliases: translate_noise noise_offset
seedfloat0random seed
warp_amplitudefloat00..domain warp: how far (metres) a second noise moves each sample's lookup along X and Z, bending ridges, valleys and contours into meanders (0 = off)
aliases: warp warp_amount
warp_element_sizefloat100.001..domain warp: size of the bends (metres); frequency = 1 / warp_element_size
warp_frequencyfloat00..domain warp: bends per metre; > 0 overrides warp_element_size
warp_octavesint31..8domain warp: fractal octaves of the warp noise (more = wigglier bends)
warp_seedfloat0domain warp: seed of the warp noise (independent of seed)
mask_layerstring""optional 0..1 layer that blends the result in ("" = everywhere), e.g. "mask"
aliases: mask

Writes: the layer (created if missing)

Example

{
  "nodes": {
    "hf": {
      "type": "heightfield",
      "params": { "size": [20, 20], "resolution": 0.1 }
    },
    "mtn": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": {
        "fractal": "ridged",
        "amplitude": 4,
        "element_size": 8,
        "range": "positive",
        "warp_amplitude": 2.5,
        "warp_element_size": 12
      }
    }
  },
  "output": "mtn"
}

Used in the examples eroded_valley, forest_on_terrain, terrain_tiles, unreal_landscape.

heightfield_path#

aliases: hf_path heightfield_road road_cut

Cut a road or path along curves: flatten the terrain to a smooth profile across width, blend shoulders, bank in bends; writes a path mask.

Houdini: HeightField Project of a road profile / Path tools. The road height follows the terrain under the curve smoothed over smooth metres (height_mode terrain), or the curve's own Y (curve). Across the road the surface is flat (tilted by up to bank degrees in tight bends, outer edge up); beyond width/2 it blends back to the terrain over shoulder metres, cutting through hills and filling dips. mask_layer (default "path") marks the road surface for texturing, scattering exclusion or freezing erosion.

Inputs

#namedescription
0heightfieldgeometry with a heightfield
1curvespolylines (draw them flat at y = 0 for height_mode terrain)

Parameters

nametypedefaultrangedescription
widthfloat40..flat road width (metres)
shoulderfloat20..blend distance from the road edge back to the terrain (metres)
aliases: falloff blend embankment
bankfloat00..45maximum bank angle in tight bends (degrees; full bank at a radius of 5 × width)
aliases: banking superelevation
height_modeenum"terrain"terrain: follow the ground under the curve (smoothed); curve: use the curve's Y
options: terrain curve
smoothfloat50..smoothing of the road profile along the curve (metres)
aliases: smoothing smooth_distance
offsetfloat0raise (+) or sink (−) the road surface (metres)
layerstring"height"layer to modify
mask_layerstring"path"layer marking the road surface ("" = no)

Writes: the layer and the mask layer ("path")

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "n": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": { "amplitude": 2 }
    },
    "c": {
      "type": "curve",
      "params": {
        "points": [[-9, 0, -4], [-2, 0, 1], [4, 0, -1], [9, 0, 5]],
        "smooth": true
      }
    },
    "r": {
      "type": "heightfield_path",
      "in": ["n", "c"],
      "params": { "width": 3, "shoulder": 2 }
    }
  },
  "output": "r"
}

Used in the example unreal_landscape.

heightfield_project#

aliases: hf_project heightfield_stamp

Stamp meshes or curves onto a heightfield: replace, raise (max), lower (min), add or subtract, blended over a radius.

Houdini: HeightField Project. Polygons stamp the Y of their surface straight above/below each sample. Outside a polygon the effect fades over radius metres from its outline, using the height at the nearest point on that outline. Open curves stamp their own height within width/2 of the curve, and the falloff uses the nearest stamped sample. level mean sets each connected polygon piece to the average terrain height under it instead of its own Y: building pads, plazas and car parks sit where cut and fill balance, so slopes get the smallest embankments. mask_layer stores the blend weight (e.g. to freeze it during erosion or to texture it).

Inputs

#namedescription
0heightfieldgeometry with a heightfield
1stamppolygons (plateaus, platforms, rocks) and/or curves (ridges, dykes)

Parameters

nametypedefaultrangedescription
modeenum"replace"replace = set to the stamp, max = only raise, min = only lower, add/subtract = add/remove the stamp height
options: replace max min add subtract
aliases: combine operation method
layerstring"height"layer to modify
radiusfloat10..blend distance outside the stamp (metres)
aliases: blend falloff
offsetfloat0added to the stamped height (metres)
widthfloat10..curves: stamp width (metres)
directionenum"down"polygons: stamp the highest (down) or lowest (up) surface
options: down up
levelenum"stamp"polygons: stamp height = the polygon surface (stamp), or the mean terrain height under each connected piece (mean: building pads that balance cut and fill; offset still applies)
options: stamp mean
aliases: pad flatten_to
mask_layerstring""store the stamp weight in this layer ("" = no)

Writes: the layer (and mask_layer)

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "n": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": { "amplitude": 2 }
    },
    "b": {
      "type": "box",
      "params": { "size": [4, 1, 4], "center": [3, 1.5, 0] }
    },
    "s": {
      "type": "heightfield_project",
      "in": ["n", "b"],
      "params": { "mode": "replace", "radius": 2 }
    }
  },
  "output": "s"
}

Used in the example eroded_valley.

heightfield_remap#

aliases: hf_remap

Remap a layer's values: fit an input range to an output range through a ramp (invert, shape heights or masks).

Houdini: HeightField Remap. t = (value − input_min) / (input_max − input_min), then value = output_min + ramp(t) × (output_max − output_min). The input range is absolute, so a tile remaps exactly like the same area of the whole map; auto_range uses the layer's own min/max instead, which depend on the field's extent (a tile or a cropped field remaps differently). A ramp like [[0,0],[0.5,0.2],[1,1]] flattens valleys and sharpens peaks.

Inputs

#namedescription
0heightfieldgeometry with a heightfield

Parameters

nametypedefaultrangedescription
layerstring"height"layer to modify
input_minfloat0input value for t = 0 (e.g. the lowest height in metres)
input_maxfloat1input value for t = 1
auto_rangeboolfalseuse the layer's own min/max as the input range instead (depends on the field's extent)
output_minfloat0output for t = 0
aliases: min
output_maxfloat1output for t = 1
aliases: max
rampramp[[0,0],[1,1]]shape: [[t, value], ...] with t and value 0..1
clampbooltrueclamp t to 0..1 before the ramp
mask_layerstring""optional 0..1 layer that blends the result in ("" = everywhere), e.g. "mask"
aliases: mask

Writes: the layer

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "n": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": { "amplitude": 3 }
    },
    "r": {
      "type": "heightfield_remap",
      "in": ["n"],
      "params": {
        "input_min": -3,
        "input_max": 3,
        "output_min": 0,
        "output_max": 6,
        "ramp": [[0, 0], [0.6, 0.25], [1, 1]]
      }
    }
  },
  "output": "r"
}

Used in the examples eroded_valley, forest_on_terrain, unreal_landscape.

heightfield_resample#

aliases: hf_resample heightfield_resize

Change a heightfield's resolution over the same extent (all layers, bilinear; pre-blurred when shrinking), e.g. to an Unreal size like 505 × 505.

Houdini: HeightField Resample. Give the new cell size (resolution), exact sample counts (samples), or a factor on the sample count (2 = twice as many per side). The X extent is kept exactly; Z follows the new cell size. The new grid starts at the field's corner and its cell is the X extent divided evenly, so tiles of a map resample onto one shared grid only when the resolution divides each tile's extent (heightfield_crop tiles of equal size do); shrinking pre-blurs, which needs a margin at tile borders.

Inputs

#namedescription
0heightfieldgeometry with a heightfield

Parameters

nametypedefaultrangedescription
resolutionfloat00..new cell size (metres); 0 = use samples or factor
aliases: cell_size grid_spacing
samplesivec2[0,0]0..16785409new sample counts [nx, nz]; nx > 1 overrides resolution (nz 0 = keep the extent)
factorfloat10.01..16multiply the samples per side (when resolution and samples are 0)
aliases: scale

Writes: all layers at the new resolution

Example

{
  "nodes": {
    "hf": {
      "type": "heightfield",
      "params": { "size": [50, 50], "resolution": 0.25 }
    },
    "r": {
      "type": "heightfield_resample",
      "in": ["hf"],
      "params": { "samples": [253, 253] }
    }
  },
  "output": "r"
}

heightfield_scatter#

aliases: hf_scatter heightfield_scatter_points

Scatter points on a heightfield by a mask layer's density: P on the surface, N from the slope (or straight up), height/slope/mask attributes, optional minimum distance. Feed copy_to_points.

Houdini: HeightField Scatter. Count = density × area weighted by the mask (or count). Candidates are drawn by the mask (seeded), then thinned to even blue-noise spacing with relax (weighted sample elimination, as scatter, in chunks on the worker pool). Points sit exactly on the field's surface: bilinear between the samples (default), or with sample unreal_triangles the surface of an Unreal Landscape imported from this field's heightmap (export png16/r16): each cell split along its (0,0)–(1,1) diagonal in heightmap index space, column = X, row = Z (row 0 = min Z), which is how the Landscape triangulates its quads (vertex (x, y) = (column, row), Unreal Y = our Z), so instance bases land on the Landscape exactly. The modes agree at the samples and along cell edges and differ inside a cell by up to a quarter of its twist |h00 + h11 − h10 − h01|. N and slope come from central differences over one cell of the same surface; mask stays bilinear (Unreal samples weightmaps as textures). Attributes: height (Y), slope (degrees), mask (the density layer value at the point). N is the surface normal, and copy_to_points aims a copy's +Z along N (Houdini convention), which lays a Y-up tree down: align upright writes orient = identity so trees, houses and posts stand as modelled, align slope writes an orient that turns +Y onto the normal so rocks and shrubs lean with the terrain (orient wins over N in copy_to_points; random yaw goes on top with copy_to_points rotate_attrib). min_distance keeps every pair of points at least that far apart in XZ (exact dart throwing over the drawn candidates, replacing relax): building lots that never overlap; the count can come out lower when the masked area is full. Points are drawn over the whole field (density is per m², but the seeded draw, relax and min_distance see every sample), so a tile gets other points than the same area of the whole map: scatter on the whole map and keep the points inside the tile when tiles must match.

Inputs

#namedescription
0heightfieldgeometry with a heightfield

Parameters

nametypedefaultrangedescription
densityfloat0.50..points per square metre at mask 1
aliases: density_per_m2
countint00..2000000exact number of points; > 0 overrides density
aliases: npts points
mask_layerstring"mask"density layer (0..1); "" = uniform everywhere
aliases: mask density_layer
relaxbooltrueeven (blue-noise) spacing
seedfloat0random seed
keep_heightfieldboolfalsealso keep the heightfield (default: points only)
alignenum"none"instance orientation for copy_to_points: none = only N (the surface normal; copy_to_points then aims a copy's +Z along it, the Houdini convention, which lays Y-up models down); upright = orient identity, models stand as authored (trees, buildings, posts); slope = orient turns a model's +Y onto the surface normal (rocks, shrubs leaning with the terrain). N stays the surface normal
options: none upright slope
aliases: orientation upright
min_distancefloat00..exact minimum distance between points in XZ (metres; 0 = off), e.g. lot spacing so buildings never overlap; replaces relax, and the count can come out lower
aliases: mindist min_dist spacing
sampleenum"bilinear"surface between samples: bilinear, or unreal_triangles = Unreal Landscape's triangles (each cell cut along its (0,0)–(1,1) diagonal in heightmap index space, column = X, row = Z), so points land exactly on a Landscape imported from this field's png16/r16 export
options: bilinear unreal_triangles
aliases: sampling sample_mode

Writes: points: N, height, slope, mask; orient with align upright or slope

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "n": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": { "amplitude": 3 }
    },
    "m": {
      "type": "heightfield_mask_by_feature",
      "in": ["n"],
      "params": { "feature": "slope", "min_angle": 20 }
    },
    "s": {
      "type": "heightfield_scatter",
      "in": ["m"],
      "params": { "density": 0.3 }
    }
  },
  "output": "s"
}

Used in the examples forest_on_terrain, unreal_landscape.

heightfield_terrace#

aliases: hf_terrace

Terrace a heightfield: quantise heights into flat steps at absolute levels (rice terraces, mesas, strata), with rounded risers.

Houdini: HeightField Terrace. levels step (default): terraces at base + n × step_height, absolute heights, so a tile gets the same levels as the whole map. levels range: steps equal terraces from range_min to range_max (also absolute). levels layer: steps terraces between the layer's own min and max, which depend on the field's extent (a tile or a cropped field gets other levels than the whole map). rounding 0 = flat steps with vertical risers, 1 = smooth S-shaped risers across the whole step.

Inputs

#namedescription
0heightfieldgeometry with a heightfield

Parameters

nametypedefaultrangedescription
layerstring"height"layer to modify
levelsenum"step"where the terraces sit: step = base + n × step_height; range = steps terraces from range_min to range_max; layer = steps terraces between the layer's own min and max (depends on the field's extent)
options: step range layer
aliases: mode
step_heightfloat10..levels step: terrace height (metres)
aliases: height spacing
basefloat0levels step: the height of one terrace level (metres); the others are base ± n × step_height
stepsint81..1000levels range and layer: number of terraces
aliases: count
range_minfloat0levels range: height of the lowest terrace level (metres)
range_maxfloat10levels range: height the steps reach (metres)
roundingfloat0.20..1riser width as a fraction of the step: 0 = sharp, 1 = smooth
aliases: smoothness sharpness
mask_layerstring""optional 0..1 layer that blends the result in ("" = everywhere), e.g. "mask"
aliases: mask

Writes: the layer

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "n": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": { "amplitude": 3, "range": "positive" }
    },
    "t": {
      "type": "heightfield_terrace",
      "in": ["n"],
      "params": { "step_height": 0.5, "rounding": 0.3 }
    }
  },
  "output": "t"
}

Used in the example terrain_tiles.

heightfield_to_mesh#

aliases: heightfield_convert hf_to_mesh heightfield_to_polygons convert_heightfield

Convert heightfields to a quad grid mesh (height as Y) with layers as point attributes, N, uv and optional colours.

Houdini: HeightField Convert to polygons. Points are row-major like the layers (point = j × width + i at step 1), quads face +Y. Every layer becomes a point float attribute of the same name (mask, flow, sediment …) for attribute-driven shading, scattering or export. color writes Cd: mask (white → red), height (ramp), terrain (grass, rock on slopes, sand where sediment/debris settled, darker where water flows, snow on high flat ground, asphalt on a "path" layer).

Inputs

#namedescription
0heightfieldgeometry with heightfields

Parameters

nametypedefaultrangedescription
stepint11..64use every Nth sample (2 = a quarter of the quads)
aliases: decimate lod
layersbooltruecopy every layer to a point float attribute
normalsbooltruepoint N from the field gradient
uvbooltruepoint uv 0..1 over the field (each tile uses its own extent); v = 1 at the −Z edge, at the top of a heightfield_to_tex image
colorenum"none"point Cd from the layers
options: none mask height terrain
keep_heightfieldboolfalsekeep the heightfield volume alongside the mesh

Writes: quads; point N, uv, Cd and one float attribute per layer

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "n": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": { "amplitude": 2 }
    },
    "m": {
      "type": "heightfield_to_mesh",
      "in": ["n"],
      "params": { "color": "terrain" }
    }
  },
  "output": "m"
}

Used in the examples eroded_valley, forest_on_terrain, terrain_tiles, unreal_landscape.

heightfield_to_sdf#

aliases: heightfield_convert_sdf hf_to_sdf sdf_from_heightfield

Turn a heightfield into an SDF volume (solid ground below the surface) for sdf_combine / sdf_to_mesh: caves, overhangs, closed terrain blocks.

Houdini: Convert HeightField to VDB (SDF). Distance = (y − h(x, z)) / sqrt(1 + |∇h|²), negative below the surface. closed caps the sides and the bottom (depth below the lowest point), so sdf_to_mesh gives a watertight terrain block; subtract SDF shapes from it to carve caves and overhangs.

Inputs

#namedescription
0heightfieldgeometry with heightfields

Parameters

nametypedefaultrangedescription
depthfloat10..solid thickness below the field's lowest point (metres; that point depends on the field's extent, so tiles get their own bottoms)
aliases: thickness
closedbooltruecap the sides and the bottom (a finite block); false = an infinite slab clipped by the bounds
keep_heightfieldboolfalsekeep the heightfield volume
namestring"terrain_sdf"SDF volume name

Writes: one SDF volume per heightfield

Example

{
  "nodes": {
    "hf": {
      "type": "heightfield",
      "params": { "size": [10, 10], "resolution": 0.1 }
    },
    "n": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": { "amplitude": 1.5 }
    },
    "s": { "type": "heightfield_to_sdf", "in": ["n"] },
    "m": { "type": "sdf_to_mesh", "in": ["s"], "params": { "divisions": 100 } }
  },
  "output": "m"
}

heightfield_transform#

aliases: heightfield_xform hf_transform heightfield_move

Move, scale, raise or turn (by 90° steps) heightfields: translate X/Z moves the grid, Y raises the heights; scale resizes the cells.

Houdini: HeightField Transform. Heightfields stay axis-aligned grids: rotation snaps to multiples of 90°, scale is uniform in X/Z (it changes the cell size), height_scale multiplies heights about pivot Y. Scale and rotation turn about pivot, a world point, so the tiles of a map move together; pivot_at_center turns each field about its own centre instead. The generic transform node applies the same rules.

Inputs

#namedescription
0heightfieldgeometry with a heightfield

Parameters

nametypedefaultrangedescription
translatevec3[0,0,0]move: X/Z shift the grid, Y raises the height layer
aliases: t move offset
scalefloat10.0001..uniform X/Z scale of the grid (cell size × scale)
aliases: s uniform_scale
height_scalefloat1multiply heights about pivot Y
aliases: scale_y vertical_scale
rotatefloat0rotation about Y in degrees (snapped to 90° steps)
aliases: r rot
pivotvec3[0,0,0]pivot for scale and rotation (X/Z ignored when pivot_at_center)
pivot_at_centerboolfalseuse the field's own centre as the X/Z pivot (depends on its extent: a tile turns about its own centre)

Writes: transformed heightfields

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "n": { "type": "heightfield_noise", "in": ["hf"] },
    "t": {
      "type": "heightfield_transform",
      "in": ["n"],
      "params": { "translate": [20, 0, 0], "height_scale": 2 }
    }
  },
  "output": "t"
}