Terrain node

hf_import

Load a heightmap image into a new heightfield (inverse of hf_export: image column = X, row = Z). 16-bit PNGs keep full precision; 8-bit images will look terraced (blur slightly with hf_blur). Writes 'height'.

Inputs

Parameters 6

filestring
Default ""

Heightmap image path: 8 or 16-bit greyscale PNG (or any PIL image; colour is converted to luminance) or a .r16/.raw square little-endian uint16 file.

height_minfloat
Default 0

World height of black (0).

height_maxfloat
Default 300

World height of white (max value).

sizevector 2
Default [1000, 1000]

World size in X and Z the image is stretched over.

centervector 2
Default [0, 0]

World X,Z centre.

flip_rowstoggle
Default off

Flip the image vertically (if the import appears mirrored in Z).

Use it

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

{"op":"add","type":"hf_import","name":"my_hf_import","params":{},"inputs":["src"]}

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