Divooka Reference

Terrain Shaping

13 nodes

On this page 13

Apply Recipe

Function

The world with a terrain recipe's continents painted into a new layer: Fantasy Planet Painter's recipe language, the one its Terrain recipe dialog runs, of hills, ranges, troughs, straits and smoothing steps.

Signature
ApplyRecipe -> World
    world: World
    recipe: Text
    seed: Text
    density: Integer
    addDetail: Truth
World ApplyRecipe(
    World world,
    string recipe,
    string seed = "fantasy",
    int density = 10000,
    bool addDetail = true)

Parameters

nametypedefaultdescription
worldWorld—The world.
recipeText—The recipe's steps, one to a line, such as Recipe Template gives.
seedTextfantasyWhich variation: the same seed always draws the same terrain.
densityInteger10000How many points the recipe is drawn on, 100 to 100,000: more for finer coasts.
addDetailTruthTrueWhether the planet adds its procedural detail to the recipe's heights; off, they are drawn as they are.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Shaping
Package
Fantasy Planet Painter

Flip

Function

The world with one layer flipped east to west or north to south.

Signature
Flip(world: World, eastWest: Truth, layer: Integer) -> World
World Flip(World world, bool eastWest = true, int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
eastWestTruthTrueFlip across the central meridian; off, across the equator.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Shaping
Package
Fantasy Planet Painter

Invert

Function

The world with painted cells' heights mirrored about the sea: mountains become trenches and seas become land.

Signature
Invert -> World
    world: World
    selection: Height Selection
    layer: Integer
World Invert(
    World world,
    HeightSelection selection = HeightSelection.All,
    int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
selectionHeight SelectionAllWhich cells: land, water or both.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Shaping
Package
Fantasy Planet Painter

Normalize

Function

The world with painted cells' heights stretched to run from the sea to one summit.

Signature
Normalize -> World
    world: World
    summit: Number
    selection: Height Selection
    keepCoast: Truth
    layer: Integer
World Normalize(
    World world,
    double summit = 5000,
    HeightSelection selection = HeightSelection.Land,
    bool keepCoast = true,
    int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
summitNumber5000The highest cell's height above the sea, in metres.
selectionHeight SelectionLandWhich cells: land, water or both.
keepCoastTruthTrueKeep land above the sea and water below it.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Shaping
Package
Fantasy Planet Painter

Power Curve

Function

The world with painted cells' heights bent by a power curve: above 1 the lowlands flatten and the peaks stand out, below 1 the reverse.

Signature
PowerCurve -> World
    world: World
    exponent: Number
    selection: Height Selection
    keepCoast: Truth
    layer: Integer
World PowerCurve(
    World world,
    double exponent = 1.5,
    HeightSelection selection = HeightSelection.Land,
    bool keepCoast = true,
    int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
exponentNumber1.5The curve's power.
selectionHeight SelectionLandWhich cells: land, water or both.
keepCoastTruthTrueKeep land above the sea and water below it.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Shaping
Package
Fantasy Planet Painter

Raise

Function

The world with painted cells raised or lowered by some metres.

Signature
Raise -> World
    world: World
    metres: Number
    selection: Height Selection
    keepCoast: Truth
    layer: Integer
World Raise(
    World world,
    double metres = 500,
    HeightSelection selection = HeightSelection.Land,
    bool keepCoast = true,
    int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
metresNumber500How far to raise, negative to lower.
selectionHeight SelectionLandWhich cells: land, water or both.
keepCoastTruthTrueKeep land above the sea and water below it.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Shaping
Package
Fantasy Planet Painter

Recipe Template

Function

One of Fantasy Planet Painter's recipe templates, to apply as it is or to edit.

Signature
RecipeTemplate(name: Text) -> Text
string RecipeTemplate(string name = "Volcano")

Parameters

nametypedefaultdescription
nameTextVolcanoThe template's name, as Recipe Templates lists it.

Returns

RecipeText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Shaping
Package
Fantasy Planet Painter

Recipe Templates

Function

The names of the recipe templates Fantasy Planet Painter comes with.

Signature
RecipeTemplates() -> Text Array
string[] RecipeTemplates()

Returns

NamesText Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Shaping
Package
Fantasy Planet Painter

Scale Heights

Function

The world with painted cells' heights above or below the sea multiplied: 2 doubles mountains and deepens seas.

Signature
ScaleHeights -> World
    world: World
    factor: Number
    selection: Height Selection
    keepCoast: Truth
    layer: Integer
World ScaleHeights(
    World world,
    double factor = 1.5,
    HeightSelection selection = HeightSelection.Land,
    bool keepCoast = true,
    int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
factorNumber1.5What heights are multiplied by.
selectionHeight SelectionLandWhich cells: land, water or both.
keepCoastTruthTrueKeep land above the sea and water below it.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Shaping
Package
Fantasy Planet Painter

Set Height

Function

The world with painted cells set to one height above the sea.

Signature
SetHeight -> World
    world: World
    height: Number
    selection: Height Selection
    keepCoast: Truth
    layer: Integer
World SetHeight(
    World world,
    double height,
    HeightSelection selection = HeightSelection.Land,
    bool keepCoast = true,
    int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
heightNumber—Metres above the sea, negative below it.
selectionHeight SelectionLandWhich cells: land, water or both.
keepCoastTruthTrueKeep land above the sea and water below it, so the coast does not move.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Shaping
Package
Fantasy Planet Painter

Shift

Function

The world with one layer moved across the grid, wrapping round the globe.

Signature
Shift -> World
    world: World
    east: Integer
    north: Integer
    layer: Integer
World Shift(World world, int east, int north = 0, int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
eastInteger—Cells to move east, negative for west.
northInteger0Cells to move north, negative for south.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Shaping
Package
Fantasy Planet Painter

Smooth

Function

The world with painted cells smoothed toward their neighbours.

Signature
Smooth -> World
    world: World
    amount: Number
    selection: Height Selection
    keepCoast: Truth
    layer: Integer
World Smooth(
    World world,
    double amount = 0.5,
    HeightSelection selection = HeightSelection.All,
    bool keepCoast = true,
    int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
amountNumber0.5How far toward the neighbours' mean, 0 to 1.
selectionHeight SelectionAllWhich cells: land, water or both.
keepCoastTruthTrueKeep land above the sea and water below it.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Shaping
Package
Fantasy Planet Painter

Terrace

Function

The world with painted cells' heights stepped into terraces.

Signature
Terrace -> World
    world: World
    step: Number
    selection: Height Selection
    keepCoast: Truth
    layer: Integer
World Terrace(
    World world,
    double step = 400,
    HeightSelection selection = HeightSelection.Land,
    bool keepCoast = false,
    int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
stepNumber400Each terrace's height, in metres, at least 1.
selectionHeight SelectionLandWhich cells: land, water or both.
keepCoastTruthFalseKeep land above the sea and water below it.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Terrain Shaping
Package
Fantasy Planet Painter