Divooka Reference

Terrain Renders

2 nodes

On this page 2

Render Landscape

Function

Renders a landscape through Radeon ProRender, path traced as Render Terrain is, under the clear sky and the sun the landscape was made with, and its water as the landscape says water looks there. A 3 km landscape at 1920 by 1080 and 128 samples takes a few minutes on a recent GPU.

Signature
RenderLandscape -> Pixel Image
    landscape: Landscape
    width: Integer
    height: Integer
    samples: Integer
    view: Terrain Render View
    eye: Vector3
    target: Vector3
    focalLength: Number
PixelImage RenderLandscape(
    Landscape landscape,
    int width = 1920,
    int height = 1080,
    int samples = 128,
    TerrainRenderView view = TerrainRenderView.Diorama,
    Vector3 eye,
    Vector3 target,
    double focalLength = 35)

Parameters

nametypedefaultdescription
landscapeLandscape—Make Landscape's or Assemble Landscape's result.
widthInteger1920Width of the image, pixels.
heightInteger1080Height of the image, pixels.
samplesInteger128Paths traced through each pixel. More is less grainy and slower; there is no denoiser.
viewTerrain Render ViewDioramaWhere the camera stands: one of the views fitted to the terrain, or Custom for the Eye and Target.
eyeVector3—With the Custom view, where the camera stands: metres east along the columns and south along the rows from the terrain's first cell, and elevation in metres.
targetVector3—With the Custom view, what the camera looks at, in the same terms.
focalLengthNumber35Lens, millimetres on a 36 mm wide frame.

Returns

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

Render Terrain

Function

Renders a terrain with its baked surface through Radeon ProRender, path traced: lit by a sun and by the library's sky, with water, where given, built as a level surface over the ground. A 1920 by 1080 render at 128 samples takes a minute or two on a recent GPU, and longer with water, which rays pass through.

Signature
RenderTerrain -> Pixel Image
    terrain: Scalar Field
    surface: Baked Terrain Surface
    water: Scalar Field
    width: Integer
    height: Integer
    samples: Integer
    view: Terrain Render View
    sunBearing: Number
    sunAltitude: Number
    eye: Vector3
    target: Vector3
    focalLength: Number
PixelImage RenderTerrain(
    ScalarField2D terrain,
    BakedTerrainSurface surface,
    ScalarField2D water,
    int width = 1920,
    int height = 1080,
    int samples = 128,
    TerrainRenderView view = TerrainRenderView.Diorama,
    double sunBearing = 247,
    double sunAltitude = 35,
    Vector3 eye,
    Vector3 target,
    double focalLength = 35)

Parameters

nametypedefaultdescription
terrainScalar Field—Heights in metres: the terrain the surface was baked over.
surfaceBaked Terrain Surface—Bake Terrain Surface's result; its maps are the ground, under the water too.
waterScalar Field—The water surface in metres, NaN on dry ground, as Terrain Water's Fill gives it in Surface Elevation: the same that went into the bake. Without it there is no water.
widthInteger1920Width of the image, pixels.
heightInteger1080Height of the image, pixels.
samplesInteger128Paths traced through each pixel. More is less grainy and slower; there is no denoiser.
viewTerrain Render ViewDioramaWhere the camera stands: one of the views fitted to the terrain, or Custom for the Eye and Target.
sunBearingNumber247The sun's compass bearing, degrees clockwise from north.
sunAltitudeNumber35The sun's height above the horizon, degrees.
eyeVector3—With the Custom view, where the camera stands: metres east along the columns and south along the rows from the terrain's first cell, and elevation in metres.
targetVector3—With the Custom view, what the camera looks at, in the same terms.
focalLengthNumber35Lens, millimetres on a 36 mm wide frame. The views stand further off for a longer lens, so they frame the same.

Returns

ImagePixel Image

Remarks

The camera is chosen by the view rather than by whether Eye is wired. A vector input always holds a value - an unwired one holds zero - so "not given" cannot be told from the terrain's corner at sea level, and a camera that moved there whenever the pin was left alone would be a trap.

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