Divooka Reference

Landscapes

8 nodes

On this page 8

Assemble Landscape

Function

A landscape from parts made by other nodes: a terrain, its baked surface and its water.

Signature
AssembleLandscape -> Landscape
    terrain: Scalar Field
    surface: Baked Terrain Surface
    water: Scalar Field
    waterLook: Water Look Kind
Landscape AssembleLandscape(
    ScalarField2D terrain,
    BakedTerrainSurface surface,
    ScalarField2D water,
    WaterLookKind waterLook = WaterLookKind.Clear)

Parameters

nametypedefaultdescription
terrainScalar Field—Heights in metres as they are to be drawn.
surfaceBaked Terrain Surface—Bake Terrain Surface's or Bake Layer Stack's result for this terrain.
waterScalar Field—The water's surface in metres, NaN on dry ground.
waterLookWater Look KindClearHow the water looks.

Returns

LandscapeLandscape
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Landscapes
Package
Procedural Generation

Erosion Analysis Maps

Function

The maps an erosion and a water fill leave that the natural style lays a palette by - fallen rock, sediment, wear, water and wet banks - each made a 0..1 mask as the terrain studio made them.

Signature
ErosionAnalysisMaps -> Terrain Analysis Maps
    erosion: Terrain Erosion Result
    water: Terrain Water Result
TerrainAnalysisMaps ErosionAnalysisMaps(
    TerrainErosionResult erosion,
    TerrainWaterResult water)

Parameters

nametypedefaultdescription
erosionTerrain Erosion Result—Erode Terrain's result.
waterTerrain Water Result—Terrain Water's Fill result.

Returns

AnalysisTerrain Analysis Maps
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Landscapes
Package
Procedural Generation

Landscape Palette

Function

A style's materials.

Signature
LandscapePalette(style: Landscape Style) -> Terrain Palette
TerrainPalette LandscapePalette(LandscapeStyle style = LandscapeStyle.Alpine)

Parameters

nametypedefaultdescription
styleLandscape StyleAlpineThe kind of landscape.

Returns

PaletteTerrain Palette
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Landscapes
Package
Procedural Generation

Landscape Species

Function

A style's species - what Make Landscape places - to change and place with Populate Landscape or Populate Terrain.

Signature
LandscapeSpecies -> Population Species Array
    style: Landscape Style
    terrain: Scalar Field
PopulationSpecies[] LandscapeSpecies(
    LandscapeStyle style,
    ScalarField2D terrain)

Parameters

nametypedefaultdescription
styleLandscape Style—The kind of landscape.
terrainScalar Field—The terrain they are for: the treeline and snow line follow its relief.

Returns

SpeciesPopulation Species Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Landscapes
Package
Procedural Generation

Landscape Water

Function

Water filled as a style's climate keeps it: each hollow to the height at which it would spill, where it drains enough of the land around it to stay full - three hundred times its own area in a desert, five in the mountains - and the flat water a survey records. A terrain from noise has closed hollows everywhere, and filled without a climate every one of them is a lake.

Signature
LandscapeWater -> Terrain Water Result
    terrain: Scalar Field
    style: Landscape Style
    riverThrough: Truth
TerrainWaterResult LandscapeWater(
    ScalarField2D terrain,
    LandscapeStyle style = LandscapeStyle.Alpine,
    bool riverThrough = false)

Parameters

nametypedefaultdescription
terrainScalar Field—Heights in metres, with their metres per cell.
styleLandscape StyleAlpineThe kind of landscape, whose climate decides how much water stays.
riverThroughTruthFalseRun a river in and out through the terrain's two deepest notches in its border, along the valley floor between them.

Returns

WaterTerrain Water Result
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Landscapes
Package
Procedural Generation

Make Landscape

Function

A finished landscape from a heightfield in one step: worn by erosion, filled with water, dressed in a style's materials and baked, ready for Render Landscape or the mesh viewer.

Signature
MakeLandscape -> Landscape
    terrain: Scalar Field
    style: Landscape Style
    bakeSize: Integer
    erosion: Truth
    water: Truth
    riverThrough: Truth
    waterLook: Water Look Kind
    population: Truth
Landscape MakeLandscape(
    ScalarField2D terrain,
    LandscapeStyle style = LandscapeStyle.Alpine,
    int bakeSize = 2048,
    bool erosion = true,
    bool water = true,
    bool riverThrough = false,
    WaterLookKind waterLook = WaterLookKind.Automatic,
    bool population = true)

Parameters

nametypedefaultdescription
terrainScalar Field—Heights in metres, with their metres per cell: from Fetch Real Terrain, Load Heightmap or a generator.
styleLandscape StyleAlpineThe kind of landscape.
bakeSizeInteger2048Pixels across the surface maps.
erosionTruthTrueWear the terrain by water and gravity first: its maps lay the fallen rock and the sediment. Dunes and lava are never eroded: wind made the one, and the other is too young.
waterTruthTrueFill the lakes the land holds.
riverThroughTruthFalseRun a river in and out through the terrain's two deepest notches in its border, along the valley floor between them, as a river crosses a map cut from a larger land.
waterLookWater Look KindAutomaticHow the water looks; Automatic takes the style's.
populationTruthTruePlace the style's trees, shrubs and rocks: forest below the treeline, scrub on the desert flats, rock fallen below the walls.

Returns

LandscapeLandscape

Remarks

A 3 km terrain at a metre a cell takes a minute or two: most of it erosion and the bake. Turn erosion off for a terrain already eroded, and bake smaller to try things out.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Landscapes
Package
Procedural Generation

Populate Landscape

Function

The same landscape with things placed on it: the species given, or its style's when none are - forest below the treeline, scrub on the desert flats, rock fallen below the walls. Whatever it had before is replaced.

Signature
PopulateLandscape -> Landscape
    landscape: Landscape
    species: Population Species Array
    seed: Integer
Landscape PopulateLandscape(
    Landscape landscape,
    PopulationSpecies[] species,
    int seed = 1337)

Parameters

nametypedefaultdescription
landscapeLandscape—The landscape.
speciesPopulation Species Array—What to place, the first placed first; the style's own when left out.
seedInteger1337Where the random draws start: another seed, another wood.

Returns

LandscapeLandscape
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Landscapes
Package
Procedural Generation

Set Landscape Sun

Function

The same landscape lit by another sun.

Signature
SetSun -> Landscape
    landscape: Landscape
    bearing: Number
    altitude: Number
Landscape SetSun(
    Landscape landscape,
    double bearing = 247,
    double altitude = 28)

Parameters

nametypedefaultdescription
landscapeLandscape—The landscape.
bearingNumber247The sun's compass bearing, degrees clockwise from north.
altitudeNumber28The sun's height above the horizon, degrees.

Returns

LandscapeLandscape
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Landscapes
Package
Procedural Generation