Divooka Reference

Terrain Surfaces

14 nodes

On this page 14

Terrain Analysis Maps

Function

Maps from analysis that the natural style lays a palette by, each 0..1 over the terrain: where erosion left debris (fallen rock), where it laid sediment, where it wore the surface, where water stands and where the ground beside it is damp. Any may be left out.

Signature
AnalysisMaps -> Terrain Analysis Maps
    debris: Scalar Field
    deposition: Scalar Field
    wear: Scalar Field
    water: Scalar Field
    wetBanks: Scalar Field
TerrainAnalysisMaps AnalysisMaps(
    ScalarField2D debris,
    ScalarField2D deposition,
    ScalarField2D wear,
    ScalarField2D water,
    ScalarField2D wetBanks)

Parameters

nametypedefaultdescription
debrisScalar Field—Rock fallen and left by erosion: talus.
depositionScalar Field—Sediment water laid down.
wearScalar Field—Where water and weather wore the surface.
waterScalar Field—Where water stands, 1 on water.
wetBanksScalar Field—The damp ground above the waterline.

Returns

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

Badlands Terrain Palette

Function

Badlands: prairie on the tablelands and the gentle ground, bare buff clay on the rises, banded walls of clay and soft sandstone where the land falls away, the same clay washed down their feet, and cracked clay on the flats of the drainages.

Signature
BadlandsPalette() -> Terrain Palette
TerrainPalette BadlandsPalette()

Returns

PaletteTerrain Palette

Remarks

Badland walls are lower and less steep than a canyon's: lay this with a cliff slope in the low thirties of degrees (Natural Texturing Settings), as Make Landscape's Badlands style does, or much of the banding is laid as ground.

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

Bake Terrain Surface

Function

Lays a palette over a terrain and bakes it into colour, normal, roughness and height maps.

Signature
BakeTerrainSurface -> Baked Terrain Surface
    terrain: Scalar Field
    palette: Terrain Palette
    bakeSize: Integer
    style: Terrain Texture Style
    water: Scalar Field
    analysis: Terrain Analysis Maps
    settings: Natural Terrain Settings
BakedTerrainSurface BakeTerrainSurface(
    ScalarField2D terrain,
    TerrainPalette palette,
    int bakeSize = 2048,
    TerrainTextureStyle style = TerrainTextureStyle.Natural,
    ScalarField2D water,
    TerrainAnalysisMaps analysis,
    NaturalTerrainSettings settings)

Parameters

nametypedefaultdescription
terrainScalar Field—Heights in metres; its PhysicalScale, metres per cell, decides how large the materials are laid.
paletteTerrain Palette—The materials by role; the default palette when omitted.
bakeSizeInteger2048Pixels across the result; the depth follows the terrain's shape.
styleTerrain Texture StyleNaturalHow the palette is laid: by the land's shape, by height bands, or in flat colours.
waterScalar Field—The water surface in metres, a number on water and NaN on dry ground, as Terrain Water's Fill gives it in Surface Elevation: the shore and the bed are laid along and under it, and the images show the water over them. Give the same to the viewer, which lays the water level. Without it there is no water.
analysisTerrain Analysis Maps—Maps from analysis that the natural style lays by: an erosion's debris, deposition and wear, and wet banks. Without them it reads the land's shape alone.
settingsNatural Terrain Settings—Where the natural style's roles go: the slope a cliff starts at, how far fallen rock reaches, the snow line and the rest. The defaults suit any landscape, with snow on the top fifth of its relief when the palette has snow.

Returns

SurfaceBaked Terrain Surface
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Surfaces
Package
Procedural Generation

Terrain Palette

Function

A palette: one material for each role a landscape's surface has. Only ground is required; a role left empty is not laid. Each material is laid at its own size.

Signature
CreatePalette -> Terrain Palette
    ground: Terrain Surface Material
    groundVariation: Terrain Surface Material
    exposedTops: Terrain Surface Material
    cliff: Terrain Surface Material
    talus: Terrain Surface Material
    sediment: Terrain Surface Material
    shore: Terrain Surface Material
    wetBank: Terrain Surface Material
    snow: Terrain Surface Material
