heightfield nodes
26 node types in the heightfield category.
- heightfield
- heightfield_blur
- heightfield_clip
- heightfield_crop
- heightfield_cutout
- heightfield_erode
- heightfield_fill_sinks
- heightfield_flow
- heightfield_from_image
- heightfield_from_mesh
- heightfield_layer
- heightfield_mask_blur
- heightfield_mask_by_feature
- heightfield_mask_by_object
- heightfield_mask_expand
- heightfield_mask_noise
- heightfield_noise
- heightfield_path
- heightfield_project
- heightfield_remap
- heightfield_resample
- heightfield_scatter
- heightfield_terrace
- heightfield_to_mesh
- heightfield_to_sdf
- heightfield_transform
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
| name | type | default | range | description |
|---|---|---|---|---|
size | vec2 | [20,20] | extent in X and Z (metres), rounded up to whole cells | |
resolution | float | 0.1 | 0.001.. | cell size: distance between samples (metres) aliases: grid_spacing cell_size spacing voxel_size divsize |
samples | ivec2 | [0,0] | 0..16785409 | sample counts [nx, nz]; when nx > 1 they override resolution (cell = size.x / (nx - 1), depth = (nz - 1) × cell), e.g. [505, 505] for Unreal |
center | vec3 | [0,0,0] | field centre: X and Z place the grid, Y is added to the initial height aliases: t translate position pos | |
height | float | 0 | initial height (world Y) aliases: initial_height elevation | |
name | string | "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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
layer | string | "height" | layer to blur | |
radius | float | 1 | 0.. | blur radius (metres) aliases: size distance |
mode | enum | "gaussian" | gaussian (smooth, radius = 2 sigma) or box (flat average) options: gaussian boxaliases: filter type | |
iterations | int | 1 | 1..50 | repeat the blur |
mask_layer | string | "" | 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
layer | string | "height" | layer to modify | |
min | float | 0 | lowest value kept (when clip_min) aliases: low floor | |
max | float | 10 | highest value kept (when clip_max) aliases: high ceiling | |
clip_min | bool | true | raise values below min to min | |
clip_max | bool | true | lower values above max to max | |
mask_layer | string | "" | 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
mode | enum | "tile" | tile = one tile of a tiles grid over the field; bounds = the samples covering min..max options: tile bounds | |
tiles | ivec2 | [2,2] | 1..4096 | tile mode: number of tiles along X and Z aliases: grid tile_count |
tile | ivec2 | [0,0] | 0..4095 | tile mode: tile index [column along X, row along Z], counting from 0 at min X / min Z aliases: index tile_index |
min | vec2 | [-5,-5] | bounds mode: world X and Z of the min corner (metres) aliases: bounds_min | |
max | vec2 | [5,5] | bounds mode: world X and Z of the max corner (metres) aliases: bounds_max | |
margin | float | 0 | 0.. | 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_unit | enum | "metres" | margin in metres (rounded up to whole samples) or in samples options: metres samplesaliases: 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
| 1 | shape | optional closed polygons whose footprint is kept (optional) |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
layer | string | "height" | layer to modify | |
value | float | 0 | value written outside aliases: height | |
mask_layer | string | "mask" | mask that keeps the layer (when no shape is connected) | |
invert | bool | false | cut inside the shape/mask instead | |
feather | float | 0 | 0.. | soft edge width (metres) aliases: blend falloff |
write_mask | string | "" | 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
method | enum | "droplet" | droplet = seeded particles; pipe = shallow-water grid; stream_power = pipe plus drainage-driven incision options: droplet pipe stream_power | |
backend | enum | "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 | |
iterations | int | 50 | 0..5000 | rain passes; pipe methods use thermal_interval to schedule thermal passes aliases: iter steps |
seed | float | 0 | random seed | |
erosion_rate | float | 0.3 | 0..1 | droplet: 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_rate | float | 0.3 | 0..1 | droplet: fraction of the excess sediment dropped per droplet step; pipe: deposition rate per second aliases: deposit_rate deposition |
sediment_capacity | float | 1 | 0.. | 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 |
evaporation | float | 0.1 | 0..1 | droplet: water fraction lost per droplet step; pipe: evaporation rate per second aliases: evaporation_rate |
rain_amount | float | 1 | 0.. | water per droplet; pipe rainfall depth in metres per second, multiplied by rain_layer if set aliases: rain water_amount |
rain_density | float | 2 | 0.. | droplet only: droplets per square metre per iteration (at most one per sample: coarse fields cap it) aliases: droplets |
inertia | float | 0.1 | 0..1 | droplet only: share of its heading a droplet keeps per droplet step; 0 = always steepest descent, higher = smoother, longer channels |
gravity | float | 4 | 0.. | acceleration on slopes (droplet: speed² gained per droplet step of drop at slope 1; pipe: m/s²) |
min_slope | float | 0.01 | 0.. | droplet only: minimum capacity (as a slope), keeps flats eroding a little |
erosion_radius | float | 0.3 | 0.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_distance | float | 3 | 0.. | droplet only: how far a droplet travels at most (metres; at least one step) aliases: travel_distance droplet_distance |
thermal_talus_angle | float | 40 | 0..89 | thermal: angle of repose in degrees (steeper slopes shed material) aliases: talus_angle repose_angle cut_angle |
thermal_rate | float | 0.1 | 0..1 | thermal: 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_interval | int | 1 | 1..10000 | pipe/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_layer | string | "" | optional 0..1 layer: 1 = rock that does not erode | |
freeze_layer | string | "" | optional 0..1 layer: 1 = frozen (unchanged), e.g. under buildings or roads | |
rain_layer | string | "" | pipe only: optional nonnegative layer multiplying uniform rain_amount (0 = dry) | |
time_step | float | 0 | 0.. | pipe only: maximum timestep in seconds; 0 chooses it automatically from cell size, gravity and water velocity (CFL) |
stream_power_k | float | 0.01 | 0.. | stream_power only: incision coefficient K in K × drainage^m × slope^n aliases: incision_k |
stream_power_m | float | 0.5 | 0.. | stream_power only: exponent m of contributing drainage area aliases: incision_m |
stream_power_n | float | 1 | 0.. | stream_power only: exponent n of downhill slope aliases: incision_n |
fill_sinks | bool | false | stream_power only: route incision over a depression-filled surface each iteration without raising the ground; fully hard/frozen cells stay protected | |
boundary | enum | "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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a height layer |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
epsilon | float | 0 | 0.. | 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_depth | float | 0 | 0.. | retain whole connected depressions deeper than this many metres as lakes; 0 fills every depression |
mask_layer | string | "" | optional 0..1 hardness/frozen layer: value 1 remains unchanged and acts as a drainage outlet; lower values may be filled | |
write_fill | bool | true | write fill: actual added terrain thickness in metres, nonnegative | |
write_lake | bool | true | write 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a height layer |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
method | enum | "dinf" | D8 chooses one steepest receiver; D-infinity splits contributing area between two downslope receivers options: d8 dinf | |
fill_sinks | bool | false | route over a priority-flood filled surface with stable flat receivers, preserving the original height; false leaves local minima as sinks | |
normalise | bool | false | divide drainage by its largest value on the field (0..1, after log_scale); depends on the field's extent aliases: normalize | |
log_scale | bool | true | write 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
| # | name | description |
|---|---|---|
| 0 | heightfield | optional: write the image into this field (optional) |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
path | path | "" | PNG file or URL; a relative path reads from the package folder (nearest .topo file), else the graph's folder aliases: file filename | |
layer | string | "height" | layer to write | |
height_min | float | 0 | value for black (0) aliases: min low | |
height_max | float | 10 | value for white (1) aliases: max high | |
channel | enum | "luminance" | which channel of a colour image options: luminance average r g b a | |
size | vec2 | [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) | |
resolution | float | 0 | 0.. | pixel spacing (metres); > 0 overrides size (extent = (pixels - 1) × resolution) |
center | vec3 | [0,0,0] | field centre: X and Z place the grid, Y is added to the initial height aliases: t translate position pos | |
fit | enum | "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 fieldaliases: placement | |
flip_z | bool | false | image row 0 at max Z instead of min Z | |
name | string | "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
| # | name | description |
|---|---|---|
| 0 | mesh | polygons (terrain scans, sculpted meshes, building footprints) |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
resolution | float | 0.1 | 0.001.. | cell size (metres) aliases: grid_spacing cell_size spacing voxel_size |
padding | float | 0 | 0.. | extra border around the mesh bounds (metres) |
size | vec2 | [0,0] | field extent in X and Z; 0 = the mesh bounds (+ padding) | |
center | vec3 | [0,0,0] | field centre when size is set | |
direction | enum | "down" | down = the highest surface (looking from above), up = the lowest options: down up | |
miss | enum | "min" | height where nothing is hit: the mesh's lowest Y, 0, or the background value options: min zero background | |
background | float | 0 | height for misses when miss = background | |
mask | bool | true | write mask = 1 where the mesh was hit, 0 elsewhere | |
name | string | "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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
| 1 | other | optional second heightfield: its layers as b_<name> (optional) |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
operation | enum | "expression" | expression: layer = expression; copy/rename: layer ← source; delete: remove layer; fill: layer = value options: expression copy rename delete fillaliases: op mode | |
layer | string | "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. | |
expression | code | "height" | JS expression per sample (or a body with return) aliases: expr code | |
source | string | "mask" | source layer for copy/rename | |
value | float | 0 | fill value | |
mask_layer | string | "" | 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
layer | string | "mask" | layer to blur | |
radius | float | 1 | 0.. | blur radius (metres) aliases: size distance |
mode | enum | "gaussian" | gaussian (smooth, radius = 2 sigma) or box (flat average) options: gaussian boxaliases: filter type | |
iterations | int | 1 | 1..50 | repeat the blur |
mask_layer | string | "" | 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
feature | enum | "slope" | what to mask by options: slope height curvature direction flow occlusion | |
layer | string | "mask" | mask layer to write | |
mode | enum | "replace" | combine with the existing mask options: replace add subtract multiply max minaliases: combine operation | |
min_angle | float | 30 | 0..90 | slope: lowest angle in the mask (degrees) aliases: min_slope |
max_angle | float | 90 | 0..90 | slope: highest angle in the mask (degrees) aliases: max_slope |
angle_falloff | float | 5 | 0.. | slope: soft edge (degrees) aliases: slope_falloff |
min_height | float | 0 | height: lowest Y in the mask | |
max_height | float | 1000 | height: highest Y in the mask | |
height_falloff | float | 0.5 | 0.. | height: soft edge (metres) |
curvature_type | enum | "concave" | curvature: concave = valleys and creases, convex = ridges and peaks options: concave convex | |
curvature_radius | float | 1 | 0.. | curvature: feature scale (metres) |
curvature_threshold | float | 0.05 | 0.. | curvature: depth (metres) below/above the blurred surface for a full mask |
direction | float | 0 | direction: downhill facing in degrees (0 = +X, 90 = +Z, 180 = −X, 270 = −Z) aliases: facing aspect | |
direction_spread | float | 45 | 0..180 | direction: half-width of the facing band (degrees) |
flow_layer | string | "flow" | flow: layer to read | |
min_flow | float | 0.5 | flow: value where the mask starts (erode's flow: ~0.3 sheet flow, > 0.6 channels) | |
flow_falloff | float | 0.2 | 0.. | flow: soft edge above min_flow |
occlusion_radius | float | 5 | 0.. | occlusion: how far to look for the horizon (metres) |
ramp | ramp | [[0,0],[1,1]] | reshape the feature mask (0..1 → 0..1) before combining | |
invert | bool | false | invert the feature mask | |
blur | float | 0 | 0.. | 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
| 1 | object | polygons, curves or points |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
by | enum | "auto" | auto = footprint for polygons, distance for curves and points options: auto footprint distancealiases: method source | |
distance | float | 1 | 0.. | full-mask distance from the curves/points, or growth of the footprint (metres) aliases: radius width |
falloff | float | 1 | 0.. | soft edge beyond distance (metres) |
layer | string | "mask" | mask layer to write | |
mode | enum | "replace" | combine with the existing mask options: replace add subtract multiply max minaliases: combine operation | |
invert | bool | false | invert 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
layer | string | "mask" | mask layer | |
distance | float | 1 | grow (+) or shrink (−) distance (metres) aliases: amount radius | |
falloff | float | 0.5 | 0.. | soft edge (metres) |
threshold | float | 0.5 | 0..1 | mask 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
layer | string | "mask" | mask layer to write | |
mode | enum | "replace" | how the noise combines with the mask options: replace add subtract multiply max minaliases: combine operation method | |
noise | enum | "simplex" | base noise options: perlin simplex value worleyaliases: basis noise_type | |
fractal | enum | "fbm" | layering: fbm = rolling hills, ridged = mountain ridges, turbulence = billowy options: fbm ridged turbulence none | |
amplitude | float | 1 | noise height (metres for the height layer) aliases: amp height scale | |
element_size | float | 3 | 0.001.. | size of the largest features (metres); frequency = 1 / element_size aliases: elementsize feature_size wavelength |
frequency | float | 0 | 0.. | features per metre; > 0 overrides element_size aliases: freq |
octaves | int | 4 | 1..12 | fractal octaves (detail levels) |
roughness | float | 0.5 | 0..1 | amplitude gain per octave (higher = rougher) aliases: gain persistence |
lacunarity | float | 2.01 | 1.. | frequency gain per octave |
range | enum | "positive" | zero_centered: noise in [-amplitude, amplitude]; positive: [0, amplitude] options: zero_centered positive | |
offset | vec3 | [0,0,0] | noise-space offset (scrolls the pattern; Y picks another slice) aliases: translate_noise noise_offset | |
seed | float | 0 | random seed | |
warp_amplitude | float | 0 | 0.. | 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_size | float | 10 | 0.001.. | domain warp: size of the bends (metres); frequency = 1 / warp_element_size |
warp_frequency | float | 0 | 0.. | domain warp: bends per metre; > 0 overrides warp_element_size |
warp_octaves | int | 3 | 1..8 | domain warp: fractal octaves of the warp noise (more = wigglier bends) |
warp_seed | float | 0 | domain warp: seed of the warp noise (independent of seed) | |
contrast | float | 1 | 0.. | 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
layer | string | "height" | layer to modify | |
mode | enum | "add" | how the noise combines with the layer options: replace add subtract multiply max minaliases: combine operation method | |
noise | enum | "simplex" | base noise options: perlin simplex value worleyaliases: basis noise_type | |
fractal | enum | "fbm" | layering: fbm = rolling hills, ridged = mountain ridges, turbulence = billowy options: fbm ridged turbulence none | |
amplitude | float | 1 | noise height (metres for the height layer) aliases: amp height scale | |
element_size | float | 5 | 0.001.. | size of the largest features (metres); frequency = 1 / element_size aliases: elementsize feature_size wavelength |
frequency | float | 0 | 0.. | features per metre; > 0 overrides element_size aliases: freq |
octaves | int | 6 | 1..12 | fractal octaves (detail levels) |
roughness | float | 0.5 | 0..1 | amplitude gain per octave (higher = rougher) aliases: gain persistence |
lacunarity | float | 2.01 | 1.. | frequency gain per octave |
range | enum | "zero_centered" | zero_centered: noise in [-amplitude, amplitude]; positive: [0, amplitude] options: zero_centered positive | |
offset | vec3 | [0,0,0] | noise-space offset (scrolls the pattern; Y picks another slice) aliases: translate_noise noise_offset | |
seed | float | 0 | random seed | |
warp_amplitude | float | 0 | 0.. | 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_size | float | 10 | 0.001.. | domain warp: size of the bends (metres); frequency = 1 / warp_element_size |
warp_frequency | float | 0 | 0.. | domain warp: bends per metre; > 0 overrides warp_element_size |
warp_octaves | int | 3 | 1..8 | domain warp: fractal octaves of the warp noise (more = wigglier bends) |
warp_seed | float | 0 | domain warp: seed of the warp noise (independent of seed) | |
mask_layer | string | "" | 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
| 1 | curves | polylines (draw them flat at y = 0 for height_mode terrain) |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
width | float | 4 | 0.. | flat road width (metres) |
shoulder | float | 2 | 0.. | blend distance from the road edge back to the terrain (metres) aliases: falloff blend embankment |
bank | float | 0 | 0..45 | maximum bank angle in tight bends (degrees; full bank at a radius of 5 × width) aliases: banking superelevation |
height_mode | enum | "terrain" | terrain: follow the ground under the curve (smoothed); curve: use the curve's Y options: terrain curve | |
smooth | float | 5 | 0.. | smoothing of the road profile along the curve (metres) aliases: smoothing smooth_distance |
offset | float | 0 | raise (+) or sink (−) the road surface (metres) | |
layer | string | "height" | layer to modify | |
mask_layer | string | "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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
| 1 | stamp | polygons (plateaus, platforms, rocks) and/or curves (ridges, dykes) |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
mode | enum | "replace" | replace = set to the stamp, max = only raise, min = only lower, add/subtract = add/remove the stamp height options: replace max min add subtractaliases: combine operation method | |
layer | string | "height" | layer to modify | |
radius | float | 1 | 0.. | blend distance outside the stamp (metres) aliases: blend falloff |
offset | float | 0 | added to the stamped height (metres) | |
width | float | 1 | 0.. | curves: stamp width (metres) |
direction | enum | "down" | polygons: stamp the highest (down) or lowest (up) surface options: down up | |
level | enum | "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 meanaliases: pad flatten_to | |
mask_layer | string | "" | 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
layer | string | "height" | layer to modify | |
input_min | float | 0 | input value for t = 0 (e.g. the lowest height in metres) | |
input_max | float | 1 | input value for t = 1 | |
auto_range | bool | false | use the layer's own min/max as the input range instead (depends on the field's extent) | |
output_min | float | 0 | output for t = 0 aliases: min | |
output_max | float | 1 | output for t = 1 aliases: max | |
ramp | ramp | [[0,0],[1,1]] | shape: [[t, value], ...] with t and value 0..1 | |
clamp | bool | true | clamp t to 0..1 before the ramp | |
mask_layer | string | "" | 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
resolution | float | 0 | 0.. | new cell size (metres); 0 = use samples or factor aliases: cell_size grid_spacing |
samples | ivec2 | [0,0] | 0..16785409 | new sample counts [nx, nz]; nx > 1 overrides resolution (nz 0 = keep the extent) |
factor | float | 1 | 0.01..16 | multiply 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
density | float | 0.5 | 0.. | points per square metre at mask 1 aliases: density_per_m2 |
count | int | 0 | 0..2000000 | exact number of points; > 0 overrides density aliases: npts points |
mask_layer | string | "mask" | density layer (0..1); "" = uniform everywhere aliases: mask density_layer | |
relax | bool | true | even (blue-noise) spacing | |
seed | float | 0 | random seed | |
keep_heightfield | bool | false | also keep the heightfield (default: points only) | |
align | enum | "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 slopealiases: orientation upright | |
min_distance | float | 0 | 0.. | 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 |
sample | enum | "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_trianglesaliases: 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
layer | string | "height" | layer to modify | |
levels | enum | "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 layeraliases: mode | |
step_height | float | 1 | 0.. | levels step: terrace height (metres) aliases: height spacing |
base | float | 0 | levels step: the height of one terrace level (metres); the others are base ± n × step_height | |
steps | int | 8 | 1..1000 | levels range and layer: number of terraces aliases: count |
range_min | float | 0 | levels range: height of the lowest terrace level (metres) | |
range_max | float | 10 | levels range: height the steps reach (metres) | |
rounding | float | 0.2 | 0..1 | riser width as a fraction of the step: 0 = sharp, 1 = smooth aliases: smoothness sharpness |
mask_layer | string | "" | 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with heightfields |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
step | int | 1 | 1..64 | use every Nth sample (2 = a quarter of the quads) aliases: decimate lod |
layers | bool | true | copy every layer to a point float attribute | |
normals | bool | true | point N from the field gradient | |
uv | bool | true | point 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 | |
color | enum | "none" | point Cd from the layers options: none mask height terrain | |
keep_heightfield | bool | false | keep 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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with heightfields |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
depth | float | 1 | 0.. | 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 |
closed | bool | true | cap the sides and the bottom (a finite block); false = an infinite slab clipped by the bounds | |
keep_heightfield | bool | false | keep the heightfield volume | |
name | string | "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
| # | name | description |
|---|---|---|
| 0 | heightfield | geometry with a heightfield |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
translate | vec3 | [0,0,0] | move: X/Z shift the grid, Y raises the height layer aliases: t move offset | |
scale | float | 1 | 0.0001.. | uniform X/Z scale of the grid (cell size × scale) aliases: s uniform_scale |
height_scale | float | 1 | multiply heights about pivot Y aliases: scale_y vertical_scale | |
rotate | float | 0 | rotation about Y in degrees (snapped to 90° steps) aliases: r rot | |
pivot | vec3 | [0,0,0] | pivot for scale and rotation (X/Z ignored when pivot_at_center) | |
pivot_at_center | bool | false | use 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"
}