Divooka Reference

Materials

29 nodes

On this page 29

Add Detail

Function

Adds a fine detail material over a material, repeated many times across each of its tiles: the grain, pits and scratches a close camera sees and a whole tile's maps are too coarse to hold. The detail's colour and roughness shift the material's around its own average, so the material keeps its look from afar; its height adds to the material's, and its normals bend the material's by reoriented normal mapping.

Signature
AddDetail -> PBR Material
    material: PBR Material
    detail: PBR Material
    repeats: Integer
    strength: Number
PbrMaterial AddDetail(
    PbrMaterial material,
    PbrMaterial detail,
    int repeats = 8,
    double strength = 1)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
detailPBR Material—The detail material: its own tile size is ignored, since it is repeated to fit.
repeatsInteger8How many times the detail repeats across one tile of the material.
strengthNumber1How strongly the detail shows, 0 to 1.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Bake To Maps

Function

The material as maps alone, at one size: what an exported file or a game engine holds of it. Detail finer than the maps' pixels - which a material made from noises, patterns, flakes and scratches keeps, and shows up close - is gone. For seeing what a size keeps, and for a material that should stay exactly as it was baked.

Signature
BakeToMaps -> PBR Material
    material: PBR Material
    size: Integer
PbrMaterial BakeToMaps(PbrMaterial material, int size = 1024)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
sizeInteger1024The maps' width and height in pixels.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Blend Materials

Function

Mixes two materials by a mask, every channel at once: black takes the first, white the second. Moss on stone, paint over metal, rust on paint.

Signature
BlendMaterials -> PBR Material
    first: PBR Material
    second: PBR Material
    mask: Texture
PbrMaterial BlendMaterials(
    PbrMaterial first,
    PbrMaterial second,
    Texture mask)

Parameters

nametypedefaultdescription
firstPBR Material—Where the mask is black.
secondPBR Material—Where the mask is white.
maskTexture—The mix at each pixel.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Break Up Tiling

Function

Breaks up a material's repetition: a material several copies across, every copy showing it moved, turned and scaled at random and blended across the seams, every map alike - so across a floor or a hillside the same stone no longer comes round every metre. Its normals turn with each copy, and where two copies meet the higher wins, so stones stay whole. The result tiles every Tiles Across copies, and knows it is that much wider.

Signature
BreakUpTiling -> PBR Material
    material: PBR Material
    tilesAcross: Integer
    blend: Number
    rotation: Number
    scaleVariation: Number
    contrast: Number
    seed: Integer
    size: Integer
PbrMaterial BreakUpTiling(
    PbrMaterial material,
    int tilesAcross = 4,
    double blend = 0.3,
    double rotation = 360,
    double scaleVariation = 0,
    double contrast = 0.6,
    int seed = 0,
    int size = 2048)

Parameters

nametypedefaultdescription
materialPBR Material—The tiling material.
tilesAcrossInteger4How many copies the result is across, and how far apart its own repetition is.
blendNumber0.3How wide the seams' blend is, as a share of a copy.
rotationNumber360How far each copy may turn, in degrees: 0 for a material with a direction (planks, brushed metal), 360 for one without.
scaleVariationNumber0How much each copy may grow or shrink, 0 to 0.5.
contrastNumber0.6How much the higher copy wins where two meet, 0 to 1.
seedInteger0Which random arrangement.
sizeInteger2048The maps' width and height in pixels; each copy gets this divided by Tiles Across.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Create Material

Function

A material from its maps. Only the base colour is needed: without a height the surface is flat, without a normal map one is derived from the height, without ambient occlusion likewise, and roughness and metallic fall back to their values.

Signature
CreateMaterial -> PBR Material
    baseColor: Texture
    height: Texture
    roughness: Texture
    metallic: Texture
    normal: Texture
    ambientOcclusion: Texture
    emissive: Texture
    opacity: Texture
    name: Text
    roughnessValue: Number
    metallicValue: Number
    heightDepth: Number
    normalIntensity: Number
    tileSizeMetres: Number
