terrainSystem.package
- ..
- .metadata108 B
- README.md8.0 KB
- bilinear.procNode
- cell.procNode
- coast.procNode
- cone.procNode
- control.procNode
- dimensions.procNode
- dome.procNode
- drape.procNode
- erode.procNode
- fbm.procNode
- flatten.procNode
- footprint.procNode
- from_texture.procNode
- groundmasks.procNode
- image.procNode
- lake.procNode
- landscape.procNode
- layer.procNode
- mask.procNode
This package holds more than this page lists. See all of its files in its world.
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.
| Part | Nodes |
|---|---|
| the ground | source, from_texture; a landscape asset comes in through io.import |
| landforms | flatten, cone, ridge, ramp, terrace, strata, coast, layer, stamp, project, fbm |
| rules | mask writes a soft band over height, slope, curvature, noise, a curve, the drainage area (flow) or any layer of the raster (layer, such as deposit) into a named layer; any node's mask input names it |
| water | lake (floods the seed's basin until it is dry), sea, river |
| weather | erode: stream-power erosion over a drainage network (stream, the default), scree shed by steep faces and settled at the repose (talus), droplets walked on the device with integer sums, or thermal relaxation |
| standing on it | scatter, drape |
| out of the graph | landscape (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_fbm_damped2 and
zero_angle_warped2 for fbm, zero_angle_gradient2 for terrace and 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.
Landforms from large to small
A landscape reads as ground when it is built from its largest form down: the design (ramps, ridges and cones along the
map's high ground and valleys), one fbm a third of the map across, erode with model = "stream" for the drainage,
a damped fbm of at most a tenth of the relief on the gentler ground, strata for the rock bands of the faces,
erode with model = "talus" for the scree below them, and surfaces from mask bands over slope, height, flow
and the deposit the scree left. "Crafted ground, large to small" in the
terrain guide (guides { path = "systems/terrainSystem/documentation/terrain" }) states each step with its scale.
fbmsums its layers down to features 8 cells wide whenoctavesis 0, warps its position by a quarter offeatureSizewhenwarpis left out, and divides each layer's height by1 + detailDamping * s^2,sthe slope of the layers below it, so slopes keep to the large forms and the flats keep their fine relief (detailDamping0 sums every layer at full height).erodemodel = "stream"finds where water gathers over the whole ground and cuts a branching network of valleys into it. The terrain is averaged down to a working grid of at mostworkResolutioncells a side, eroded by theterrain_erode_streamkernel (drainage area by Jacobi passes over the ground with its depressions filled, an implicit stream-power step toward the steepest lower neighbour, the talus limit and creep), and what changed is added back to the raster by bilinear reads. It writes the drainage area, in square metres, to the layer named bywriteFlow(flow);upliftnames a layer the ground rises by over the run. A seed gives the same ground on every run.dropletandthermalwork as they did. WithkeepShape(the default) the step never raises a cell, the talus limit lays back only the slope the cutting made steeper and creep evens out only what the run changed, so a cirque, valley or lake hollow carved before the erosion keeps its depth and its faces: carve the landform, then erode it.keepShape = falsefills every closed basin to the level it spills at and lays every face back totalus; there, when a cell rises pastfillNoticemetres (3 by default), the log names the node, how many cells rose and the deepest rise.erodemodel = "talus"lets steep faces shed rock that runs down and settles at the angle of repose (talus, 34 degrees by default) into fans at their foot and on their ledges. It runs on the same working grid asstream(theterrain_erode_taluskernel: rock under a layer of debris, each pass a face turns a share ofshedmetres to debris and the debris moves toward the lower neighbours past the repose, exactly conserved), adds what changed back to the raster and writes the debris depth, in metres, towriteDeposit(deposit).cliffis the slope a face sheds all ofshedat;fansandfanSizemake some stretches of face shed more than others, so the debris gathers into separate fans instead of one even apron.stratasteps steep ground into rock bands: a near-vertical riser, then a narrow ledge sloping out from its foot (keepingledgeof the face's slope), band after bandstepmetres apart. The bands lie at irregular heights (irregularity), wander up and down across the face (jitter,jitterSize), tilt with the beds (dip,dipDirection) and break off in patches (breakup,breakupSize). They engage fromminSlopeto full atfullSlope, so flats keep their shape, and a riser spans at leastriserCellscells; a band too thin to hold a riser and a ledge on a face that steep fades back to the face, so lay faces at 45 to 70 degrees and give a steeper face thicker bands. The profile stays at or below the face, so a band cuts into the ground and never stands proud of it.maskinput = "flow"bands the base-10 logarithm of that drainage area (2 is a hundred square metres of catchment, 4 a hectare) read from the layer named bysource.altitudebands the height as a share of the raster's relief,aspectthe angle between the way the ground falls and the compassaxis,shorethe metres above the nearest water withinreachandconvexitythe ridge-or-gully measure atradiusmetres; they are measured bymodules/terrainMeasure, whichterrain.occlusionandterrain.landscapeshare.occlusionwrites the sky visibility of each cell: four azimuth slices (eight directions) of horizon over six distances doubling out toreach, integrated against the ground's normal.terracetakessharpness(1 puts each rise within two cells, below 1 the last share of each step is an eased rise) andjitter(metres the levels wander by, over features ofjitterSizemetres);maskconfines it. It quantizes the height inside a disc, flats included: paddies, quarry benches, a stepped mesa. Bedded rock on steep faces isstrata.