Divooka Reference

Texture Warps

5 nodes

On this page 5

Directional Warp

Function

Pushes each pixel one way by an amount read from a second texture: white pushes the full distance, black not at all. Ripples, leaning grass, streaks.

Signature
DirectionalWarp -> Texture
    texture: Texture
    by: Texture
    angle: Number
    distance: Number
Texture DirectionalWarp(
    Texture texture,
    Texture by,
    double angle = 0,
    double distance = 32)

Parameters

nametypedefaultdescription
textureTexture—The texture to distort.
byTexture—How far each pixel is pushed, 0 to 1.
angleNumber0The direction, in degrees: 0 right, 90 down.
distanceNumber32The full push, in pixels of a 1024-pixel texture.

Returns

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

Slope Blur

Function

Smears a texture along the slopes of another, step by step, following each slope as it bends: the chipped edges of stone, eroded rock, paint that has run. Min eats into bright areas from their slopes, Max spreads them, Blur smears.

Signature
SlopeBlur -> Texture
    texture: Texture
    slope: Texture
    samples: Integer
    intensity: Number
    mode: Slope Blur Mode
Texture SlopeBlur(
    Texture texture,
    Texture slope,
    int samples = 8,
    double intensity = 8,
    SlopeBlurMode mode = SlopeBlurMode.Blur)

Parameters

nametypedefaultdescription
textureTexture—The texture to smear.
slopeTexture—The texture whose slopes are followed.
samplesInteger8How many steps; more is smoother and slower.
intensityNumber8How far each step goes: at 1, a slope rising the full height across the texture steps 1 pixel of a 1024-pixel texture.
modeSlope Blur ModeBlurHow the readings along the path combine.

Returns

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

Swirl

Function

Twists a texture round its centre, most at the middle and not at all at the radius.

Signature
Swirl -> Texture
    texture: Texture
    turns: Number
    radius: Number
Texture Swirl(
    Texture texture,
    double turns = 0.5,
    double radius = 0.5)

Parameters

nametypedefaultdescription
textureTexture—The texture.
turnsNumber0.5How far the centre turns, in whole turns; negative twists the other way.
radiusNumber0.5Where the twist ends, as a share of the width.

Returns

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

Vector Warp

Function

Pushes each pixel by a vector field: the first texture's values move it across, the second's down, both centred on middle grey.

Signature
VectorWarp -> Texture
    texture: Texture
    across: Texture
    down: Texture
    distance: Number
Texture VectorWarp(
    Texture texture,
    Texture across,
    Texture down,
    double distance = 32)

Parameters

nametypedefaultdescription
textureTexture—The texture to distort.
acrossTexture—Movement across, middle grey none.
downTexture—Movement down, middle grey none.
distanceNumber32The movement at white or black, in pixels of a 1024-pixel texture.

Returns

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

Warp

Function

Pushes each pixel along the slope of a second texture: where it rises, the image slides. Small amounts roughen edges; large ones swirl like marble.

Signature
Warp -> Texture
    texture: Texture
    by: Texture
    intensity: Number
Texture Warp(Texture texture, Texture by, double intensity = 2)

Parameters

nametypedefaultdescription
textureTexture—The texture to distort.
byTexture—The texture whose slope pushes.
intensityNumber2How far: at 1, a slope that rises the full height across the whole texture pushes 4 pixels of a 1024-pixel texture.

Returns

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