PbrMaterial CreateMaterial(
    Texture baseColor,
    Texture height,
    Texture roughness,
    Texture metallic,
    Texture normal,
    Texture ambientOcclusion,
    Texture emissive,
    Texture opacity,
    string name = "Material",
    double roughnessValue = 0.6,
    double metallicValue = 0,
    double heightDepth = 0.02,
    double normalIntensity = 4,
    double tileSizeMetres = 1)

Parameters

nametypedefaultdescription
baseColorTexture—The surface's colour.
heightTexture—The surface's height, 0 to 1; optional.
roughnessTexture—Roughness, 0 (mirror) to 1 (matte); optional.
metallicTexture—Metallic, 0 (dielectric) to 1 (metal); optional.
normalTexture—A normal map, OpenGL convention; optional, derived from the height when absent.
ambientOcclusionTexture—Ambient occlusion; optional, derived from the height when absent.
emissiveTexture—Emitted light's colour; optional.
opacityTexture—Opacity, 1 solid; optional.
nameTextMaterialThe material's name, used for exported files.
roughnessValueNumber0.6The roughness where there is no roughness map.
metallicValueNumber0The metallic where there is no metallic map.
heightDepthNumber0.02How deep the relief is: a height of 1 rises this share of a tile's width.
normalIntensityNumber4How strong the normal map derived from the height is.
tileSizeMetresNumber1The width one tile of the maps covers on a model, in metres.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Decompose Material

Function

Takes a material apart into its maps, each at the material's resolution; maps it does not have come back as their values or as derived from the height.

Signature
DecomposeMaterial(material: PBR Material) -> (result: Texture, height: Texture, normal: Texture, roughness: Texture, metallic: Texture, ambientOcclusion: Texture)
Texture DecomposeMaterial(
    PbrMaterial material,
    out Texture height,
    out Texture normal,
    out Texture roughness,
    out Texture metallic,
    out Texture ambientOcclusion)

Parameters

nametypedefaultdescription
materialPBR Material—The material.

Returns

resultTexture
heightTexture
normalTexture
roughnessTexture
metallicTexture
ambientOcclusionTexture
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Delight

Function

Takes the light a scan was captured in out of its colour: the broad light across it, found as its brightness blurred wider than its own detail and divided out, and the shadow in its crevices, found from its ambient occlusion (its own map, or one worked out from its height) and divided out. What is left is the surface's own colour, so the material can be lit afresh by whatever light it is put in.

Signature
Delight -> PBR Material
    material: PBR Material
    scale: Number
    strength: Number
    occlusion: Number
    tiles: Truth
PbrMaterial Delight(
    PbrMaterial material,
    double scale = 128,
    double strength = 1,
    double occlusion = 0.6,
    bool tiles = false)

Parameters

nametypedefaultdescription
materialPBR Material—The scanned material.
scaleNumber128How broad a change counts as light rather than the surface's own pattern, in pixels of a 1024-pixel texture.
strengthNumber1How much of the broad light to take out, 0 to 1.
occlusionNumber0.6How much of the crevices' shadow to take out, 0 to 1: a scan shot under an overcast sky carries its occlusion in its colour.
tilesTruthFalseWhether the scan already tiles: then its light is measured across its edges as if it repeated, so it still tiles afterwards.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Dust

Function

A material under dust, laid by its own height and slope: it settles in the hollows and on the flat tops, where nothing carries it off, broken up so it lies in drifts rather than evenly. Dust is pale, matte and smooths the surface it covers.

Signature
Dust -> PBR Material
    material: PBR Material
    amount: Number
    hollows: Number
    color: Optional Color
    breakup: Number
    seed: Integer
PbrMaterial Dust(
    PbrMaterial material,
    double amount = 0.35,
    double hollows = 0.6,
    ColorElement? color,
    double breakup = 0.4,
    int seed = 0)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
amountNumber0.35How much of the surface the dust covers, 0 to 1.
hollowsNumber0.6Where it lies: 1 in the hollows and crevices, 0 on the flat tops, between for both.
colorOptional Color—The dust's colour.
breakupNumber0.4How much it lies in drifts rather than evenly, 0 to 1.
seedInteger0Which drifts.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

