Terrain node
hf_mask_by_feature
Build a 0..1 mask layer from terrain features: slope angle, height band, curvature (ridges or gullies) and facing direction. Enabled criteria are multiplied together. Examples: rock = slope >35deg; snow = height > 0.7 x max with slope_max 40; grass = slope_max 25 (use_slope with slope_min 0, slope_max 25); sunny side = use_direction. Writes the chosen 'layer'.
Inputs
- 0heightfield
Parameters 20
layerstringMask layer to write (e.g. 'mask', 'rock', 'snow', 'grass', 'forest').
use_slopetoggleSelect by slope angle.
slope_minfloatSlopes above this (degrees) are selected.
slope_maxfloatSlopes above this are deselected (90 = no limit).
slope_softfloatSoftness of the slope edges in degrees.
use_heighttoggleSelect by height.
height_minfloatHeights above this are selected (world units).
height_maxfloatHeights above this are deselected.
height_softfloatSoftness of the height edges (world units).
use_curvaturetoggleSelect by curvature (ridges vs gullies).
curvaturemenuconvex = ridges/peaks, concave = valleys/gullies.
curvature_scalefloatScale of curvature detection in cells (bigger = broader features).
curvature_gainfloatContrast of the curvature mask.
use_directiontoggleSelect by the direction a slope faces (aspect).
directionfloatFacing direction in degrees: 0 = +X, 90 = +Z, 180 = -X, 270 = -Z.
spreadfloatAngular half-width of the direction selection.
blurfloatBlur of the result in world units.
ramprampRemap curve applied to the final 0..1 mask.
inverttoggleInvert the mask.
combinemenuHow the result merges with an existing layer.
Use it
Add it from the node menu (right-click empty graph space or Tab, then type hf_mask_by_feature), ask the AI for it by name, or add it with a graph op from the API or MCP:
{"op":"add","type":"hf_mask_by_feature","name":"my_hf_mask_by_feature","params":{},"inputs":["src"]}Any parameter can also be an expression such as "=sin(F*0.1)". See Parameters & expressions.