Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit61a33237e0

README.md

terrain

Ground as nodes. terrain.source opens a rect of ground as a tiled raster with a height layer; every other node takes that raster, changes it and hands it on.

PartNodes
the groundsource, from_texture; a landscape asset comes in through io.import
landformsflatten, cone, ridge, ramp, terrace, coast, layer, stamp, project, fbm
rulesmask writes a soft band over height, slope, curvature, noise or a curve into a named layer; any node's mask input names it
waterlake (floods the seed's basin until it is dry), sea, river
weathererode: droplets walked on the device with integer sums, or thermal relaxation
standing on itscatter, drape
out of the graphlandscape (one element standing as the ground, the Terrain component on it), write (the same landscape saved as a named .terrainData), to_texture

The landforms are one pattern: a coverage weight (footprint), a profile of the distance (dome) or a value, and core.raster.blend. Parts the nodes share: footprint, dome, mask_weight, nearest (the nearest point of a curve), surface (height, normal and slope under a position), bilinear (a grid of samples read between the four around a point), texel and image (a layer read per texel of an image, and the image's texels), dimensions, wet (water into a region), control (normalized surface weights packed as 8-bit words).

The raster holds more ground than its rect: the tiles store the cells of a border tile past the rect and a ring of cells around the tiles, and every landform and every blend writes them at their own world positions, as the tiles of the ops did. A node that reads at an offset (cell with dx, dz, the slope and curvature of mask, thermal erode, the walk of a droplet) reads those cells, so ground beside the edge slumps, drains and washes into them. The water floods (lake fill) stay inside the rect.

A call answers a node's output directly when it has one (g.terrain.cone({ ... }) is the raster) and a record when it has several (g.terrain.footprint({ ... }).weight).

nearest holds the module that reads a curve's polyline. landscape and write name the landscape record kind (records/terrain.procRecord of this package), whose module declares the surfaces and writes the container.

The noise terrain's relief and masks are made of is the noise prelude of kernels/ (zero_angle_fbm2 and zero_angle_warped2 for fbm, zero_proc_gradient for the noise mask), called through field.call. Erosion droplets are a step Field handed to the walk kernel, their changes summed with the scatter kernel.