From Specular Glossiness

Function

Converts maps made for the older specular-glossiness workflow into a metallic-roughness material: roughness is one minus glossiness, and the specular colour decides where the surface is metal.

Signature
FromSpecularGlossiness -> PBR Material
    diffuse: Texture
    specular: Texture
    glossiness: Texture
    name: Text
PbrMaterial FromSpecularGlossiness(
    Texture diffuse,
    Texture specular,
    Texture glossiness,
    string name = "Material")

Parameters

nametypedefaultdescription
diffuseTexture—The diffuse colour.
specularTexture—The specular colour.
glossinessTexture—The glossiness, 1 a mirror.
nameTextMaterialThe material's name.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Height Blend Materials

Function

Mixes two materials by their heights: the second shows where it stands higher than the first, with a soft seam, so it fills or tops the first's relief naturally. Sand between cobbles, snow on rock, water in low places. Also answers the mask it used.

Signature
HeightBlendMaterials -> (result: PBR Material, mask: Texture)
    first: PBR Material
    second: PBR Material
    offset: Number
    contrast: Number
PbrMaterial HeightBlendMaterials(
    PbrMaterial first,
    PbrMaterial second,
    out Texture mask,
    double offset = 0,
    double contrast = 0.9)

Parameters

nametypedefaultdescription
firstPBR Material—The first material.
secondPBR Material—The second material.
offsetNumber0Raises the second material's height before comparing, -1 to 1.
contrastNumber0.9How sharp the seam is, 0 to 1.

Returns

resultPBR Material
maskTexture
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Macro Variation

Function

Lays slow, broad variation across a material - patches a little lighter or darker, warmer or cooler, rougher or smoother, each many times larger than the material's own detail - as weather, wear and sun leave on any real surface. Use it on a material from Break Up Tiling, whose larger extent gives the variation room; on a single tile it would repeat with the tile.

Signature
MacroVariation -> PBR Material
    material: PBR Material
    patches: Integer
    brightness: Number
    hue: Number
    saturation: Number
    roughness: Number
    seed: Integer
PbrMaterial MacroVariation(
    PbrMaterial material,
    int patches = 3,
    double brightness = 0.12,
    double hue = 0.015,
    double saturation = 0.1,
    double roughness = 0.08,
    int seed = 0)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
patchesInteger3How many patches across the material.
brightnessNumber0.12How much lighter or darker a patch may be, 0 to 0.5.
hueNumber0.015How far a patch's hue may shift, as a share of the colour wheel.
saturationNumber0.1How much more or less saturated a patch may be, 0 to 0.5.
roughnessNumber0.08How much rougher or smoother a patch may be, 0 to 0.5.
seedInteger0Which random pattern.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Make Tileable

Function

Makes a material that does not tile - a scan, a set of maps from a photograph - tile, every map alike: each cross-faded with itself moved half a tile, so its own seams fall where the other copy covers them, the fade's edge broken up by noise so it is not a visible square.

Signature
MakeTileable -> PBR Material
    material: PBR Material
    blendWidth: Number
    seed: Integer
PbrMaterial MakeTileable(
    PbrMaterial material,
    double blendWidth = 0.25,
    int seed = 0)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
blendWidthNumber0.25How wide the cross-fade is, as a share of the material: wider hides seams better and shows more doubling.
seedInteger0Which noise breaks up the fade's edge.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Material Sheet

Function

Several materials side by side on the same shape, in rows: a library sheet for comparing materials.

Signature
MaterialSheet -> Pixel Image
    materials: PBR Material Array
    shape: PreviewShape
    cellSize: Integer
    columns: Integer
PixelImage MaterialSheet(
    PbrMaterial[] materials,
    PreviewShape shape = PreviewShape.Sphere,
    int cellSize = 256,
    int columns = 4)

Parameters

nametypedefaultdescription
materialsPBR Material Array—The materials.
shapePreviewShapeSphereThe shape each is shown on.
cellSizeInteger256Each material's picture size in pixels.
columnsInteger4Materials in a row.

