Divooka Reference

Texture Weathering

7 nodes

On this page 7

Cracks

Function

Cracks: thin dark lines branching across a surface, from the borders of a warped cellular pattern, broken so they do not close into cells. Answers a height (cracks low) and a mask (cracks white).

Signature
Cracks -> (result: Texture, mask: Texture)
    scale: Integer
    width: Number
    coverage: Number
    wander: Number
    seed: Integer
    size: Integer
Texture Cracks(
    out Texture mask,
    int scale = 5,
    double width = 0.02,
    double coverage = 0.6,
    double wander = 0.5,
    int seed = 0,
    int size = 1024)

Parameters

nametypedefaultdescription
scaleInteger5How large the crack network is: cells across the texture.
widthNumber0.02How wide a crack is, as a share of a cell.
coverageNumber0.6How much of the network is cracked, 0 to 1.
wanderNumber0.5How much the cracks wander off straight lines, 0 to 1.
seedInteger0Which cracks.
sizeInteger1024Width and height in pixels.

Returns

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

Dirt

Function

Where dirt gathers: white in crevices and hollows (from ambient occlusion), spread unevenly by noise.

Signature
Dirt -> Texture
    ambientOcclusion: Texture
    amount: Number
    breakup: Number
    noiseScale: Integer
    contrast: Number
    seed: Integer
Texture Dirt(
    Texture ambientOcclusion,
    double amount = 0.5,
    double breakup = 0.5,
    int noiseScale = 6,
    double contrast = 0.4,
    int seed = 0)

Parameters

nametypedefaultdescription
ambientOcclusionTexture—The surface's ambient occlusion, dark in crevices.
amountNumber0.5How far the dirt spreads, 0 to 1.
breakupNumber0.5How much noise breaks it up, 0 to 1.
noiseScaleInteger6The noise's scale: cells across the texture.
contrastNumber0.4How hard its edge is, 0 to 1.
seedInteger0Which noise.

Returns

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

Edge Wear

Function

Where edges are worn: white along convex edges and corners, broken up by noise. Paint chipped off metal, polish on stone.

Signature
EdgeWear -> Texture
    curvature: Texture
    amount: Number
    breakup: Number
    noiseScale: Integer
    contrast: Number
    seed: Integer
Texture EdgeWear(
    Texture curvature,
    double amount = 0.5,
    double breakup = 0.6,
    int noiseScale = 8,
    double contrast = 0.7,
    int seed = 0)

Parameters

nametypedefaultdescription
curvatureTexture—The surface's curvature, bright on edges (from Curvature, or baked).
amountNumber0.5How far the wear spreads, 0 to 1.
breakupNumber0.6How much noise breaks the wear's edge, 0 to 1.
noiseScaleInteger8The noise's scale: cells across the texture.
contrastNumber0.7How hard the wear's edge is, 0 to 1.
seedInteger0Which noise.

Returns

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

Grunge

Function

A ready-made grunge map: an irregular greyscale for breaking up roughness, colour or any mask so a surface does not look new.

Signature
Grunge -> Texture
    kind: Grunge Kind
    seed: Integer
    size: Integer
Texture Grunge(
    GrungeKind kind = GrungeKind.Mottled,
    int seed = 0,
    int size = 1024)

Parameters

nametypedefaultdescription
kindGrunge KindMottledWhich kind of grunge.
seedInteger0Which random variation.
sizeInteger1024Width and height in pixels.

Returns

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

Leaks

Function

Streaks running down from a mask's lower edges, as rain leaves under window sills and rust runs from bolts. With no source, streaks start anywhere.

Signature
Leaks -> Texture
    source: Texture
    length: Number
    density: Number
    seed: Integer
    size: Integer
Texture Leaks(
    Texture source,
    double length = 0.3,
    double density = 0.5,
    int seed = 0,
    int size = 1024)

Parameters

nametypedefaultdescription
sourceTexture—Where leaks start, white; optional.
lengthNumber0.3How far they run, as a share of the texture's height.
densityNumber0.5How many streaks, 0 to 1.
seedInteger0Which streaks.
sizeInteger1024Width and height in pixels, when there is no source.

Returns

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

Scratches

Function

Scratches: thin straight strokes scattered across a surface, mostly in one direction or every which way.

Signature
Scratches -> Texture
    count: Integer
    length: Number
    width: Number
    angleRandom: Number
    seed: Integer
    size: Integer
Texture Scratches(
    int count = 300,
    double length = 0.15,
    double width = 0.02,
    double angleRandom = 1,
    int seed = 0,
    int size = 1024)

Parameters

nametypedefaultdescription
countInteger300How many scratches.
lengthNumber0.15How long a scratch is, as a share of the texture.
widthNumber0.02How thick a scratch is, as a share of its length.
angleRandomNumber1How far scratches stray from one direction, 0 (all parallel) to 1 (any).
seedInteger0Which scratches.
sizeInteger1024Width and height in pixels.

Returns

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

Water Level

Function

Water standing in the low places of a height: white where the surface is below the level, with a soft shoreline. Puddles on cobbles, water in mortar, a flooded floor.

Signature
WaterLevel -> (result: Texture, flattened: Texture)
    height: Texture
    level: Number
    shoreline: Number
Texture WaterLevel(
    Texture height,
    out Texture flattened,
    double level = 0.3,
    double shoreline = 0.04)

Parameters

nametypedefaultdescription
heightTexture—The surface's height.
levelNumber0.3The water's level, 0 to 1.
shorelineNumber0.04How soft the water's edge is.

Returns

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