Divooka Reference

Texture Channels

10 nodes

On this page 10

Color Variation

Function

Varies a colour texture's hue, saturation and value by a greyscale map, centred on middle grey: grey leaves the colour alone, white and black push it opposite ways. Per-brick or per-plank colour variation from a random-per-cell map.

Signature
ColorVariation -> Texture
    color: Texture
    variation: Texture
    hueRange: Number
    saturationRange: Number
    valueRange: Number
Texture ColorVariation(
    Texture color,
    Texture variation,
    double hueRange = 0.03,
    double saturationRange = 0.15,
    double valueRange = 0.15)

Parameters

nametypedefaultdescription
colorTexture—The colour texture.
variationTexture—The map driving the variation; middle grey changes nothing.
hueRangeNumber0.03The largest hue shift, as a share of the wheel.
saturationRangeNumber0.15The largest saturation change.
valueRangeNumber0.15The largest lightness change.

Returns

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

Gradient Map

Function

A greyscale texture coloured through a gradient: each value picks the ramp's colour at that position. How a height becomes a believable base colour.

Signature
GradientMap(greyscale: Texture, gradient: Color Ramp) -> Texture
Texture GradientMap(Texture greyscale, ColorRamp gradient)

Parameters

nametypedefaultdescription
greyscaleTexture—The values, 0 to 1.
gradientColor Ramp—The colours along 0 to 1.

Returns

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

Gradient Map Stops

Function

A greyscale texture coloured through a gradient written as text: each stop a position and a colour, separated by semicolons - 0 #2B1A12; 0.5 #8A4B2F; 1 #D9A273. The same stops a Color Ramp takes.

Signature
GradientMapStops(greyscale: Texture, stops: Text) -> Texture
Texture GradientMapStops(
    Texture greyscale,
    string stops = "0 #000000; 1 #FFFFFF")

Parameters

nametypedefaultdescription
greyscaleTexture—The values, 0 to 1.
stopsText0 #000000; 1 #FFFFFFThe gradient's stops, a position and a colour each.

Returns

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

Gradient Map Three Colors

Function

A greyscale texture coloured between three colours: black, middle grey and white take the dark, middle and light ones.

Signature
GradientMapThreeColors -> Texture
    greyscale: Texture
    dark: Color
    middle: Color
    light: Color
Texture GradientMapThreeColors(
    Texture greyscale,
    ColorElement dark,
    ColorElement middle,
    ColorElement light)

Parameters

nametypedefaultdescription
greyscaleTexture—The values, 0 to 1.
darkColor—The colour of 0.
middleColor—The colour of 0.5.
lightColor—The colour of 1.

Returns

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

Gradient Map Two Colors

Function

A greyscale texture coloured between two colours: black takes the dark one, white the light one.

Signature
GradientMapTwoColors -> Texture
    greyscale: Texture
    dark: Color
    light: Color
Texture GradientMapTwoColors(
    Texture greyscale,
    ColorElement dark,
    ColorElement light)

Parameters

nametypedefaultdescription
greyscaleTexture—The values, 0 to 1.
darkColor—The colour of 0.
lightColor—The colour of 1.

Returns

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

Greyscale

Function

A colour texture's brightness as greyscale: its luminance.

Signature
Greyscale(color: Texture) -> Texture
Texture Greyscale(Texture color)

Parameters

nametypedefaultdescription
colorTexture—The texture.

Returns

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

Hue Saturation Lightness

Function

Shifts the hue and scales the saturation and lightness of a colour texture, computed in the encoded colour a person sees so the sliders behave as a paint program's do.

Signature
HueSaturationLightness -> Texture
    color: Texture
    hueShift: Number
    saturation: Number
    lightness: Number
Texture HueSaturationLightness(
    Texture color,
    double hueShift = 0,
    double saturation = 1,
    double lightness = 0)

Parameters

nametypedefaultdescription
colorTexture—The colour texture.
hueShiftNumber0Turns every hue by this share of the colour wheel, -0.5 to 0.5.
saturationNumber1Multiplies saturation: 0 is grey, 1 unchanged.
lightnessNumber0Added to lightness, -1 to 1.

Returns

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

Merge

Function

Four greyscale textures as one colour texture's channels. Alpha is 1 where none is given. Merged as data, values unchanged, which is how packed maps (occlusion, roughness, metallic) are built.

Signature
Merge -> Texture
    red: Texture
    green: Texture
    blue: Texture
    alpha: Texture
    asColor: Truth
Texture Merge(
    Texture red,
    Texture green,
    Texture blue,
    Texture alpha,
    bool asColor = false)

Parameters

nametypedefaultdescription
redTexture—The red channel.
greenTexture—The green channel.
blueTexture—The blue channel.
alphaTexture—The alpha channel; optional.
asColorTruthFalseWhether the channels are colour in linear light rather than data.

Returns

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

Split

Function

A colour texture's four channels as four greyscale textures.

Signature
Split(color: Texture) -> (result: Texture, green: Texture, blue: Texture, alpha: Texture)
Texture Split(
    Texture color,
    out Texture green,
    out Texture blue,
    out Texture alpha)

Parameters

nametypedefaultdescription
colorTexture—The colour texture.

Returns

resultTexture
greenTexture
blueTexture
alphaTexture
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Texture Channels
Package
Image Processing

Tint

Function

Multiplies a texture by a colour: tints white to that colour and darkens everything else toward it.

Signature
Tint(texture: Texture, color: Color) -> Texture
Texture Tint(Texture texture, ColorElement color)

Parameters

nametypedefaultdescription
textureTexture—The texture; greyscale becomes colour.
colorColor—The tint.

Returns

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