Returns

resultPixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Photo To Material

Function

A whole material from one photograph of a surface, as a bitmap-to-material tool makes one: its colour with the light it was taken in removed, its height read from its fine detail - darker, in the photograph, taken as deeper - with normals and occlusion from that height, its roughness rising in the hollows, and, if asked, made to tile. A plausible first draft from a single picture, to be refined; a scan's measured maps are better where they exist.

Signature
PhotoToMaterial -> PBR Material
    photo: Texture
    detailScale: Number
    heightDepth: Number
    roughness: Number
    roughnessVariation: Number
    makeTileable: Truth
    tileSizeMetres: Number
    name: Text
PbrMaterial PhotoToMaterial(
    Texture photo,
    double detailScale = 48,
    double heightDepth = 0.02,
    double roughness = 0.7,
    double roughnessVariation = 0.2,
    bool makeTileable = true,
    double tileSizeMetres = 1,
    string name = "Photo Material")

Parameters

nametypedefaultdescription
photoTexture—The photograph, as a colour texture.
detailScaleNumber48How large the detail read as relief is, in pixels of a 1024-pixel texture: larger reads broader bumps as height.
heightDepthNumber0.02How deep the relief is, as a share of the tile's width.
roughnessNumber0.7The surface's roughness on average.
roughnessVariationNumber0.2How much rougher the hollows are than the tops, 0 to 0.5.
makeTileableTruthTrueWhether to make the material tile.
tileSizeMetresNumber1The width the photograph covers, in metres.
nameTextPhoto MaterialThe material's name.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Preview Close Up

Function

The material seen up close: a patch of its surface the given width across, looked down on at an angle, as through a magnifying glass. Where the material's maps carry functions - noises, patterns, flakes, scratches and what is made from them - their detail shows however close the view, finer than the maps' pixels; elsewhere the pixels show as they are.

Signature
PreviewCloseUp -> Pixel Image
    material: PBR Material
    widthMetres: Number
    angle: Number
    environment: PreviewEnvironment
    size: Integer
    rotation: Number
PixelImage PreviewCloseUp(
    PbrMaterial material,
    double widthMetres = 0.05,
    double angle = 50,
    PreviewEnvironment environment = PreviewEnvironment.Studio,
    int size = 512,
    double rotation = 0)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
widthMetresNumber0.05How wide the patch in view is, in metres: 0.05 is five centimetres.
angleNumber50How steeply the view looks down, in degrees: 90 straight down, lower to rake across the surface.
environmentPreviewEnvironmentStudioThe lighting.
sizeInteger512The picture's width and height in pixels.
rotationNumber0Turns the surface under the view, in degrees.

Returns

resultPixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Preview In Sky

Function

The material rendered on a sample shape under a photographed sky - an equirectangular HDR image such as Poly Haven publishes - so it can be judged in the light it will be seen in. The sky's sun is found and becomes the light that casts shadows; the rest of the sky lights the material, fills its reflections and stands behind it. It is metered as a camera meters a grey card, so an 18% grey surface facing up comes out middle grey whatever the image's own level.

Signature
PreviewInSky -> Pixel Image
    material: PBR Material
    sky: Hdr Pixel Image
    shape: PreviewShape
    size: Integer
    relief: PreviewRelief
    rotation: Number
    skyRotation: Number
    exposure: Number
PixelImage PreviewInSky(
    PbrMaterial material,
    HdrPixelImage sky,
    PreviewShape shape = PreviewShape.Sphere,
    int size = 512,
    PreviewRelief relief = PreviewRelief.Displacement,
    double rotation = 0,
    double skyRotation = 0,
    double exposure = 0)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
skyHdr Pixel Image—The sky: an equirectangular HDR image.
shapePreviewShapeSphereThe shape it is shown on.
sizeInteger512The picture's width and height in pixels.
reliefPreviewReliefDisplacementHow the height shows.
rotationNumber0Turns the shape, in degrees.
skyRotationNumber0Turns the sky about the vertical, in degrees, to bring its sun round.
exposureNumber0Brightens or darkens the sky from its automatic level, in stops.

