Divooka Reference

Texture Height Maps

8 nodes

On this page 8

Ambient Occlusion

Function

Ambient occlusion from a height: how much of the sky each point sees, dark in crevices and the mortar between bricks, white on open tops. Measured by looking for the horizon in several directions around each point.

Signature
AmbientOcclusion -> Texture
    height: Texture
    depth: Number
    radius: Number
    directions: Integer
Texture AmbientOcclusion(
    Texture height,
    double depth = 0.04,
    double radius = 0.05,
    int directions = 12)

Parameters

nametypedefaultdescription
heightTexture—The height, 0 to 1.
depthNumber0.04How deep the surface is: a height of 1 rises this share of the texture's width.
radiusNumber0.05How far around each point is looked at, as a share of the texture's width.
directionsInteger12How many directions are looked in; more is smoother.

Returns

resultTexture
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Texture Height Maps
Package
Image Processing

Curvature

Function

Curvature from a height: bright on ridges and edges (convex), dark in grooves and dents (concave), middle grey where flat. The map edge wear and dirt are made from.

Signature
Curvature -> Texture
    height: Texture
    radius: Number
    intensity: Number
Texture Curvature(
    Texture height,
    double radius = 2,
    double intensity = 1)

Parameters

nametypedefaultdescription
heightTexture—The height, 0 to 1.
radiusNumber2The size of the features measured, in pixels of a 1024-pixel texture: small catches sharp edges, large catches broad forms.
intensityNumber1How far from grey a given curvature goes.

Returns

resultTexture
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Texture Height Maps
Package
Image Processing

Curvature From Normal

Function

Curvature from a normal map: bright where the surface turns away (edges), dark where it turns in (grooves). For a normal map baked from a model, where no height exists.

Signature
CurvatureFromNormal -> Texture
    normal: Texture
    intensity: Number
Texture CurvatureFromNormal(
    Texture normal,
    double intensity = 1)

Parameters

nametypedefaultdescription
normalTexture—The normal map, OpenGL convention.
intensityNumber1How far from grey a given curvature goes.

Returns

resultTexture
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Texture Height Maps
Package
Image Processing

Flat Normal

Function

A flat normal map: every point facing straight out.

Signature
FlatNormal(size: Integer) -> Texture
Texture FlatNormal(int size = 1024)

Parameters

nametypedefaultdescription
sizeInteger1024Width and height in pixels.

Returns

resultTexture
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Texture Height Maps
Package
Image Processing

Flip Normal Green

Function

Converts a normal map between OpenGL's convention (green up: glTF, Blender, Unity, Godot) and DirectX's (green down: Unreal), by inverting its green channel.

Signature
FlipNormalGreen(normal: Texture) -> Texture
Texture FlipNormalGreen(Texture normal)

Parameters

nametypedefaultdescription
normalTexture—The normal map.

Returns

resultTexture
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Texture Height Maps
Package
Image Processing

Normal Blend

Function

Lays a detail normal map over a base one so both read - the detail's bumps follow the base's slopes - rather than averaging them flat (reoriented normal mapping).

Signature
NormalBlend -> Texture
    baseNormal: Texture
    detailNormal: Texture
    detailStrength: Number
Texture NormalBlend(
    Texture baseNormal,
    Texture detailNormal,
    double detailStrength = 1)

Parameters

nametypedefaultdescription
baseNormalTexture—The large forms.
detailNormalTexture—The fine detail.
detailStrengthNumber1How strong the detail is, 0 to 1 and beyond.

Returns

resultTexture
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Texture Height Maps
Package
Image Processing

Normal From Height

Function

The normal map of a height: which way each point of the surface faces, packed into red (across), green (up) and blue (out). OpenGL's convention (green up) is glTF's and Blender's; DirectX's (green down) is Unreal's.

Signature
NormalFromHeight -> Texture
    height: Texture
    intensity: Number
    directX: Truth
Texture NormalFromHeight(
    Texture height,
    double intensity = 4,
    bool directX = false)

Parameters

nametypedefaultdescription
heightTexture—The height, 0 to 1.
intensityNumber4How steep the surface is for a given change of height; doubling it doubles the slopes.
directXTruthFalseUse DirectX's convention, green pointing down.

Returns

resultTexture
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Texture Height Maps
Package
Image Processing

Shade

Function

A height lit from one side, as a greyscale: the quickest way to see a height's form, and an emboss effect.

Signature
Shade -> Texture
    height: Texture
    lightAngle: Number
    lightElevation: Number
    intensity: Number
Texture Shade(
    Texture height,
    double lightAngle = 225,
    double lightElevation = 40,
    double intensity = 4)

Parameters

nametypedefaultdescription
heightTexture—The height, 0 to 1.
lightAngleNumber225Where the light comes from, in degrees round: 0 from the right, 90 from below, 225 from the upper left.
lightElevationNumber40How high the light is, in degrees above the surface.
intensityNumber4How steep the surface is for a given change of height.

Returns

resultTexture
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Texture Height Maps
Package
Image Processing