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

Parameters 20

layerstring
Default mask

Mask layer to write (e.g. 'mask', 'rock', 'snow', 'grass', 'forest').

use_slopetoggle
Default on

Select by slope angle.

slope_minfloat
Default 30Range 0 to 90

Slopes above this (degrees) are selected.

slope_maxfloat
Default 90Range 0 to 90

Slopes above this are deselected (90 = no limit).

slope_softfloat
Default 8Range 0 to …

Softness of the slope edges in degrees.

use_heighttoggle
Default off

Select by height.

height_minfloat
Default 100

Heights above this are selected (world units).

height_maxfloat
Default 100000

Heights above this are deselected.

height_softfloat
Default 20Range 0 to …

Softness of the height edges (world units).

use_curvaturetoggle
Default off

Select by curvature (ridges vs gullies).

curvaturemenu
Default convexOptions convex concave

convex = ridges/peaks, concave = valleys/gullies.

curvature_scalefloat
Default 4Range 0.01 to …

Scale of curvature detection in cells (bigger = broader features).

curvature_gainfloat
Default 1Range 0 to …

Contrast of the curvature mask.

use_directiontoggle
Default off

Select by the direction a slope faces (aspect).

directionfloat
Default 0

Facing direction in degrees: 0 = +X, 90 = +Z, 180 = -X, 270 = -Z.

spreadfloat
Default 60Range 1 to 180

Angular half-width of the direction selection.

blurfloat
Default 0Range 0 to …

Blur of the result in world units.

rampramp
Default [[0,0],[1,1]]

Remap curve applied to the final 0..1 mask.

inverttoggle
Default off

Invert the mask.

combinemenu
Default setOptions add set multiply max min subtract

How 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.