Returns

resultPixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Preview Material

Function

The material rendered on a sample shape in a lit scene. Its height shows by displacement - the surface moves, so relief shows in the silhouette and casts shadows, as a tessellating or offline renderer draws it - or by parallax occlusion, the shader technique games use on flat geometry, or through the normal map alone.

Signature
PreviewMaterial -> Pixel Image
    material: PBR Material
    shape: PreviewShape
    environment: PreviewEnvironment
    size: Integer
    relief: PreviewRelief
    rotation: Number
PixelImage PreviewMaterial(
    PbrMaterial material,
    PreviewShape shape = PreviewShape.Sphere,
    PreviewEnvironment environment = PreviewEnvironment.Studio,
    int size = 512,
    PreviewRelief relief = PreviewRelief.Displacement,
    double rotation = 0)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
shapePreviewShapeSphereThe shape it is shown on.
environmentPreviewEnvironmentStudioThe lighting.
sizeInteger512The picture's width and height in pixels.
reliefPreviewReliefDisplacementHow the height shows.
rotationNumber0Turns the shape, in degrees.

Returns

resultPixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Rename

Function

Renames a material.

Signature
Rename(material: PBR Material, name: Text) -> PBR Material
PbrMaterial Rename(PbrMaterial material, string name)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
nameText—The new name.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Snow

Function

A material under snow, laid by its own height and slope: snow fills from the bottom up, burying the low places under a soft surface that rounds over what it covers, until only the highest points show; and a lighter fall settles on the flat tops still above it.

Signature
Snow -> PBR Material
    material: PBR Material
    depth: Number
    dusting: Number
    color: Optional Color
    seed: Integer
PbrMaterial Snow(
    PbrMaterial material,
    double depth = 0.4,
    double dusting = 0.15,
    ColorElement? color,
    int seed = 0)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
depthNumber0.4How high the snow fills, as a share of the material's relief from its lowest point (0, none) to its highest (1, all buried).
dustingNumber0.15How much more of the surface a light fall covers, the flattest places first, 0 to 1.
colorOptional Color—The snow's colour.
seedInteger0Which drifts.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Uniform Material

Function

A plain material of one colour, roughness and metallic, with no maps: paint, plastic, polished metal.

Signature
UniformMaterial -> PBR Material
    color: Color
    roughness: Number
    metallic: Number
    name: Text
PbrMaterial UniformMaterial(
    ColorElement color,
    double roughness = 0.5,
    double metallic = 0,
    string name = "Material")

Parameters

nametypedefaultdescription
colorColor—The colour.
roughnessNumber0.5Roughness, 0 to 1.
metallicNumber0Metallic, 0 to 1.
nameTextMaterialThe material's name.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Validate Material

Function

Checks a material against physically plausible ranges and shows where it falls outside them: base colour too dark (below sRGB 30, charcoal) or too bright (above sRGB 240, fresh snow) for a dielectric, metal darker than any real metal (below sRGB 180), and metallic values between 0 and 1 over large areas, which real surfaces rarely have. Problems show red on a grey copy of the base colour.

Signature
ValidateMaterial(material: PBR Material) -> (result: Pixel Image, report: Text)
PixelImage ValidateMaterial(
    PbrMaterial material,
    out string report)

Parameters

nametypedefaultdescription
materialPBR Material—The material.

Returns

resultPixel Image
reportText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

Wet

Function

A material after rain, laid by its own height: a film of water darkens what is porous and makes everything glossier, and water stands in the low places - flat, mirror-smooth and level - with a damp margin round it. Metal under the film keeps its colour; under standing water it reflects as water does.

Signature
Wet -> PBR Material
    material: PBR Material
    wetness: Number
    porosity: Number
    waterLevel: Number
    shoreline: Number
PbrMaterial Wet(
    PbrMaterial material,
    double wetness = 0.8,
    double porosity = 0.5,
    double waterLevel = 0.3,
    double shoreline = 0.04)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
