Divooka Reference

Texture Adjustments

13 nodes

On this page 13

Auto Levels

Function

Stretches the values so the darkest becomes 0 and the brightest 1.

Signature
AutoLevels(texture: Texture) -> Texture
Texture AutoLevels(Texture texture)

Parameters

nametypedefaultdescription
textureTexture—The texture.

Returns

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

Clamp

Function

Holds every value between a minimum and a maximum.

Signature
Clamp -> Texture
    texture: Texture
    minimum: Number
    maximum: Number
Texture Clamp(
    Texture texture,
    double minimum = 0,
    double maximum = 1)

Parameters

nametypedefaultdescription
textureTexture—The texture.
minimumNumber0The lowest value let through.
maximumNumber1The highest value let through.

Returns

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

Contrast Brightness

Function

Pushes values away from (contrast above 0) or toward (below 0) the middle grey, and shifts them all up or down.

Signature
ContrastBrightness -> Texture
    texture: Texture
    contrast: Number
    brightness: Number
Texture ContrastBrightness(
    Texture texture,
    double contrast = 0.25,
    double brightness = 0)

Parameters

nametypedefaultdescription
textureTexture—The texture.
contrastNumber0.25-1 flattens to grey, 0 leaves alone, 1 doubles the spread.
brightnessNumber0Added to every value.

Returns

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

Curve

Function

Remaps values through a curve given as heights at evenly spaced points from 0 to 1, passed through smoothly: [0, 1] is no change, [0, 0.2, 1] darkens the middle, [1, 0] inverts.

Signature
Curve(texture: Texture, points: Number Array) -> Texture
Texture Curve(Texture texture, double[] points)

Parameters

nametypedefaultdescription
textureTexture—The texture.
pointsNumber Array—The curve's height at evenly spaced inputs from 0 to 1; at least two.

Returns

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

Delight

Function

Takes the light a photograph was taken in out of its colour: the broad brightening and darkening that a sun, a sky or a flash laid across the surface, found as the photograph's brightness smoothed wider than any of its own detail and divided out, keeping each place's hue. What is left is the surface's own colour, which a material needs so its renderer can light it afresh.

Signature
Delight -> Texture
    texture: Texture
    scale: Number
    strength: Number
    tiles: Truth
Texture Delight(
    Texture texture,
    double scale = 128,
    double strength = 1,
    bool tiles = false)

Parameters

nametypedefaultdescription
textureTexture—The photograph.
scaleNumber128How broad a change counts as light rather than the surface's own pattern, in pixels of a 1024-pixel texture: larger keeps more of the surface's own large variation.
strengthNumber1How much of the light to take out, 0 to 1.
tilesTruthFalseWhether the photograph already tiles, as a scan made for it does: then the light is measured across its edges as if it repeated, so the result still tiles. A plain photograph's light does not repeat, so it is measured up to its edges.

Returns

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

Histogram Range

Function

Squeezes the values toward a middle: range 1 leaves them, range 0 makes everything the position's value. For calming a busy texture before it is mixed in.

Signature
HistogramRange -> Texture
    texture: Texture
    range: Number
    position: Number
Texture HistogramRange(
    Texture texture,
    double range = 0.5,
    double position = 0.5)

Parameters

nametypedefaultdescription
textureTexture—The texture.
rangeNumber0.5How much of the spread is kept, 0 to 1.
positionNumber0.5Where the values gather, 0 to 1.

Returns

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

Histogram Scan

Function

Turns a gradient into a mask with an edge you can place and soften: everything above the position becomes white, everything below black, over a transition as wide as the contrast leaves it. Sliding the position grows or shrinks the mask - the tool for eroding, wearing and spreading.

Signature
HistogramScan -> Texture
    texture: Texture
    position: Number
    contrast: Number
Texture HistogramScan(
    Texture texture,
    double position = 0.5,
    double contrast = 0.5)

Parameters

nametypedefaultdescription
textureTexture—The texture.
positionNumber0.5Where the edge is, 0 to 1; higher keeps less white.
contrastNumber0.5How sharp the edge is, 0 (the gradient untouched) to 1 (a hard threshold).

Returns

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

Histogram Select

Function

Selects a band of values: white where the value is near the position, falling to black outside the range, softened by contrast. For picking out one level of a height, such as the tops of bricks.

Signature
HistogramSelect -> Texture
    texture: Texture
    position: Number
    range: Number
    contrast: Number
Texture HistogramSelect(
    Texture texture,
    double position = 0.5,
    double range = 0.25,
    double contrast = 0.5)

Parameters

nametypedefaultdescription
textureTexture—The texture.
positionNumber0.5The value selected, 0 to 1.
rangeNumber0.25How wide the selected band is.
contrastNumber0.5How hard the band's edges are.

Returns

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

Invert

Function

One minus each value: black becomes white.

Signature
Invert(texture: Texture) -> Texture
Texture Invert(Texture texture)

Parameters

nametypedefaultdescription
textureTexture—The texture.

Returns

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

Levels

Function

Remaps values: what was at the input low becomes the output low, the input high the output high, with gamma bending the middle. The single most used node in procedural texturing.

Signature
Levels -> Texture
    texture: Texture
    inputLow: Number
    inputHigh: Number
    gamma: Number
    outputLow: Number
    outputHigh: Number
    clamp: Truth
Texture Levels(
    Texture texture,
    double inputLow = 0,
    double inputHigh = 1,
    double gamma = 1,
    double outputLow = 0,
    double outputHigh = 1,
    bool clamp = true)

Parameters

nametypedefaultdescription
textureTexture—The texture.
inputLowNumber0The value that becomes the output low.
inputHighNumber1The value that becomes the output high.
gammaNumber1Above 1 brightens the middle, below 1 darkens it.
outputLowNumber0The lowest value out.
outputHighNumber1The highest value out.
clampTruthTrueWhether values beyond the input range are held at the output ends.

Returns

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

Multiply Add

Function

Multiplies every value by a factor and adds an offset: the plain arithmetic remap.

Signature
MultiplyAdd -> Texture
    texture: Texture
    multiply: Number
    add: Number
Texture MultiplyAdd(
    Texture texture,
    double multiply = 1,
    double add = 0)

Parameters

nametypedefaultdescription
textureTexture—The texture.
multiplyNumber1The factor.
addNumber0The offset, added after multiplying.

Returns

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

Posterize

Function

Rounds values to a number of even steps: terraces, stylised bands.

Signature
Posterize(texture: Texture, steps: Integer) -> Texture
Texture Posterize(Texture texture, int steps = 4)

Parameters

nametypedefaultdescription
textureTexture—The texture.
stepsInteger4How many distinct values remain, at least 2.

Returns

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

Threshold

Function

White where the value is at or above the threshold, black below: a hard mask.

Signature
Threshold(texture: Texture, threshold: Number) -> Texture
Texture Threshold(Texture texture, double threshold = 0.5)

Parameters

nametypedefaultdescription
textureTexture—The texture.
thresholdNumber0.5The dividing value.

Returns

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