Divooka Reference

Texture Scatter

4 nodes

On this page 4

Splatter

Function

Copies of a shape scattered at random over the texture - not on a grid - each its own size, turn and brightness: pebbles on a path, leaves, spots of rust, scratches when the shape is a thin capsule.

Signature
Splatter -> Texture
    shape: Shape Kind
    count: Integer
    scale: Number
    scaleRandom: Number
    stretch: Number
    rotationRandom: Number
    luminanceRandom: Number
    sides: Integer
    seed: Integer
    size: Integer
Texture Splatter(
    ShapeKind shape = ShapeKind.Disc,
    int count = 200,
    double scale = 0.04,
    double scaleRandom = 0.5,
    double stretch = 1,
    double rotationRandom = 1,
    double luminanceRandom = 0.3,
    int sides = 6,
    int seed = 0,
    int size = 1024)

Parameters

nametypedefaultdescription
shapeShape KindDiscThe shape each copy is.
countInteger200How many copies.
scaleNumber0.04A copy's size, as a share of the texture's width.
scaleRandomNumber0.5How much the size varies, 0 to 1.
stretchNumber1How much longer than wide each copy is: 1 keeps the shape, 8 makes a scratch of a capsule.
rotationRandomNumber1How far each copy's turn varies, 0 to 1 (a full turn).
luminanceRandomNumber0.3How much darker some copies are.
sidesInteger6For polygons and stars, the number of sides or points.
seedInteger0Which random scatter.
sizeInteger1024Width and height in pixels.

Returns

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

Splatter Texture

Function

Copies of a small texture scattered at random, as Splatter scatters shapes.

Signature
SplatterTexture -> Texture
    pattern: Texture
    count: Integer
    scale: Number
    scaleRandom: Number
    stretch: Number
    rotationRandom: Number
    luminanceRandom: Number
    seed: Integer
    size: Integer
Texture SplatterTexture(
    Texture pattern,
    int count = 100,
    double scale = 0.06,
    double scaleRandom = 0.5,
    double stretch = 1,
    double rotationRandom = 1,
    double luminanceRandom = 0.3,
    int seed = 0,
    int size = 1024)

Parameters

nametypedefaultdescription
patternTexture—The texture each copy is, read as greyscale.
countInteger100How many copies.
scaleNumber0.06A copy's size, as a share of the texture's width.
scaleRandomNumber0.5How much the size varies.
stretchNumber1How much longer than wide each copy is.
rotationRandomNumber1How far each copy's turn varies.
luminanceRandomNumber0.3How much darker some copies are.
seedInteger0Which random scatter.
sizeInteger1024Width and height in pixels.

Returns

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

Tile Generator

Function

A shape repeated on a grid, each copy varied at random in size, turn, position and brightness, and some left out: the general tool behind studs, tiles of pebbles, rows of rivets and diamond plate.

Signature
TileGenerator -> (result: Texture, tileRandom: Texture)
    shape: Shape Kind
    columns: Integer
    rows: Integer
    scale: Number
    scaleRandom: Number
    rotation: Number
    rotationRandom: Number
    positionRandom: Number
    luminanceRandom: Number
    dropChance: Number
    rowOffset: Number
    sides: Integer
    seed: Integer
    size: Integer
Texture TileGenerator(
    out Texture tileRandom,
    ShapeKind shape = ShapeKind.Dome,
    int columns = 8,
    int rows = 8,
    double scale = 0.8,
    double scaleRandom = 0,
    double rotation = 0,
    double rotationRandom = 0,
    double positionRandom = 0,
    double luminanceRandom = 0,
    double dropChance = 0,
    double rowOffset = 0,
    int sides = 6,
    int seed = 0,
    int size = 1024)

Parameters

nametypedefaultdescription
shapeShape KindDomeThe shape each copy is.
columnsInteger8Copies across.
rowsInteger8Copies down.
scaleNumber0.8Each copy's size within its cell, 1 filling it.
scaleRandomNumber0How much the size varies, 0 to 1.
rotationNumber0Turns every copy, in degrees.
rotationRandomNumber0How far each copy's turn varies, 0 to 1 (a full turn).
positionRandomNumber0How far each copy strays from its cell's centre, as a share of a cell.
luminanceRandomNumber0How much darker some copies are, 0 to 1.
dropChanceNumber0The chance each copy is left out, 0 to 1.
rowOffsetNumber0How far every other row is shifted, as a share of a cell.
sidesInteger6For polygons and stars, the number of sides or points.
seedInteger0Which random variation.
sizeInteger1024Width and height in pixels.

Returns

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

Tile Sampler

Function

A small texture - a pebble, a leaf, a bolt head - placed on a grid like the tile generator's copies, each varied.

Signature
TileSampler -> (result: Texture, tileRandom: Texture)
    pattern: Texture
    columns: Integer
    rows: Integer
    scale: Number
    scaleRandom: Number
    rotation: Number
    rotationRandom: Number
    positionRandom: Number
    luminanceRandom: Number
    dropChance: Number
    rowOffset: Number
    seed: Integer
    size: Integer
Texture TileSampler(
    out Texture tileRandom,
    Texture pattern,
    int columns = 8,
    int rows = 8,
    double scale = 0.8,
    double scaleRandom = 0,
    double rotation = 0,
    double rotationRandom = 0,
    double positionRandom = 0,
    double luminanceRandom = 0,
    double dropChance = 0,
    double rowOffset = 0,
    int seed = 0,
    int size = 1024)

Parameters

nametypedefaultdescription
patternTexture—The texture each copy is; its whole area fills a copy, and it is read as greyscale.
columnsInteger8Copies across.
rowsInteger8Copies down.
scaleNumber0.8Each copy's size within its cell, 1 filling it.
scaleRandomNumber0How much the size varies.
rotationNumber0Turns every copy, in degrees.
rotationRandomNumber0How far each copy's turn varies.
positionRandomNumber0How far each copy strays, as a share of a cell.
luminanceRandomNumber0How much darker some copies are.
dropChanceNumber0The chance each copy is left out.
rowOffsetNumber0How far every other row is shifted.
seedInteger0Which random variation.
sizeInteger1024Width and height in pixels.

Returns

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