wetnessNumber0.8How wet the surface is, 0 (dry) to 1 (streaming).
porosityNumber0.5How much the surface drinks the water, 0 (glazed tile, metal) to 1 (brick, earth): a porous surface darkens more and stays rougher.
waterLevelNumber0.3How high standing water reaches, as a share of the material's relief from its lowest point (0, none) to its highest (1, all under water).
shorelineNumber0.04How soft the water's edge is, as a share of the height.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

With Anisotropy

Function

Stretches the material's highlights along one direction: brushed metal, hair, satin (glTF KHR_materials_anisotropy).

Signature
WithAnisotropy -> PBR Material
    material: PBR Material
    strength: Number
    rotation: Number
PbrMaterial WithAnisotropy(
    PbrMaterial material,
    double strength = 0.7,
    double rotation = 0)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
strengthNumber0.7How stretched, 0 to 1.
rotationNumber0The direction, in degrees from the texture's across.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

With Clearcoat

Function

Adds a clear lacquer over the material: car paint, varnished wood, glazed ceramic (glTF KHR_materials_clearcoat).

Signature
WithClearcoat -> PBR Material
    material: PBR Material
    strength: Number
    roughness: Number
PbrMaterial WithClearcoat(
    PbrMaterial material,
    double strength = 1,
    double roughness = 0.05)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
strengthNumber1How strong the coat is, 0 to 1.
roughnessNumber0.05How rough the coat is.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

With Emission

Function

Makes the material give off light: screens, lava, neon (glTF KHR_materials_emissive_strength).

Signature
WithEmission -> PBR Material
    material: PBR Material
    emissive: Texture
    strength: Number
PbrMaterial WithEmission(
    PbrMaterial material,
    Texture emissive,
    double strength = 1)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
emissiveTexture—The emitted colour, black where nothing glows.
strengthNumber1How bright; above 1 for light brighter than a white surface.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

With Iridescence

Function

Adds a thin film's rainbow sheen: soap bubbles, oil on water, heat-tinted titanium (glTF KHR_materials_iridescence).

Signature
WithIridescence -> PBR Material
    material: PBR Material
    strength: Number
    thicknessNm: Number
PbrMaterial WithIridescence(
    PbrMaterial material,
    double strength = 1,
    double thicknessNm = 400)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
strengthNumber1How strong, 0 to 1.
thicknessNmNumber400The film's thickness in nanometres, which sets its colours (100 to 1200).

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

With Scale

Function

Sets how large the material is on a model and how deep its relief: the width one tile covers, and how far a height of 1 rises as a share of it.

Signature
WithScale -> PBR Material
    material: PBR Material
    tileSizeMetres: Number
    heightDepth: Number
    doubleSided: Truth
PbrMaterial WithScale(
    PbrMaterial material,
    double tileSizeMetres = 1,
    double heightDepth = 0.02,
    bool doubleSided = false)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
tileSizeMetresNumber1The width one tile covers, in metres.
heightDepthNumber0.02How deep the relief is, as a share of the tile's width.
doubleSidedTruthFalseDraw both sides, for leaves and cloth.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

With Sheen

Function

Adds the soft sheen fabric has at grazing angles: velvet, satin, dust (glTF KHR_materials_sheen).

Signature
WithSheen -> PBR Material
    material: PBR Material
    color: Color
    roughness: Number
PbrMaterial WithSheen(
    PbrMaterial material,
    ColorElement color,
    double roughness = 0.5)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
colorColor—The sheen's colour.
roughnessNumber0.5How soft the sheen is.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing

With Transmission

Function

Lets light pass through the material: glass, thin plastic, water (glTF KHR_materials_transmission and KHR_materials_ior).

Signature
WithTransmission -> PBR Material
    material: PBR Material
    transmission: Number
    ior: Number
PbrMaterial WithTransmission(
    PbrMaterial material,
    double transmission = 1,
    double ior = 1.5)

Parameters

nametypedefaultdescription
materialPBR Material—The material.
transmissionNumber1How much light passes, 0 to 1.
iorNumber1.5The index of refraction: 1.33 water, 1.5 glass, 2.4 diamond.

Returns

resultPBR Material
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Materials
Package
Image Processing