TerrainPalette CreatePalette(
    TerrainSurfaceMaterial ground,
    TerrainSurfaceMaterial groundVariation,
    TerrainSurfaceMaterial exposedTops,
    TerrainSurfaceMaterial cliff,
    TerrainSurfaceMaterial talus,
    TerrainSurfaceMaterial sediment,
    TerrainSurfaceMaterial shore,
    TerrainSurfaceMaterial wetBank,
    TerrainSurfaceMaterial snow)

Parameters

nametypedefaultdescription
groundTerrain Surface Material—Everywhere, beneath everything.
groundVariationTerrain Surface Material—A second ground in large patches, so the ground is not one colour throughout.
exposedTopsTerrain Surface Material—Ridges and rises, paler and barer; with height bands, the mountain band.
cliffTerrain Surface Material—Faces too steep to hold soil, projected from the side so they do not stretch.
talusTerrain Surface Material—Rock fallen from the faces above, at their feet.
sedimentTerrain Surface Material—Fine material in hollows and on flats.
shoreTerrain Surface Material—The water's edge; with height bands, the beach.
wetBankTerrain Surface Material—Damp ground and moss where water gathers.
snowTerrain Surface Material—Above the snow line.

Returns

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

Default Terrain Palette

Function

A temperate mountain palette from the library: sparse grass with patches of grassy ground, bare rock on the tops, a rock face, fallen rock, gravel in the hollows, moss where it is wet, a sandy shore and snow, each tinted to sit with the others.

Signature
DefaultPalette() -> Terrain Palette
TerrainPalette DefaultPalette()

Returns

PaletteTerrain Palette

Remarks

The materials and their tints are the terrain studio's alpine palette, which was tuned against renders of real mountains; the shore is sand rather than the alpine palette's gravel, so that height bands draw a beach.

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

Desert Terrain Palette

Function

Canyon country from the library: gravelly sand with patches of denser sand, pale bleached tops, a pink-brown sandstone face, grey-brown fallen rock, sand in the hollows, green where water stands and river stones at its edge. No snow.

Signature
DesertPalette() -> Terrain Palette
TerrainPalette DesertPalette()

Returns

PaletteTerrain Palette

Remarks

The terrain studio's desert palette, which dressed the Goosenecks of the San Juan and Horseshoe Bend from their lidar; its tints pull the sands toward the sandstone's pink-brown.

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

Dune Terrain Palette

Function

Gypsum dunes, as at White Sands: near-white sand on the dunes, a pale crust cracked into plates on the flats between them, and scrub where water gathers. No rock and no snow.

Signature
DunePalette() -> Terrain Palette
TerrainPalette DunePalette()

Returns

PaletteTerrain Palette

Remarks

Gypsum sand is far paler than quartz: the dunes reflect nearly as much light as old snow, so their ground is the library's snow, warmed, with the fine grain of its sand in patches over it; slip faces stand at about 33 degrees, below the slope at which the stack lays cliffs, so dunes take none.

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

Lava Terrain Palette

Function

Fresh lava, as on Kīlauea: grey-black basalt, smooth flows and rough rubble, a little grass and fern where it has had time to weather.

Signature
LavaPalette() -> Terrain Palette
TerrainPalette LavaPalette()

Returns

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

Library Material

Function

A material from Divooka's library (Poly Haven's CC0 sets): one of DivookaTextureAssets.AvailableMaterials, at its true size.

Signature
LibraryMaterial(ID: Text) -> Terrain Surface Material
TerrainSurfaceMaterial LibraryMaterial(string id)

Parameters

nametypedefaultdescription
IDText—The set, such as forest_ground_01 or rock_face_03.

Returns

MaterialTerrain Surface Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Surfaces
Package
Procedural Generation

Load Texture Set

Function

A material from a folder of maps named as Poly Haven names them: {id}_diff_{resolution}, _nor_gl_, _rough_, _disp_ and _ao_, as PNG or JPEG. A map that is not there is left flat.

Signature
LoadTextureSet -> Terrain Surface Material
    folder: Text
    ID: Text
    resolution: Text
    sizeMetres: Number
TerrainSurfaceMaterial LoadTextureSet(
    string folder,
    string id,
    string resolution = "1k",
    double sizeMetres = 2)

Parameters

nametypedefaultdescription
folderText—The folder holding the maps.
IDText—The set's name, the part of each file name before the map's.
resolutionText1kThe resolution in the file names: 1k, 2k, 4k.
sizeMetresNumber2The width in metres of the ground one copy of the texture shows; Poly Haven gives it on each set's page.

Returns

MaterialTerrain Surface Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Surfaces
Package
Procedural Generation

Natural Texturing Settings

Function

Settings for the natural style of Bake Terrain Surface and for Natural Terrain Stack: where each role of a palette is laid, in metres and degrees. The defaults suit any landscape at any resolution.

Signature
NaturalTexturingSettings -> Natural Terrain Settings
    cliffSlopeDegrees: Number
    cliffSoftnessDegrees: Number
    talusReachMetres: Number
    exposedTopRadiusMetres: Number
    wetBankWidthMetres: Number
    shoreWidthMetres: Number
    snowLineMetres: Number
    variationMetres: Number
    slopeScaleMetres: Number
    cliffsAtRender: Truth
    seed: Integer
NaturalTerrainSettings NaturalTexturingSettings(
    double cliffSlopeDegrees = 38,
    double cliffSoftnessDegrees = 6,
    double talusReachMetres = 60,
    double exposedTopRadiusMetres = 150,
    double wetBankWidthMetres = 12,
    double shoreWidthMetres = 4,
    double snowLineMetres = double.NaN,
    double variationMetres = 350,
    double slopeScaleMetres = 4,
    bool cliffsAtRender = true,
    int seed = 1337)

Parameters

nametypedefaultdescription
cliffSlopeDegreesNumber38The slope at which ground gives way to cliff.
cliffSoftnessDegreesNumber6How many degrees the change from ground to cliff takes.
talusReachMetresNumber60How far below a cliff fallen rock reaches.
exposedTopRadiusMetresNumber150The size of the rises that count as exposed tops: a ridge or a plateau, not every rim.
wetBankWidthMetresNumber12Width of the damp band along water.
shoreWidthMetresNumber4Width of the washed stones at the water's edge.
snowLineMetresNumberNaNElevation above which snow lies; NaN for the top fifth of the terrain's relief when the palette has snow. Higher than the terrain for none.
variationMetresNumber350Size of the large patches of ground variation.
slopeScaleMetresNumber4The scale slope is judged at: the terrain is smoothed over this first, so cliffs are found as landforms and not as the noise of fine data.
cliffsAtRenderTruthTrueLeave cliffs to a renderer that lays them from the side at full detail, as Render Terrain does; the images show them baked in either way.
seedInteger1337The seed of the patterns that break up each role.

Returns

SettingsNatural Terrain Settings
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Surfaces
Package
Procedural Generation

Rainforest Terrain Palette

Function

Temperate rainforest: leaf litter and forest floor under the trees, moss on the rocks and the rises, mossy grey rock faces, river gravel and stones along the water.

Signature
RainforestPalette() -> Terrain Palette
TerrainPalette RainforestPalette()

Returns

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

Swamp Terrain Palette

Function

Swamp: mud under fallen leaves, grass on the drier rises, bare wet mud and silt where the water comes and goes. No rock: a swamp is flat.

Signature
SwampPalette() -> Terrain Palette
TerrainPalette SwampPalette()

Returns

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

Terrain Material

Function

A material from images: any of colour, normal (OpenGL convention, green up), roughness, height and ambient occlusion. A map left out is flat: mid-grey height, roughness 0.8, no occlusion.

Signature
TerrainMaterial -> Terrain Surface Material
    albedo: Pixel Image
    normal: Pixel Image
    roughness: Pixel Image
    height: Pixel Image
    ambientOcclusion: Pixel Image
    sizeMetres: Number
    name: Text
TerrainSurfaceMaterial TerrainMaterial(
    PixelImage albedo,
    PixelImage normal,
    PixelImage roughness,
    PixelImage height,
    PixelImage ambientOcclusion,
    double sizeMetres = 2,
    string name = "Material")

Parameters

nametypedefaultdescription
albedoPixel Image—Colour, sRGB.
normalPixel Image—Tangent-space normals, green up (Poly Haven's nor_gl, Blender); flip the green channel of a DirectX (nor_dx, Unreal) map first.
roughnessPixel Image—Roughness, white rough.
heightPixel Image—Height or displacement, white high; it decides which material shows where two meet.
ambientOcclusionPixel Image—Ambient occlusion, white open.
sizeMetresNumber2The width in metres of the ground one copy of the texture shows.
nameTextMaterialA name for the material.

Returns

MaterialTerrain Surface Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Surfaces
Package
Procedural Generation