texture nodes

74 node types in the texture category.

bake_ao#

aliases: ao_bake bake_ambient_occlusion bake_occlusion

Bake ambient occlusion into uv space: white = open sky, dark in gaps, corners and contact areas.

Substance Painter / Marmoset "Ambient Occlusion". Input 0 needs non-overlapping uv in 0..1 (uv_unwrap); layer "mask" holds the coverage, and the image carries the metres its width covers (the size of a typical texel times the width: inspect shows it), which every texture node after it reads its lengths in metres against. Bakes that read a high-res mesh on input 1 add layer "missed": 1 where the cage ray found no high surface (stat missed); cage_attrib sets the cage per part and match_name keeps each named piece to the high prims of its name. Each texel casts samples cosine-weighted rays over the hemisphere of its normal against the mesh (or the high-res input, sampled at the projected point); C = 1 - the fraction that hit within max_distance. Combine with bake_curvature for edge wear and dirt masks; pack into ORM with tex_channel.

Inputs

#namedescription
0geomesh to bake (needs uv without overlaps: uv_unwrap or uv_layout)
1highoptional high-res source, near the mesh (within cage) (optional)

Parameters

nametypedefaultrangedescription
resolutionivec2[1024,1024]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
supersampleint11..4samples per texel along each axis (2 = 4 samples averaged: smoother edges, 4× the work)
aliases: ssaa antialiasing subsampling
paddingint40..256dilate islands by this many texels (no background bleeding in mipmaps)
aliases: dilation margin edge_padding
uv_attribstring"uv"vertex or point uv attribute to bake into
aliases: uv_name uvattrib
groupgroup (prim)""prims to bake ("" = all); the others leave their texels empty
keep_meshboolfalseoutput the input mesh with the image added (off: only the image)
aliases: keep_input keep
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
samplesint161..1024rays per sample (stratified; more = smoother, linear cost)
aliases: rays secondary_rays
biasfloat00..ray start offset along the normal against self-hits (0 = auto: 1e-4 of the bbox diagonal)
seedfloat0random seed
invertboolfalsewrite 1 - value
tilebooltruetrim sheets: a band that tiles is copied one period past each open end, so the bake does not fade there (no effect without trim bands). Help topic trim_sheets.
cagefloat00..high-res input: search distance along the cage normals on each side (metres; 0 = auto: 2% of the bbox diagonal)
aliases: cage_distance max_frontal_distance ray_distance
cage_normalsenum"averaged"high-res input: ray directions: averaged normals over every face at a position (no gaps at hard edges) or the mesh's own normals
options: averaged mesh
aliases: ray_normals average_normals
cage_attribstring"cage"high-res input: a float attribute of the mesh (prim, point or vertex) that sets the cage where it is above 0, e.g. per part with attrib_create {name:"cage", class:"prim", group:"@name=grip", value:0.03}
aliases: cage_attribute
match_nameboolfalsehigh-res input: each piece projects only onto the high prims with the same prim "name" (parts sharing one atlas do not pick up their neighbours)
aliases: match_names by_name
max_distancefloat00..hits farther than this do not occlude (metres; 0 = unlimited)
aliases: max_occluder_distance distance radius
cone_anglefloat00..90half-angle of the ray cone in degrees (0 = auto: 90, the hemisphere)
aliases: spread angle

Writes: image <name> (default: the node name): C grey 0..1 (1 = open), mask

Example

{
  "nodes": {
    "crate": { "type": "topotopo/props/crate" },
    "uv": { "type": "uv_unwrap", "in": ["crate"] },
    "ao": {
      "type": "bake_ao",
      "in": ["uv"],
      "params": { "resolution": 512, "samples": 24 }
    }
  },
  "output": "ao"
}

bake_curvature#

aliases: curvature_bake bake_edges

Bake edge curvature into uv space: 0.5 flat, brighter on convex edges and bevels, darker in concave creases (edge wear and dirt masks).

Substance Painter "Curvature". Input 0 needs non-overlapping uv in 0..1 (uv_unwrap); layer "mask" holds the coverage, and the image carries the metres its width covers (the size of a typical texel times the width: inspect shows it), which every texture node after it reads its lengths in metres against. Bakes that read a high-res mesh on input 1 add layer "missed": 1 where the cage ray found no high surface (stat missed); cage_attrib sets the cage per part and match_name keeps each named piece to the high prims of its name. Measured from the mesh's dihedral angles in 3D (uv seams do not show): every edge carries its signed bend (angle / 90°, + convex), and a texel sums the bends of the edge length within radius, weighted (1 - d²/r²)² and normalised so a 90° edge through the texel reads 1. C = 0.5 + 0.5 × strength × value; layers "convex" and "concave" hold the two sides 0..1. Edges whose faces both turn away from a texel (the far side of a thin plank) are ignored; points are matched by position, so unwelded boxes work. intersections (on by default) also finds the creases where separate parts cut into each other, as kitbashed meshes have them (a rivet or boss merged onto a plate, a box sunk into another): concave by the angle between the two faces, so dirt gathers there too (stat crossing_edges). tex_histogram_scan or tex_levels on "convex" make an edge-wear mask, on "concave" a dirt or cavity mask. method surface measures how the shading normals turn within radius instead, on a cloud of surface points interpolated in 3D (as bake_measure curvature): the facets of decimated and isosurface meshes do not read as edges, hard edges (split normals) still do, and each connected part is measured on its own (where parts intersect, cavity shows the seam); min_angle and intersections are for method dihedral, and it does not read a high-res input.

Inputs

#namedescription
0geomesh to bake (needs uv without overlaps: uv_unwrap or uv_layout)
1highoptional high-res source, near the mesh (within cage) (optional)

Parameters

nametypedefaultrangedescription
resolutionivec2[1024,1024]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
supersampleint11..4samples per texel along each axis (2 = 4 samples averaged: smoother edges, 4× the work)
aliases: ssaa antialiasing subsampling
paddingint40..256dilate islands by this many texels (no background bleeding in mipmaps)
aliases: dilation margin edge_padding
uv_attribstring"uv"vertex or point uv attribute to bake into
aliases: uv_name uvattrib
groupgroup (prim)""prims to bake ("" = all); the others leave their texels empty
keep_meshboolfalseoutput the input mesh with the image added (off: only the image)
aliases: keep_input keep
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
radiusfloat00..how far an edge reaches across the surface (metres; 0 = auto: 1% of the bbox diagonal)
aliases: width edge_width distance
strengthfloat10..contrast multiplier
aliases: intensity contrast
methodenum"dihedral"dihedral: the angles of the mesh edges near the texel; surface: how the shading normals turn within radius (facets smaller than radius do not show: decimated and isosurface meshes; other parts count where they are not buried, so junctions read concave; radius at most half the size of the model)
options: dihedral surface
aliases: mode curvature_method
min_anglefloat0.50..179dihedral: edges bending less than this (degrees) are ignored
intersectionsbooltruedihedral: also find the concave creases where separate parts cut into each other (kitbashed meshes)
aliases: crossings intersection_creases
tilebooltruetrim sheets: a band that tiles is copied one period past each open end, so curvature does not fade there (no effect without trim bands). Help topic trim_sheets.
cagefloat00..high-res input: search distance along the cage normals on each side (metres; 0 = auto: 2% of the bbox diagonal)
aliases: cage_distance max_frontal_distance ray_distance
cage_normalsenum"averaged"high-res input: ray directions: averaged normals over every face at a position (no gaps at hard edges) or the mesh's own normals
options: averaged mesh
aliases: ray_normals average_normals
cage_attribstring"cage"high-res input: a float attribute of the mesh (prim, point or vertex) that sets the cage where it is above 0, e.g. per part with attrib_create {name:"cage", class:"prim", group:"@name=grip", value:0.03}
aliases: cage_attribute
match_nameboolfalsehigh-res input: each piece projects only onto the high prims with the same prim "name" (parts sharing one atlas do not pick up their neighbours)
aliases: match_names by_name

Writes: image <name> (default: the node name): C grey (0.5 = flat), convex, concave, mask

Example

{
  "nodes": {
    "box": { "type": "box" },
    "pocket": {
      "type": "poly_extrude",
      "in": ["box"],
      "params": { "group": "@P.y>0.4", "distance": -0.2, "inset": 0.15 }
    },
    "uv": { "type": "uv_unwrap", "in": ["pocket"] },
    "curv": {
      "type": "bake_curvature",
      "in": ["uv"],
      "params": { "resolution": 512 }
    }
  },
  "output": "curv"
}

bake_edge_wear#

aliases: edge_wear edge_wear_bake bake_wear bake_chips

Paint wear on edges into uv space: edges measured on the shape at a radius, broken up in 3D into worn stretches and ragged chips, with nested chip, bare and core layers and more wear on the edges near handled parts.

Input 0 needs non-overlapping uv in 0..1 (uv_unwrap); layer "mask" holds the coverage, and the image carries the metres its width covers (the size of a typical texel times the width: inspect shows it), which every texture node after it reads its lengths in metres against. Bakes that read a high-res mesh on input 1 add layer "missed": 1 where the cage ray found no high surface (stat missed); cage_attrib sets the cage per part and match_name keeps each named piece to the high prims of its name. C is the wear field 0..1 (continuous), as the shape gives it: amount and the cap below never change it, so a mask can read it as a stable field. The layers chip (the top coat is gone: 1 where C passes the threshold set by amount), bare (down to the substrate, bare_step deeper into the field) and core (the deepest part of each chip, core_step deeper: where rust starts) lie inside one another texel for texel (the primer ring is chip − bare); convex and concave (curvature at radius, 0..1: 1 = a 90° edge or crease; with method surface gentle bends, under about 0.2, may read 0), handled (the focus field, 1 on the focus prims fading to 0 at focus_radius), texel, island and mask. A larger amount only adds wear. Edges come from method surface (how the shading normals turn within radius, on a cloud of surface points as bake_measure curvature, made denser along the bends the mesh itself shows, so the result does not depend on the uv layout or the texel density: smooth-shaded facets read as the round they stand for, hard edges count, a junction between parts reads concave and gets no chips) or dihedral (the mesh's edge angles within max(radius, reach), as bake_curvature; there reach only widens that radius, with no falloff, and the focus does not extend it). With method surface wear reaches reach in from an edge inside its part, never past halfway to the edge across from it, fading out smoothly; large 3D patches (patch_size, patchiness) decide which stretches of edge wear, and a 3D noise at chip_size, its outline warped by raggedness, breaks them into chips, so the outlines follow the shape in 3D, never the triangles, and are the same on both sides of a uv seam and wherever the part is placed. No face wears through: on every face (the surface between hard edges or bends of 20° or more; a bevel or round belongs to the face it leads to; a piece with no face at all, a bar a few radii across, counts as one) chips cover at most a third of its area from amount 0.8 (a sixth at 0.4; held at the sample points, so counted in texels a face can read a few hundredths more, up to about 0.36), its most worn texels: corners first, then the edges, so a small feature (a boss, a nut, a bar) keeps paint on its faces while a large body is never held back. Where that cap holds, more amount still wears deeper: bare and core grow toward the chip outline inside the same share. C is the raw wear field and is never capped (a small part can read about 0.96 all over it), so a preset or layer stack takes the cap from chip, bare and core. Faces pressed flush against another face (lying on each other within 0.1 mm, facing opposite ways: stacked boxes, a part on a plate; never the front and back of a sheet) are buried and take no wear, so the seam between them is no edge. focus multiplies the edge wear near the focus prims (focus_amount, within focus_radius), makes the chip outlines there more ragged, lets wear reach up to (1 + 1.5 × focus_amount) × reach in from the edges there, and adds only a light rub (0.12 × focus_amount in C) to flats, which never chip. Input 1 (surroundings) buries the points inside it, as in bake_measure, and lets the two bakes share their work. Warns once when hard-shaded facets of curved parts would chip (bending 24° or more, at a radius under twice their size), naming the worst three. Refuses a radius that would place more than 6 million points along the bends. Stats chip_share, bare_share, core_share (covered samples at 0.5 or more), capped_faces (faces held under the cap), dense_points. Stops at the time limit of long-running nodes, counted from the end of the setup every bake shares (sampling the atlas, which always finishes: at 2048 a few hundred ms); a cook that changes only amount reuses the wear field.

Inputs

#namedescription
0geomesh to bake (needs uv without overlaps: uv_unwrap or uv_layout)
1surroundingsoptional: geometry around the mesh (a wall, the ground); points inside it are buried and do not wear (optional)

Parameters

nametypedefaultrangedescription
resolutionivec2[1024,1024]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
supersampleint11..4samples per texel along each axis (2 = 4 samples averaged: smoother edges, 4× the work)
aliases: ssaa antialiasing subsampling
paddingint40..256dilate islands by this many texels (no background bleeding in mipmaps)
aliases: dilation margin edge_padding
uv_attribstring"uv"vertex or point uv attribute to bake into
aliases: uv_name uvattrib
groupgroup (prim)""prims to bake ("" = all); the others leave their texels empty
keep_meshboolfalseoutput the input mesh with the image added (off: only the image)
aliases: keep_input keep
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
amountfloat0.50..1how much of the edge length wears (moves the chip threshold: 0 none, 1 every edge out to reach; at most about a third of any face chips)
aliases: wear strength
radiusfloat0.0040..the scale edges are measured at (metres): 4 mm catches 1 to 3 mm bevels on sheet metal; cast parts want 6 to 8 mm
aliases: edge_radius
methodenum"surface"surface: from the shading normals over radius (smooth-shaded facets do not count; decimated, isosurface and clean meshes); dihedral: the mesh's edge angles, as bake_curvature
options: surface dihedral
aliases: mode curvature_method
reachfloat0.0080..how far wear reaches in from an edge at amount 1 (metres; with method dihedral it only widens the radius the edge angles are read over)
aliases: wear_reach
chip_sizefloat0.0060..size of the chips that break the wear up (metres)
aliases: chip_scale breakup_size
raggednessfloat0.50..1how ragged the chip outlines are (domain warp)
aliases: ragged warp
patchinessfloat0.50..1how strongly large patches decide which stretches of edge wear (0: every edge alike)
aliases: patches
patch_sizefloat0.150..size of those patches (metres)
aliases: patch_scale
bare_stepfloat0.120..1how much deeper into the wear field bare starts (a thin primer ring around it)
core_stepfloat0.30..1how much deeper core starts (at least bare_step: small cores inside the bare metal)
focusgroup (prim)""prims touched by hands or tools ("@name=latch"): edges near them wear more
focus_radiusfloat0.10..reach of the focus (metres; 0 = the focus prims only)
focus_amountfloat0.50..1extra wear near the focus: edges there wear up to 1 + focus_amount times as much
seedfloat0changes the patches and chips, not the amount

Writes: image <name> (default: the node name): C = wear field, chip, bare, core, convex, concave, handled, texel, island, mask

Example

{
  "nodes": {
    "box": { "type": "box", "params": { "size": [0.4, 0.3, 0.3] } },
    "bevel": {
      "type": "poly_bevel",
      "in": ["box"],
      "params": { "offset": 0.004 }
    },
    "uv": { "type": "uv_unwrap", "in": ["bevel"] },
    "wear": {
      "type": "bake_edge_wear",
      "in": ["uv"],
      "params": { "resolution": 256, "amount": 0.6 }
    }
  },
  "output": "wear"
}

Used in the example worn_machine.

bake_flow#

aliases: flow_bake bake_runs bake_drips bake_streaks bake_rust_runs

Bake runs that flow down the surface under gravity from source parts (rust under bolts, rain streaks under a ledge): traced in 3D across uv seams, varied in length and width, thin, breaking up, pooling on ledges.

Runs start at the source parts (sources: a prim group of input 0, e.g. "@name=bolt* @name=hinge*"; or points or a mesh on input 1) where they touch another surface within 1 cm, one every 1 / density metres along each part (at least one per part), and walk down the receiving surface (every prim that is not a source): gravity projected onto the surface, bent sideways by 3D noise (wobble), snapped back onto the mesh, over edges and across uv seams, around bosses and over the underside of a lip. Spread gives each run its own sideways lean, and meander adds a side-to-side wave whose wavelength in metres is set by meander_length. A surface whose normal is within ledge degrees of up stops the run, where it pools; a pool whose ledge has an edge within the spill reach (metres) spills over the edge nearest to it and the run goes on below with less strength; a source standing on a ledge starts a pool and does the same; at an overhang (a face turned down) it drips along gravity onto the surface below and goes on. A run is drawn from where it comes out from under its source part. Each run has its own length (length range; a random strength 0..1 makes the stronger ones the longer), width (width range: a little wider at the head, tapering to 30 % at the tail) and a strength that dies away along it so the end is soft (unless the run ends in a pool), gaps (breakup) and wander. Image layers: C = the run mask 0..1 (box-filtered over the texel, so thin runs stay thin at any resolution); along = 0 at the source to 1 at the tail; head = strong near the source (stain heads: (1 - along / 0.35)² × C); strength = the run's random 0..1 (a threshold picks how many runs show, without tracing again); id = a number that names the run (a hash of where it starts, so it stays when other parts are added or reordered; 0 = none); stain (with stain above 0) = a broad faint stain around the runs, a mean like C; mask = coverage; with supersample along, strength and id are those of the run that covers the texel most, never a mean. The source parts themselves bake 0. Water goes down the geometry, not down authored normals: the flow direction comes from face normals, smoothed only between faces that meet within 40°, so a face wound the wrong way reads as turned down and lets water through. The bottom of a groove whose sides are steeper than ledge pools, and runs on along it when it slopes. The metre constants of a run (gaps, wobble, the swell at its head) follow the width and length ranges, so a run looks the same at any scale. Everything is measured in 3D at the texel, so no uv seam shows; the same seed gives the same runs, and another seed moves them. Input 0 needs non-overlapping uv in 0..1 (uv_unwrap).

Inputs

#namedescription
0geomesh with uv; its prims that are not sources are the surface the runs flow on
1sourceswhere runs start (points or a mesh) when sources is empty (optional)

Parameters

nametypedefaultrangedescription
resolutionivec2[1024,1024]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
supersampleint11..4samples per texel along each axis (2 = 4 samples averaged: smoother edges, 4× the work)
aliases: ssaa antialiasing subsampling
paddingint40..256dilate islands by this many texels (no background bleeding in mipmaps)
aliases: dilation margin edge_padding
uv_attribstring"uv"vertex or point uv attribute to bake into
aliases: uv_name uvattrib
groupgroup (prim)""prims to bake ("" = all); the others leave their texels empty
keep_meshboolfalseoutput the input mesh with the image added (off: only the image)
aliases: keep_input keep
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
sourcesgroup (prim)""prims of input 0 the runs start from, e.g. "@name=bolt* @name=hinge*" ("" = input 1); they bake 0 and the runs flow on every other prim
densityfloat400..2000runs per metre of source part where it meets the surface (40 = one every 2.5 cm: a bolt gets one or two, a hinge four or five)
aliases: count runs_per_metre frequency
directionvec3[0,-1,0]gravity: the way the runs flow
aliases: gravity dir
lengthvec2[0.05,0.25]0..100range of the drawn length per run in metres, from where it comes out from under its source (the longer runs are the stronger)
aliases: run_length length_range
widthvec2[0.003,0.01]0..5range of the run width at the head in metres; runs taper to 30 % at the tail
aliases: run_width width_range
wobblefloat0.30..1sideways wander of a run from 3D noise (0 = no noise)
aliases: wander
spreadfloat00..2maximum random sideways slope per run (0 adds no lean, 0.5 is about 27°). Use with meander for rain running down a rough wall
meanderfloat00..2how much each run curves side to side, as a slope (1 is about 45° at its steepest, 0 turns the wave off)
meander_lengthfloat0.060.005..5wavelength of the meander in metres, independent of run size
breakupfloat0.40..1gaps along a run and a wandering width (3D noise); the gaps grow toward the tail; 0 = unbroken
aliases: break_up gaps raggedness
ledgefloat300..90a surface whose normal is within this many degrees of up stops the run, which pools there (a 30° slope still sheds water)
aliases: ledge_angle stop_angle
poolfloat1.51..10width multiplier of the pool where a run stops on a ledge
aliases: pool_width puddle
dripbooltruea run reaching an overhang (a face turned down) falls along the direction to the next surface below and goes on; off: it ends there
aliases: drips
stepfloat00..5walking step in metres (0 = half the smallest width)
aliases: step_size
spillfloat0.050..50a pool on a ledge (or a source standing on one) whose nearest edge is within this many metres spills over that edge and runs on down the surface below with 65 % of the strength; a ledge wider than this keeps the pool; 0 = pools stay where they are
aliases: spill_reach overflow
seedint00..2147483647seed of the run starts, lengths, widths, wander and gaps
stainfloat00..20a broad faint stain around each run, its half width this many times the run's head width (0 = none; a spill wider than 1.5 times the widest width counts as that): layer stain, widest at the head and narrowing to under half down the run, no gaps, fading sideways and to nothing at the tail; where stains meet they add up (1 − Π(1 − v)), so many runs under an edge merge into a wash
aliases: stain_width halo
stain_skewfloat00..8each run's stain times its strength (0..1; the longer runs are the stronger) to this power: 0 = every stain alike, 2 = most faint and a few strong
aliases: stain_contrast

Writes: image <name> (default: the node name): C run mask 0..1, along, head, strength, id, mask (and stain when asked for)

Example

{
  "nodes": {
    "wall": { "type": "box", "params": { "size": [0.6, 0.6, 0.05] } },
    "wall_named": {
      "type": "attrib_create",
      "in": ["wall"],
      "params": { "name": "name", "class": "prim", "value": "wall" }
    },
    "bolt": {
      "type": "box",
      "params": { "size": [0.03, 0.03, 0.012], "center": [0, 0.1, 0.03] }
    },
    "bolt_named": {
      "type": "attrib_create",
      "in": ["bolt"],
      "params": { "name": "name", "class": "prim", "value": "bolt" }
    },
    "parts": { "type": "merge", "in": ["wall_named", "bolt_named"] },
    "uv": { "type": "uv_unwrap", "in": ["parts"] },
    "runs": {
      "type": "bake_flow",
      "in": ["uv"],
      "params": { "sources": "@name=bolt", "resolution": 256 }
    }
  },
  "output": "runs"
}

bake_height#

aliases: height_bake bake_displacement displacement_bake

Bake the height of a high-res mesh (input 1) above the low mesh along its normals: a displacement / height map.

Substance Painter "Height". Input 0 needs non-overlapping uv in 0..1 (uv_unwrap); layer "mask" holds the coverage, and the image carries the metres its width covers (the size of a typical texel times the width: inspect shows it), which every texture node after it reads its lengths in metres against. Bakes that read a high-res mesh on input 1 add layer "missed": 1 where the cage ray found no high surface (stat missed); cage_attrib sets the cage per part and match_name keeps each named piece to the high prims of its name. Rays along the low normals within ±cage find the high surface; layer "distance" holds the signed distance in metres (0 on a miss) and C maps it to 0..1: mode cage = 0.5 + d / (2 cage) (0.5 = on the low surface), normalize = the min..max of the hits (stats height_min / height_max). Feed tex_normal_from_height or use it as displacement.

Inputs

#namedescription
0geomesh to bake (needs uv without overlaps: uv_unwrap or uv_layout)
1highoptional high-res source, near the mesh (within cage) (optional)

Parameters

nametypedefaultrangedescription
resolutionivec2[1024,1024]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
supersampleint11..4samples per texel along each axis (2 = 4 samples averaged: smoother edges, 4× the work)
aliases: ssaa antialiasing subsampling
paddingint40..256dilate islands by this many texels (no background bleeding in mipmaps)
aliases: dilation margin edge_padding
uv_attribstring"uv"vertex or point uv attribute to bake into
aliases: uv_name uvattrib
groupgroup (prim)""prims to bake ("" = all); the others leave their texels empty
keep_meshboolfalseoutput the input mesh with the image added (off: only the image)
aliases: keep_input keep
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
cagefloat00..high-res input: search distance along the cage normals on each side (metres; 0 = auto: 2% of the bbox diagonal)
aliases: cage_distance max_frontal_distance ray_distance
cage_normalsenum"averaged"high-res input: ray directions: averaged normals over every face at a position (no gaps at hard edges) or the mesh's own normals
options: averaged mesh
aliases: ray_normals average_normals
cage_attribstring"cage"high-res input: a float attribute of the mesh (prim, point or vertex) that sets the cage where it is above 0, e.g. per part with attrib_create {name:"cage", class:"prim", group:"@name=grip", value:0.03}
aliases: cage_attribute
match_nameboolfalsehigh-res input: each piece projects only onto the high prims with the same prim "name" (parts sharing one atlas do not pick up their neighbours)
aliases: match_names by_name
modeenum"cage"how distances map to 0..1
options: cage normalize
aliases: range

Writes: image <name> (default: the node name): C grey 0..1, distance (metres), mask

Example

{
  "nodes": {
    "low": { "type": "box", "params": { "divisions": [2, 2, 2] } },
    "uv": { "type": "uv_unwrap", "in": ["low"] },
    "smooth": { "type": "subdivide", "in": ["low"], "params": { "levels": 3 } },
    "high": {
      "type": "noise_displace",
      "in": ["smooth"],
      "params": { "amplitude": 0.05, "frequency": 6 }
    },
    "height": {
      "type": "bake_height",
      "in": ["uv", "high"],
      "params": { "resolution": 256, "cage": 0.4 }
    }
  },
  "output": "height"
}

bake_island_id#

aliases: island_id_bake bake_id id_bake bake_uv_islands

Bake uv islands as random flat colours (an ID map for masking per island), with the island number in layer "id".

Substance Painter "ID" (by uv island). Input 0 needs non-overlapping uv in 0..1 (uv_unwrap); layer "mask" holds the coverage, and the image carries the metres its width covers (the size of a typical texel times the width: inspect shows it), which every texture node after it reads its lengths in metres against. Bakes that read a high-res mesh on input 1 add layer "missed": 1 where the cage ray found no high surface (stat missed); cage_attrib sets the cage per part and match_name keeps each named piece to the high prims of its name. Islands are triangles connected through corners that share a point and a uv. C is a random colour per island (seed), layer "id" the island number 0..n-1 (the stat islands counts them).

Inputs

#namedescription
0geomesh to bake (needs uv without overlaps: uv_unwrap or uv_layout)

Parameters

nametypedefaultrangedescription
resolutionivec2[1024,1024]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
supersampleint11..4samples per texel along each axis (2 = 4 samples averaged: smoother edges, 4× the work)
aliases: ssaa antialiasing subsampling
paddingint40..256dilate islands by this many texels (no background bleeding in mipmaps)
aliases: dilation margin edge_padding
uv_attribstring"uv"vertex or point uv attribute to bake into
aliases: uv_name uvattrib
groupgroup (prim)""prims to bake ("" = all); the others leave their texels empty
keep_meshboolfalseoutput the input mesh with the image added (off: only the image)
aliases: keep_input keep
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
seedfloat0random seed

Writes: image <name> (default: the node name): C RGBA, id (island number), mask

Example

{
  "nodes": {
    "crate": { "type": "topotopo/props/crate" },
    "uv": { "type": "uv_unwrap", "in": ["crate"] },
    "ids": {
      "type": "bake_island_id",
      "in": ["uv"],
      "params": { "resolution": 256 }
    }
  },
  "output": "ids"
}

bake_mask#

aliases: mask_bake bake_group bake_attribute attribute_bake

Bake a mask into uv space from a prim group (1 inside) or a numeric attribute (its value), e.g. to paint per-part materials.

Substance Painter "ID" (by group / attribute). Input 0 needs non-overlapping uv in 0..1 (uv_unwrap); layer "mask" holds the coverage, and the image carries the metres its width covers (the size of a typical texel times the width: inspect shows it), which every texture node after it reads its lengths in metres against. Bakes that read a high-res mesh on input 1 add layer "missed": 1 where the cage ray found no high surface (stat missed); cage_attrib sets the cage per part and match_name keeps each named piece to the high prims of its name. mask_group (a prim group pattern) gives 1 where any of its prims covers the texel and 0 elsewhere, so overlapping region prims add up instead of the topmost one winning; else attrib (point, vertex, prim or detail; component picks one of a vector, -1 = luminance) is interpolated as it is; with neither, C is the coverage itself.

Inputs

#namedescription
0geomesh to bake (needs uv without overlaps: uv_unwrap or uv_layout)

Parameters

nametypedefaultrangedescription
resolutionivec2[1024,1024]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
supersampleint11..4samples per texel along each axis (2 = 4 samples averaged: smoother edges, 4× the work)
aliases: ssaa antialiasing subsampling
paddingint40..256dilate islands by this many texels (no background bleeding in mipmaps)
aliases: dilation margin edge_padding
uv_attribstring"uv"vertex or point uv attribute to bake into
aliases: uv_name uvattrib
groupgroup (prim)""prims to bake ("" = all); the others leave their texels empty
keep_meshboolfalseoutput the input mesh with the image added (off: only the image)
aliases: keep_input keep
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
mask_groupgroup (prim)""prims that read 1 (e.g. "planks", "@P.y>0.5")
aliases: from_group mask_prims
attribstring""numeric attribute to bake when mask_group is empty; a comma list ("wear, dirt") bakes one layer per attribute, named after it, C = the first
aliases: attribute from_attrib
componentint0-1..15vector component of attrib (-1 = luminance of the first three)

Writes: image <name> (default: the node name): C grey, mask; with an attrib list also one layer per attribute

Example

{
  "nodes": {
    "box": { "type": "box" },
    "uv": { "type": "uv_unwrap", "in": ["box"] },
    "top": {
      "type": "bake_mask",
      "in": ["uv"],
      "params": {
        "resolution": 256,
        "mask_group": "@P.y>0.4",
        "name": "top_mask"
      }
    }
  },
  "output": "top"
}

Used in the examples ocean_surface, worn_machine.

bake_material#

aliases: material_bake bake_materials bake_material_table

Bake the material table into uv space: base colour, roughness and metallic from each prim's material, a 0/1 mask per material and per kind, and the texel size and uv island of every texel.

Reads the prim attribute "material" and the detail table "materials" (the material node) and writes, in the uv space of the mesh (uv_attrib): C = the base colour (RGBA; where a material's base colour map is an "image:<name>" the geometry carries, the colour it shows), layer "roughness" and layer "metallic" (the material's values; a packed orm map gives roughness from its green and metallic from its blue channel times the factors, a roughness map its green channel), a 0/1 layer "mat_<material>" per material the baked prims use and a 0/1 layer "kind_<kind>" per kind present (masks: all, materials, kinds or none), layer "texel" (R = metres one texel covers along u, G along v, at that texel: tex_layers builds its normal map from it, so a step has the same slope at any resolution and on any shape of image) and layer "island" (the uv island, so a filter can stay on one). Maps are read with the uv attribute map_uv ("uv": the uv the maps of a material use), whatever uv_attrib the bake is laid out with, at uv / tile when the material states the metres one repeat covers (its tile field: a metric uv and tiling maps). A packed map is read by the packing of its material (orm by default; hro, rma, moxs or any letters o, r, m, h, s, x): roughness and metallic as above, its occlusion into layer "occlusion" and its height into layer "height" (written when some material has them; 1 and 0.5 elsewhere). The normal map of a material is carried into layer "normal" (RGBA, OpenGL, written when some material has one): the map normal of each sample is turned from the tangent frame of map_uv into the tangent frame of the uv of the bake (MikkTSpace of each uv with the vertex normals of the mesh, cusp 60°, as exporters and engines compute it; a directx map is flipped first), so tex_layers keeps the detail under its layers. Layer names are valid identifiers (a material "Paint.001" is "mat_Paint_001"; a warning lists the renames and two materials never share a name). A texel that two materials share takes the first sample's material for the labels (as bake_island_id does for ids); colours are averaged over the samples. The kind of a material is, in this order, the kinds entry for its name, its own kind field (the material node's kind param), its whole name when that is a kind or one of its names (painted_steel, paint, rubber, label …); a material that none tells has no kind layer. Input 0 needs non-overlapping uv in 0..1 (uv_unwrap); layer "mask" holds the coverage, and the image carries the metres its width covers (the size of a typical texel times the width: inspect shows it), which every texture node after it reads its lengths in metres against. Bakes that read a high-res mesh on input 1 add layer "missed": 1 where the cage ray found no high surface (stat missed); cage_attrib sets the cage per part and match_name keeps each named piece to the high prims of its name. This is the base of tex_layers (its input 0), which reads layers roughness and metallic as the base values, texel and island for the normal, mask as coverage, and the masks mat_* and kind_* in its expressions. Faces whose uv overlap are warned about (a texel they share holds the last one's values). Stats: size (the metres the image width covers: the median texel size over the image's texels times the width, which the image carries for the filters after it) and texel_mm.

Inputs

#namedescription
0geomesh to bake (needs uv without overlaps: uv_unwrap or uv_layout)

Parameters

nametypedefaultrangedescription
resolutionivec2[1024,1024]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
supersampleint11..4samples per texel along each axis (2 = 4 samples averaged: smoother edges, 4× the work)
aliases: ssaa antialiasing subsampling
paddingint40..256dilate islands by this many texels (no background bleeding in mipmaps)
aliases: dilation margin edge_padding
uv_attribstring"uv"vertex or point uv attribute to bake into
aliases: uv_name uvattrib
groupgroup (prim)""prims to bake ("" = all); the others leave their texels empty
keep_meshboolfalseoutput the input mesh with the image added (off: only the image)
aliases: keep_input keep
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
kindsjson{}kind per material name, e.g. {"zinc_steel": "galvanised"}; wins over the material's own kind (kinds: painted_metal, cast_metal, galvanised, bare_steel, stainless, plastic, rubber, concrete, painted_concrete, painted_plaster, painted_wood, bare_wood, asphalt, ceramic, decal, keep)
aliases: material_kinds
map_uvstring"uv"the uv attribute the maps of the materials are read with (they may tile on it); the bake itself is laid out on uv_attrib
aliases: maps_uv texture_uv
masksenum"all"which 0/1 mask layers to write: mat_<material>, kind_<kind>, both or neither
options: all materials kinds none
aliases: mask_layers labels

Writes: image <name> (default: the node name): C base colour RGBA, roughness, metallic, occlusion and height (when a packed map has them), normal (when a material has a normal map), mat_<material> (0/1 per material), kind_<kind> (0/1 per kind present), texel (RGBA: R metres per texel along u, G along v), island, mask; stats size, texel_mm, texels, coverage

Example

{
  "nodes": {
    "box": { "type": "box" },
    "paint": {
      "type": "material",
      "in": ["box"],
      "params": {
        "name": "paint",
        "base_color": "#6f8fae",
        "roughness": 0.55,
        "kind": "painted_metal",
        "group": "@P.y>0.4"
      }
    },
    "steel": {
      "type": "material",
      "in": ["paint"],
      "params": {
        "name": "steel",
        "base_color": "#9a9a96",
        "roughness": 0.35,
        "metallic": 1,
        "kind": "bare_steel",
        "group": "@P.y<0.4"
      }
    },
    "uv": { "type": "uv_unwrap", "in": ["steel"] },
    "base": {
      "type": "bake_material",
      "in": ["uv"],
      "params": { "resolution": 256 }
    }
  },
  "output": "base"
}

Used in the example worn_machine.

bake_measure#

aliases: bake_measures bake_noise bake_distance bake_cavity bake_shelter bake_visibility

Measure the model in 3D at every texel into named layers: facing, height, distance to parts, 3D noise, occlusion, cavity, shelter, visibility, curvature at a radius, group. Ray measures share one set of rays; uv seams never show.

Input 0 needs non-overlapping uv in 0..1 (uv_unwrap); layer "mask" holds the coverage, and the image carries the metres its width covers (the size of a typical texel times the width: inspect shows it), which every texture node after it reads its lengths in metres against. Bakes that read a high-res mesh on input 1 add layer "missed": 1 where the cage ray found no high surface (stat missed); cage_attrib sets the cage per part and match_name keeps each named piece to the high prims of its name. measures is a list of objects, each {"by": kind, "name": layer, …}; the image gets one layer per measure (C = the first), then "texel" (metres per texel along u and v), "island" (uv island) and "mask". Kinds and their own 0..1: facing (1 toward direction, 0 away; band units: degrees between the normal and direction), height (0 at input 0's lowest point, 1 at its highest along up; metres), distance (1 at the target, 0 at range; metres), noise (3D, 0..1, continuous across seams and triangles), occlusion (1 = open, as bake_ao), cavity (1 = in a crevice), shelter (1 = covered from direction within cone; the part of the cone behind the surface counts as covered), visibility (1 = seen from outside: a quarter of the hemisphere escaping the model and input 1 counts as fully seen), curvature (as bake_curvature method surface; band units: the signed value, 1 = a 90° convex edge; radius at most half the model's size), group (1 on pattern). Each value is shaped like the point mask node: min/max/falloff make a band in the measure's units (unset = its own 0..1), then ramp, then invert, then where (0 outside). Facing, height, distance, noise and group are evaluated per texel; occlusion, cavity, shelter, visibility and curvature on a cloud of surface points every spacing metres (default 4 texels at this resolution, at least 0.5 mm; denser where the atlas gives more texels, never sparser than spacing where it gives fewer) and taken to each texel from the cloud points of its own part within 2 × spacing that face its way, so values do not bleed around edges or onto the far side of a plate. A point inside another part (a post sunk into a plate) is buried: it reads covered and no texel that is seen takes its value; curvature counts the points of every part that are not buried, so a junction between parts reads concave. Every ray measure counts over one set of samples cosine-weighted rays per cloud point; shelter casts its own cone. Input 1 (surroundings: a wall, the ground) blocks rays, and a face lying flat against it and facing it counts as covered. Results do not depend on prim order. Faces wound against their neighbours are measured turned and reported; a closed part that faces inward is reported, not turned. Stops at the time limit of long-running nodes. Fields: name (layer name (default: the by value)); min (band in the measure's units: 1 inside [min, max]); max (band in the measure's units: 1 inside [min, max]); falloff (linear fade to 0 outside the band, in the measure's units); ramp (reshape the 0..1 value); invert (write 1 − value); where (prims where the measure applies; 0 elsewhere); direction (facing, shelter: the direction measured against); cone (shelter: half-angle of the cone around direction (degrees)); up (height: the axis); target (distance: prims of input 0 ("@name=bolt*") or "input1"); range (distance: metres at which the unbanded value reaches 0); max_distance (ray measures: hits farther than this do not count (metres; 0 = occlusion 0.25, cavity 0.02, shelter and visibility unlimited)); noise (noise: the basis); fractal (noise: how octaves combine); size (noise: feature size in metres per axis ([0.005, 0.15, 0.005] = vertical streaks)); octaves (noise: octaves); roughness (noise: amplitude kept per octave); radius (curvature: the scale the shape is measured at (metres)); side (curvature: both (0.5 = flat), convex or concave (0..1)); pattern (group: prims that read 1).

Inputs

#namedescription
0geomesh to bake (needs uv without overlaps: uv_unwrap or uv_layout)
1surroundingsoptional: geometry that blocks rays (a wall, the ground, neighbours) and can be a distance target ("input1") (optional)

Parameters

nametypedefaultrangedescription
resolutionivec2[1024,1024]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
supersampleint11..4samples per texel along each axis (2 = 4 samples averaged: smoother edges, 4× the work)
aliases: ssaa antialiasing subsampling
paddingint40..256dilate islands by this many texels (no background bleeding in mipmaps)
aliases: dilation margin edge_padding
uv_attribstring"uv"vertex or point uv attribute to bake into
aliases: uv_name uvattrib
groupgroup (prim)""prims to bake ("" = all); the others leave their texels empty
keep_meshboolfalseoutput the input mesh with the image added (off: only the image)
aliases: keep_input keep
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
measuresjson[{"by":"occlusion"}]the measures: [{"by": "occlusion"}, {"by": "facing", "name": "top", "min": 0, "max": 30, "falloff": 15}, {"by": "noise", "name": "grain", "size": [0.005, 0.15, 0.005]}]
aliases: measure masks layers
samplesint324..256rays per cloud point, shared by every ray measure (each texel averages several cloud points)
aliases: rays
spacingfloat00..distance between cloud points for ray and curvature measures (metres; 0 = 4 texels at this resolution, at least 0.5 mm)
aliases: cloud_spacing
seedfloat0ray and noise seed

Writes: image <name> (default: the node name): C = the first measure, one layer per measure, texel, island, mask

Example

{
  "nodes": {
    "box": { "type": "box" },
    "pocket": {
      "type": "poly_extrude",
      "in": ["box"],
      "params": { "group": "@P.y>0.4", "distance": -0.2, "inset": 0.15 }
    },
    "uv": { "type": "uv_unwrap", "in": ["pocket"] },
    "measure": {
      "type": "bake_measure",
      "in": ["uv"],
      "params": {
        "resolution": 256,
        "samples": 16,
        "measures": [
          { "by": "occlusion" },
          { "by": "facing", "name": "top", "min": 0, "max": 30, "falloff": 20 },
          { "by": "noise", "name": "grain", "size": [0.1, 0.1, 0.1] },
          { "by": "curvature", "name": "edges", "radius": 0.05 }
        ]
      }
    }
  },
  "output": "measure"
}

Used in the examples rusty_drum, worn_machine.

bake_normal#

aliases: normal_bake bake_tangent_normal bake_normal_map

Bake a tangent-space normal map from a high-res mesh (input 1) onto the uv of the low mesh: OpenGL or DirectX.

Substance Painter / Marmoset "Normal". Input 0 needs non-overlapping uv in 0..1 (uv_unwrap); layer "mask" holds the coverage, and the image carries the metres its width covers (the size of a typical texel times the width: inspect shows it), which every texture node after it reads its lengths in metres against. Bakes that read a high-res mesh on input 1 add layer "missed": 1 where the cage ray found no high surface (stat missed); cage_attrib sets the cage per part and match_name keeps each named piece to the high prims of its name. For each texel a ray from cage above the low surface along -N finds the high-res surface (within cage below); its interpolated normal is written in the low mesh's MikkTSpace tangent frame as 0.5 + 0.5 n: the frame glTF export writes as TANGENT and Blender, Unreal and Unity compute, so the map decodes the same everywhere (N interpolated and normalised, T the interpolated MikkTSpace tangent made perpendicular to N, B = w · N × T). Misses and a missing input 1 give the flat (0.5, 0.5, 1). glTF and Blender read OpenGL; Unreal DirectX (or flip green on import).

Inputs

#namedescription
0geomesh to bake (needs uv without overlaps: uv_unwrap or uv_layout)
1highoptional high-res source, near the mesh (within cage) (optional)

Parameters

nametypedefaultrangedescription
resolutionivec2[1024,1024]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
supersampleint11..4samples per texel along each axis (2 = 4 samples averaged: smoother edges, 4× the work)
aliases: ssaa antialiasing subsampling
paddingint40..256dilate islands by this many texels (no background bleeding in mipmaps)
aliases: dilation margin edge_padding
uv_attribstring"uv"vertex or point uv attribute to bake into
aliases: uv_name uvattrib
groupgroup (prim)""prims to bake ("" = all); the others leave their texels empty
keep_meshboolfalseoutput the input mesh with the image added (off: only the image)
aliases: keep_input keep
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
cagefloat00..high-res input: search distance along the cage normals on each side (metres; 0 = auto: 2% of the bbox diagonal)
aliases: cage_distance max_frontal_distance ray_distance
cage_normalsenum"averaged"high-res input: ray directions: averaged normals over every face at a position (no gaps at hard edges) or the mesh's own normals
options: averaged mesh
aliases: ray_normals average_normals
cage_attribstring"cage"high-res input: a float attribute of the mesh (prim, point or vertex) that sets the cage where it is above 0, e.g. per part with attrib_create {name:"cage", class:"prim", group:"@name=grip", value:0.03}
aliases: cage_attribute
match_nameboolfalsehigh-res input: each piece projects only onto the high prims with the same prim "name" (parts sharing one atlas do not pick up their neighbours)
aliases: match_names by_name
formatenum"opengl"green channel convention
options: opengl directx
aliases: convention

Writes: image <name> (default: the node name): C RGBA, mask

Example

{
  "nodes": {
    "low": { "type": "box", "params": { "divisions": [2, 2, 2] } },
    "uv": { "type": "uv_unwrap", "in": ["low"] },
    "high": { "type": "subdivide", "in": ["low"], "params": { "levels": 3 } },
    "nrm": {
      "type": "bake_normal",
      "in": ["uv", "high"],
      "params": { "resolution": 512, "cage": 0.4 }
    }
  },
  "output": "nrm"
}

bake_position#

aliases: position_bake bake_world_position

Bake world position into uv space as RGB (bbox-normalised by default): gradients, masks by height or direction.

Substance Painter "Position". Input 0 needs non-overlapping uv in 0..1 (uv_unwrap); layer "mask" holds the coverage, and the image carries the metres its width covers (the size of a typical texel times the width: inspect shows it), which every texture node after it reads its lengths in metres against. Bakes that read a high-res mesh on input 1 add layer "missed": 1 where the cage ray found no high surface (stat missed); cage_attrib sets the cage per part and match_name keeps each named piece to the high prims of its name. mode bbox maps each axis of the bounding box to 0..1 (R = X, G = Y, B = Z), uniform maps the largest axis to 0..1 and keeps the proportions (centred), world writes metres as they are (data, beyond 0..1). Feed tex_channel extract (channel g) for a bottom-to-top gradient.

Inputs

#namedescription
0geomesh to bake (needs uv without overlaps: uv_unwrap or uv_layout)

Parameters

nametypedefaultrangedescription
resolutionivec2[1024,1024]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
supersampleint11..4samples per texel along each axis (2 = 4 samples averaged: smoother edges, 4× the work)
aliases: ssaa antialiasing subsampling
paddingint40..256dilate islands by this many texels (no background bleeding in mipmaps)
aliases: dilation margin edge_padding
uv_attribstring"uv"vertex or point uv attribute to bake into
aliases: uv_name uvattrib
groupgroup (prim)""prims to bake ("" = all); the others leave their texels empty
keep_meshboolfalseoutput the input mesh with the image added (off: only the image)
aliases: keep_input keep
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
modeenum"bbox"how positions map to colour
options: bbox uniform world
aliases: normalize

Writes: image <name> (default: the node name): C RGBA, mask

Example

{
  "nodes": {
    "crate": { "type": "topotopo/props/crate" },
    "uv": { "type": "uv_unwrap", "in": ["crate"] },
    "pos": {
      "type": "bake_position",
      "in": ["uv"],
      "params": { "resolution": 256 }
    }
  },
  "output": "pos"
}

Used in the examples rusty_drum, worn_machine.

bake_thickness#

aliases: thickness_bake bake_thick

Bake thickness into uv space: rays into the mesh measure how thick it is under each texel (white = thick).

Substance Painter "Thickness". Input 0 needs non-overlapping uv in 0..1 (uv_unwrap); layer "mask" holds the coverage, and the image carries the metres its width covers (the size of a typical texel times the width: inspect shows it), which every texture node after it reads its lengths in metres against. Bakes that read a high-res mesh on input 1 add layer "missed": 1 where the cage ray found no high surface (stat missed); cage_attrib sets the cage per part and match_name keeps each named piece to the high prims of its name. Each texel casts samples rays in a cone around its inward normal; C = the mean distance to the far side divided by max_distance (misses count as max_distance). invert gives white where thin (translucency, subsurface masks).

Inputs

#namedescription
0geomesh to bake (needs uv without overlaps: uv_unwrap or uv_layout)
1highoptional high-res source, near the mesh (within cage) (optional)

Parameters

nametypedefaultrangedescription
resolutionivec2[1024,1024]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
supersampleint11..4samples per texel along each axis (2 = 4 samples averaged: smoother edges, 4× the work)
aliases: ssaa antialiasing subsampling
paddingint40..256dilate islands by this many texels (no background bleeding in mipmaps)
aliases: dilation margin edge_padding
uv_attribstring"uv"vertex or point uv attribute to bake into
aliases: uv_name uvattrib
groupgroup (prim)""prims to bake ("" = all); the others leave their texels empty
keep_meshboolfalseoutput the input mesh with the image added (off: only the image)
aliases: keep_input keep
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
samplesint161..1024rays per sample (stratified; more = smoother, linear cost)
aliases: rays secondary_rays
biasfloat00..ray start offset along the normal against self-hits (0 = auto: 1e-4 of the bbox diagonal)
seedfloat0random seed
invertboolfalsewrite 1 - value
tilebooltruetrim sheets: a band that tiles is copied one period past each open end, so the bake does not fade there (no effect without trim bands). Help topic trim_sheets.
cagefloat00..high-res input: search distance along the cage normals on each side (metres; 0 = auto: 2% of the bbox diagonal)
aliases: cage_distance max_frontal_distance ray_distance
cage_normalsenum"averaged"high-res input: ray directions: averaged normals over every face at a position (no gaps at hard edges) or the mesh's own normals
options: averaged mesh
aliases: ray_normals average_normals
cage_attribstring"cage"high-res input: a float attribute of the mesh (prim, point or vertex) that sets the cage where it is above 0, e.g. per part with attrib_create {name:"cage", class:"prim", group:"@name=grip", value:0.03}
aliases: cage_attribute
match_nameboolfalsehigh-res input: each piece projects only onto the high prims with the same prim "name" (parts sharing one atlas do not pick up their neighbours)
aliases: match_names by_name
max_distancefloat00..thickness that maps to 1 (metres; 0 = auto: 25% of the bbox diagonal)
aliases: distance radius
cone_anglefloat00..90half-angle of the ray cone in degrees (0 = auto: 30)
aliases: spread angle

Writes: image <name> (default: the node name): C grey 0..1, mask

Example

{
  "nodes": {
    "ring": { "type": "torus" },
    "uv": { "type": "uv_unwrap", "in": ["ring"] },
    "thick": {
      "type": "bake_thickness",
      "in": ["uv"],
      "params": { "resolution": 256, "samples": 16 }
    }
  },
  "output": "thick"
}

bake_triplanar#

aliases: triplanar bake_projection project_texture box_projection

Project tiling images (a photograph, a scanned surface) onto a mesh in world metres from three axes and bake them into its uv: colour, roughness and a normal map, with no uv seam showing.

Every texel reads the images at its 3D position: from the X axis at (−z, y), from Y at (x, −z), from Z at (x, y), each turned so the image is never mirrored seen from outside, divided by size (the metres one repeat covers; 0 = the colour image's own size, which image_file or a generator states) and shifted by offset (and by a random part of a repeat per seed). The three are blended by the normal, |n|^sharpness per axis: flat faces take one projection, and the turn between them blends over a short band. So the result follows the model in 3D: the same on both sides of a uv seam, the same scale on every island. The normal image is turned into world space per projection (the whiteout triplanar blend) and written in the tangent frame of the bake's uv (MikkTSpace, as bake_normal), so it stays right on any uv layout. C = colour (RGBA), layers roughness (when a roughness image is named: its grey, or the green of a colour image) and normal (when a normal image is named), texel, island and mask. tex_layers takes all three through a layer's image field.

Inputs

#namedescription
0geomesh to bake (needs uv without overlaps)
1imagesgeometry carrying the tiling images (image_file, texture nodes) (optional)

Parameters

nametypedefaultrangedescription
resolutionivec2[1024,1024]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
supersampleint11..4samples per texel along each axis (2 = 4 samples averaged: smoother edges, 4× the work)
aliases: ssaa antialiasing subsampling
paddingint40..256dilate islands by this many texels (no background bleeding in mipmaps)
aliases: dilation margin edge_padding
uv_attribstring"uv"vertex or point uv attribute to bake into
aliases: uv_name uvattrib
groupgroup (prim)""prims to bake ("" = all); the others leave their texels empty
keep_meshboolfalseoutput the input mesh with the image added (off: only the image)
aliases: keep_input keep
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
colorstring""the colour image ("" = the first image of input 1)
aliases: base_color image
normalstring""a tangent-space normal image tiling with it ("" = none)
aliases: normal_map
roughnessstring""a roughness image tiling with it ("" = none)
aliases: roughness_map
normal_formatenum"opengl"green-channel convention of the normal image (the result is OpenGL)
options: opengl directx
sizefloat00..metres one repeat of the images covers on the model (0 = the colour image's stated size)
aliases: tile scale world_size
sharpnessfloat41..32how sharply the projections hand over at a turn (higher = a shorter blend)
aliases: blend falloff
offsetvec3[0,0,0]shift of the pattern in metres
seedint00..2147483647shifts the pattern by a random part of a repeat (0 = no shift)

Writes: image <name> (default: the node name): C colour, roughness, normal, texel, island, mask

Example

{
  "nodes": {
    "box": { "type": "box" },
    "uv": { "type": "uv_unwrap", "in": ["box"] },
    "rust": {
      "type": "tex_noise",
      "params": { "resolution": 128, "texture_size": 0.5 }
    },
    "proj": {
      "type": "bake_triplanar",
      "in": ["uv", "rust"],
      "params": { "resolution": 256 }
    }
  },
  "output": "proj"
}

bake_vertex_color#

aliases: vertex_color_bake bake_color bake_cd color_bake

Bake a colour attribute (Cd, with Alpha) into uv space as an RGBA image.

Substance Painter "Color Map from Mesh". Input 0 needs non-overlapping uv in 0..1 (uv_unwrap); layer "mask" holds the coverage, and the image carries the metres its width covers (the size of a typical texel times the width: inspect shows it), which every texture node after it reads its lengths in metres against. Bakes that read a high-res mesh on input 1 add layer "missed": 1 where the cage ray found no high surface (stat missed); cage_attrib sets the cage per part and match_name keeps each named piece to the high prims of its name. attrib (point, vertex, prim or detail; 1 or 3+ floats) is interpolated across the triangles; alpha_attrib fills A when present. Values are written as they are, the same numbers the renderer shows.

Inputs

#namedescription
0geomesh to bake (needs uv without overlaps: uv_unwrap or uv_layout)

Parameters

nametypedefaultrangedescription
resolutionivec2[1024,1024]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
supersampleint11..4samples per texel along each axis (2 = 4 samples averaged: smoother edges, 4× the work)
aliases: ssaa antialiasing subsampling
paddingint40..256dilate islands by this many texels (no background bleeding in mipmaps)
aliases: dilation margin edge_padding
uv_attribstring"uv"vertex or point uv attribute to bake into
aliases: uv_name uvattrib
groupgroup (prim)""prims to bake ("" = all); the others leave their texels empty
keep_meshboolfalseoutput the input mesh with the image added (off: only the image)
aliases: keep_input keep
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
attribstring"Cd"colour attribute
aliases: attribute color_attrib
alpha_attribstring"Alpha"alpha attribute (missing = 1)

Writes: image <name> (default: the node name): C RGBA, mask

Example

{
  "nodes": {
    "ball": { "type": "sphere", "params": { "rows": 12, "cols": 24 } },
    "tint": {
      "type": "color",
      "in": ["ball"],
      "params": { "mode": "ramp", "attrib": "P.y" }
    },
    "uv": { "type": "uv_unwrap", "in": ["tint"] },
    "cd": {
      "type": "bake_vertex_color",
      "in": ["uv"],
      "params": { "resolution": 256 }
    }
  },
  "output": "cd"
}

Used in the example ocean_surface.

bake_world_normal#

aliases: world_normal_bake bake_worldspace_normal

Bake world-space normals into uv space as RGB (0.5 + 0.5 n): the mesh's own, or the high-res input's along the cage.

Substance Painter "World Space Normal". Input 0 needs non-overlapping uv in 0..1 (uv_unwrap); layer "mask" holds the coverage, and the image carries the metres its width covers (the size of a typical texel times the width: inspect shows it), which every texture node after it reads its lengths in metres against. Bakes that read a high-res mesh on input 1 add layer "missed": 1 where the cage ray found no high surface (stat missed); cage_attrib sets the cage per part and match_name keeps each named piece to the high prims of its name. Without input 1 the mesh's interpolated vertex normals (N, else computed with a 60° cusp); with a high-res input its normals where the cage rays hit it. Green-channel masks (tex_channel extract g) give "facing up" for dust and snow.

Inputs

#namedescription
0geomesh to bake (needs uv without overlaps: uv_unwrap or uv_layout)
1highoptional high-res source, near the mesh (within cage) (optional)

Parameters

nametypedefaultrangedescription
resolutionivec2[1024,1024]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
supersampleint11..4samples per texel along each axis (2 = 4 samples averaged: smoother edges, 4× the work)
aliases: ssaa antialiasing subsampling
paddingint40..256dilate islands by this many texels (no background bleeding in mipmaps)
aliases: dilation margin edge_padding
uv_attribstring"uv"vertex or point uv attribute to bake into
aliases: uv_name uvattrib
groupgroup (prim)""prims to bake ("" = all); the others leave their texels empty
keep_meshboolfalseoutput the input mesh with the image added (off: only the image)
aliases: keep_input keep
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
cagefloat00..high-res input: search distance along the cage normals on each side (metres; 0 = auto: 2% of the bbox diagonal)
aliases: cage_distance max_frontal_distance ray_distance
cage_normalsenum"averaged"high-res input: ray directions: averaged normals over every face at a position (no gaps at hard edges) or the mesh's own normals
options: averaged mesh
aliases: ray_normals average_normals
cage_attribstring"cage"high-res input: a float attribute of the mesh (prim, point or vertex) that sets the cage where it is above 0, e.g. per part with attrib_create {name:"cage", class:"prim", group:"@name=grip", value:0.03}
aliases: cage_attribute
match_nameboolfalsehigh-res input: each piece projects only onto the high prims with the same prim "name" (parts sharing one atlas do not pick up their neighbours)
aliases: match_names by_name

Writes: image <name> (default: the node name): C RGBA, mask

Example

{
  "nodes": {
    "ball": { "type": "sphere", "params": { "rows": 8, "cols": 16 } },
    "uv": { "type": "uv_unwrap", "in": ["ball"] },
    "nrm": {
      "type": "bake_world_normal",
      "in": ["uv"],
      "params": { "resolution": 256 }
    }
  },
  "output": "nrm"
}

heightfield_to_tex#

aliases: heightfield_to_image hf2tex heightfield_texture

Bridge: a heightfield layer becomes a grey image of the same sample count (input_min..input_max fitted to 0..1 by default).

Sample (i, j) → pixel (i, j) (the −Z row at the top). normalize fits input_min..input_max to 0..1 (absolute, so every tile of a map gets the same grey for the same height; values outside the range fall outside 0..1); auto_range fits the layer's own min..max instead, which depend on the field's extent; off writes raw values. The range used is recorded as the stats range_min / range_max. Feed tex_normal_from_height or tex_height_to_ao for terrain maps, or bake terrain masks into textures.

Inputs

#namedescription
0heightfieldgeometry with a heightfield

Parameters

nametypedefaultrangedescription
layerstring"height"heightfield layer
normalizebooltruefit the input range to 0..1 (off writes raw values)
aliases: fit
input_minfloat0layer value that becomes 0 (e.g. the lowest height in metres)
input_maxfloat1layer value that becomes 1
auto_rangeboolfalseuse the layer's own min..max as the input range instead (depends on the field's extent)
keepboolfalsekeep the input (heightfield and all) and add the image; off outputs only the image
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: image <name> (default: the node name): C grey

Example

{
  "nodes": {
    "hf": { "type": "heightfield" },
    "hills": {
      "type": "heightfield_noise",
      "in": ["hf"],
      "params": { "amplitude": 3 }
    },
    "height": {
      "type": "heightfield_to_tex",
      "in": ["hills"],
      "params": { "input_min": -3, "input_max": 3 }
    }
  },
  "output": "height"
}

Used in the example eroded_valley.

image_file#

aliases: image_read png_read texture_file

Load a PNG (8 or 16 bit, grey or colour) as an image: your own textures and masks into the texture nodes and materials.

Houdini COP: File; Substance: Bitmap. The image is named after this node, like every image a node makes, unless name is set; layer C holds it, grey or RGBA (layers), and a grey image keeps the file's alpha, when it has one, in layer "A". Values are samples / 255 (16-bit files / 65535: their precision is kept). Colour layers hold display values, as every colour in the engine does ("#a5462e" is 0.65, 0.27, 0.18), so srgb (on by default) keeps the numbers the file stores: a PNG this engine wrote reads back unchanged, and masks, heights, normal and roughness maps load as they are. Turn srgb off only for a file holding linear-light colour (a linear render): grey and RGB are then encoded to display values, alpha never (unlike Unreal's sRGB checkbox, off does not mean "data"). With input 0 connected the image is added to that geometry, replacing an image of the same name, so image_file nodes chain. The file node reads .png files the same way (with these defaults), naming the image after the file. texture_size is the metres the picture's width covers on the model (a file knows no size): every length node after it works against it.

Inputs

#namedescription
0geooptional: add the image to this geometry (chain image_file nodes, or carry a mesh); else the output holds only the image (optional)

Parameters

nametypedefaultrangedescription
pathpath""PNG file (relative to the package folder, e.g. "inputs/brick.png") or URL
aliases: file filename
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
layersenum"auto"auto = grey for grey PNGs (1–2 channels), RGBA for colour ones; grey = the luminance of a colour file; rgba = always four channels
options: auto grey rgba
aliases: channels
srgbbooltruethe file holds display (sRGB) values: kept as stored, like every colour in the engine (masks and data maps load unchanged too); off = it holds linear-light colour, encoded to display values on load (alpha never)
texture_sizefloat10.000001..metres the image's width covers on the model (one texel is texture_size / width metres): the image carries it, and every filter after this node reads its lengths in metres against it. Leave it out and the image has the size 1 m but states none: tex_to_heightfield and trace_image then need an extent
aliases: world_size tile_size image_width

Writes: image <name> (default: the node name): C grey or RGBA 0..1; A grey (the file's alpha, for a grey image of a file with alpha)

Example

{
  "nodes": {
    "brick_color": {
      "type": "image_file",
      "params": { "path": "inputs/brick_color.png" }
    },
    "brick_rough": {
      "type": "image_file",
      "in": ["brick_color"],
      "params": { "path": "inputs/brick_rough.png", "layers": "grey" }
    },
    "box": { "type": "box" },
    "uv": { "type": "uv_project", "in": ["box"], "params": { "method": "box" } },
    "out": {
      "type": "texture_to_material",
      "in": ["uv", "brick_rough"],
      "params": {
        "material": "brick",
        "base_color": "brick_color",
        "roughness": "brick_rough"
      }
    }
  },
  "output": "out"
}

tex_ao#

aliases: ao_texture gtao height_ao ambient_occlusion_texture cop_ambientocclusion

Ambient occlusion of a height image in physical units (ground-truth style, cosine-weighted): 1 on any plane, dark in pits, gaps and at the foot of walls; the same at any resolution.

Substance: Ambient Occlusion (RTAO / HBAO); Houdini COP: Ambient Occlusion. A value of 1 stands depth metres high (as in tex_normal_from_height), and the search reaches radius metres: for each of directions slices through a pixel the highest horizon on both sides is found from bilinear samples (closer together near the pixel, fading out over the last 40 % of the radius) and the cosine-weighted sky between them is integrated exactly. Unlike tex_height_to_ao (image-width units, nearest samples, any slope reads as shadow) a tilted plane stays white and the result does not change with the resolution. strength scales the darkening (1 = as measured). More directions and steps = smoother, slower.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
radiusfloat0.050.000001..how far occluders count, in metres
aliases: distance search_radius
depthfloat0.010..metres a height value of 1 stands
aliases: height height_scale relief
directionsint81..32slices per pixel (each looks both ways)
aliases: dirs slices
stepsint81..32samples along each way
strengthfloat10..4darkening multiplier (0 = none, 1 = as measured)
aliases: intensity amount
tileablebooltruethe image tiles: filters read across the opposite border (keep a tileable texture tileable)
aliases: wrap seamless
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "bricks": {
      "type": "tex_pattern",
      "params": { "resolution": 256, "bevel": 0.1 }
    },
    "out": {
      "type": "tex_ao",
      "in": ["bricks"],
      "params": { "radius": 0.04, "depth": 0.015, "name": "brick_ao" }
    }
  },
  "output": "out"
}

tex_auto_levels#

aliases: auto_levels autolevels normalize_range cop_normalize stretch_levels

Auto levels: stretch the image's own value range to 0..1, optionally ignoring a fraction of outliers at each end.

Substance: Auto Levels; Houdini COP: Normalize. The darkest value becomes 0 and the brightest 1 (RGB together, so colours keep their hue, or each channel by itself with per_channel). clip ignores that fraction of the values at each end (0.01 = the darkest and brightest 1 %), so a few outliers do not keep the rest grey. The stats range_min and range_max report the range used. Good after blends, AO and curvature that land in a narrow band. Alpha untouched.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
clipfloat00..0.49fraction of the values ignored at each end (outliers)
aliases: percentile cutoff
per_channelboolfalsestretch R, G and B each by its own range (shifts hues)
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: the image stretched to 0..1, named <name> (default: the node name); stats range_min, range_max

Example

{
  "nodes": {
    "n": { "type": "tex_noise", "params": { "resolution": 256 } },
    "dim": {
      "type": "tex_levels",
      "in": ["n"],
      "params": { "out_low": 0.3, "out_high": 0.5 }
    },
    "out": { "type": "tex_auto_levels", "in": ["dim"] }
  },
  "output": "out"
}

tex_bevel#

aliases: bevel_texture texture_bevel cop_bevel mask_bevel chamfer_texture

Bevel a mask into a height: 0 on the outline rising to 1 at a distance in metres inside (or outward), through a linear, smooth, round or custom profile.

Substance: Bevel; Houdini COP: Bevel. The mask's outline (where it crosses threshold) is measured to a tenth of a pixel, so the bevel is distance metres wide at any resolution (on an atlas on every island). A positive distance bevels inward (0 on the outline, 1 on the plateau); a negative one bevels outward (1 inside, falling to 0 at |distance| outside). round is a quarter circle (a rolled edge), smooth an S-curve, linear a chamfer, ramp your curve. Inner corners stay sharp, outer corners of an outward bevel round off. Feed tex_normal_from_height and tex_curvature or tex_ao.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
distancefloat0.02bevel width in metres (> 0 inward, < 0 outward)
aliases: width bevel_width
profileenum"smooth"profile from the outline to the plateau
options: linear smooth round ramp
aliases: curve_type
rampramp[[0,0],[1,1]]profile ramp: height [[t, value], …] from the outline (t 0) to the full distance (t 1)
aliases: curve
thresholdfloat0.5the value where the mask's outline runs (inside = at or above it)
aliases: level cut
tileablebooltruethe image tiles: filters read across the opposite border (keep a tileable texture tileable)
aliases: wrap seamless
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: the bevel height (grey 0..1) named <name> (default: the node name)

Example

{
  "nodes": {
    "tiles": {
      "type": "tex_pattern",
      "params": {
        "resolution": 256,
        "pattern": "tiles",
        "count": [4, 4],
        "gap": 0.08,
        "bevel": 0
      }
    },
    "out": {
      "type": "tex_bevel",
      "in": ["tiles"],
      "params": { "distance": 0.03, "profile": "round" }
    }
  },
  "output": "out"
}

tex_blend#

aliases: blend composite cop_blend layer_blend mix_images

Blend a foreground image over a background with a mode (normal, add, multiply, screen, overlay, min, max, difference …), opacity and an optional mask.

Substance: Blend; Houdini COP: Blend / Composite. result = mix(background, mode(background, foreground), opacity × mask × foreground alpha). The foreground and mask are resized to the background. A grey and an RGBA input give RGBA; alpha is the background's. clamp keeps the result in 0..1. For normal maps use tex_normal_blend (overlay flattens them).

Inputs

#namedescription
0backgroundimage A (its geometry passes through)
1foregroundimage B
2maskgrey mask: where B applies (optional) (optional)

Parameters

nametypedefaultrangedescription
modeenum"normal"blend mode
options: normal add subtract multiply screen overlay min max difference divide
aliases: blend_mode operation
opacityfloat10..1strength of the foreground
aliases: amount alpha weight
clampbooltrueclamp the result to 0..1
imagestring""which image of input 0 (the background) to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
foreground_imagestring""which image of input 1 (the foreground) to use ("" = its only image; needed when it holds several)
foreground_layerstring""layer of the foreground ("" = main)
mask_imagestring""which image of input 2 (the mask) to use ("" = its only image; needed when it holds several)
mask_layerstring""layer of the mask image ("" = main)
tileablebooltrueresizing wraps at the borders
aliases: wrap seamless
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: the background image with the blended layer, named <name> (default: the node name)

Example

{
  "nodes": {
    "paint": {
      "type": "tex_noise",
      "params": { "resolution": 256, "feature": 0.33 }
    },
    "metal": { "type": "tex_pattern", "params": { "resolution": 256 } },
    "wear": {
      "type": "tex_cells",
      "params": { "resolution": 256, "output": "edges" }
    },
    "out": {
      "type": "tex_blend",
      "in": ["paint", "metal", "wear"],
      "params": { "mode": "normal", "opacity": 0.8 }
    }
  },
  "output": "out"
}

Used in the examples image_cutouts, material_set, ocean_surface.

tex_blur#

aliases: blur cop_blur blur_hq gaussian_blur

Blur an image: gaussian or box, separable, with the radius in metres; tileable images blur across their borders (the mean is preserved), an atlas inside each island.

Substance: Blur HQ; Houdini COP: Blur. blur is the radius in metres (gaussian: radius = 2 sigma, three box passes of running sums, so the cost does not depend on the radius): the same real size at any resolution. On an atlas (the "island" and "texel" layers a bake writes) it is that size on every island whatever its texel density, and nothing is read across an island border. A texel of an island holds its whole-number id, the gutter around it (padding) the id plus a half, and a texel of no island -1.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
blurfloat0.0080..blur radius in metres (on an atlas: on every island, whatever its texel density). The default, 8 mm, is 4 pixels only on 512 pixels over 1 m: on another resolution or size it is another number of pixels
aliases: blur_radius
modeenum"gaussian"filter shape
options: gaussian box
aliases: type filter
tileablebooltruethe image tiles: filters read across the opposite border (keep a tileable texture tileable)
aliases: wrap seamless
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "bricks": { "type": "tex_pattern", "params": { "resolution": 256 } },
    "out": {
      "type": "tex_blur",
      "in": ["bricks"],
      "params": { "blur": 0.0078 }
    }
  },
  "output": "out"
}

Used in the examples material_set, ocean_surface.

tex_cells#

aliases: voronoi_texture cells worley cellular crystals cop_worley

Voronoi cells image: distance to the cell site, cell edges, random id per cell or crackle; cells in metres, tileable.

Substance: Cells / Voronoi / Crystal; Houdini COP: Worley Noise. Layer C holds the chosen output and layer "id" a random 0..1 per cell (per-cell colour or height). cell is the size of a cell in metres (texture_size / cell of them across the image; whole numbers when tileable). edges is 0 on the cell borders rising to 1 at edge_width (a fraction of a cell): stones, scales, cracked mud. crackle (F2 - F1) is bright along the borders. crystal gives every cell a flat facet with a random tilt and level (Substance Crystal: shards, faceted stone, a per-facet roughness or normal). Runs in chunks on the worker pool for large images.

Inputs

None (generator).

Parameters

nametypedefaultrangedescription
resolutionivec2[512,512]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
outputenum"edges"what C holds (crystal = a tilted flat facet per cell)
options: distance edges id crackle crystal
aliases: mode type
cellfloat0.1250.000001..size of one cell in metres (the image has texture_size / cell of them across its width; whole numbers when tileable)
aliases: cell_size feature
jitterfloat10..1randomness of the sites (0 = square grid)
aliases: randomness disorder
edge_widthfloat0.10.001..1edges: border width (fraction of a cell)
aliases: width border
metricenum"euclidean"distance metric (manhattan = diamond cells, chebyshev = square cells)
options: euclidean manhattan chebyshev
tileablebooltruerepeat seamlessly at the image borders
aliases: tile tiling seamless
texture_sizefloat10.000001..metres the image's width covers on the model (one texel is texture_size / width metres): the image carries it, and every filter after this node reads its lengths in metres against it. Leave it out and the image has the size 1 m but states none: tex_to_heightfield and trace_image then need an extent
aliases: world_size tile_size image_width
seedfloat0random seed
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: image <name> (default: the node name): C grey (the chosen output), id grey random per cell

Example

{
  "type": "tex_cells",
  "params": { "output": "edges", "cell": 0.1, "edge_width": 0.08 }
}

Used in the example material_set.

tex_channel#

aliases: channel_pack pack_channels rgba_merge rgba_split channel_shuffle orm_pack cop_channelcopy

Pack grey images into the R, G, B, A channels of one RGBA image (e.g. ORM for glTF/Unreal: occlusion, roughness, metallic), or extract one channel as grey.

Substance: RGBA Merge / RGBA Split / Channel Shuffle; Houdini COP: Channel Copy. pack: inputs 0..3 fill R, G, B, A (their luminance; each input holds one image); unconnected channels take fill (default [1, 0.5, 0, 1]: occlusion 1, roughness 0.5, metallic 0, alpha 1, the ORM convention of glTF and Unreal). The size is the first connected input's; others are resized. extract: one channel of an image of input 0 as a grey image (keeps the input, replacing the layer).

Inputs

#namedescription
0rred source (pack) or the image to split (extract) (optional)
1ggreen source (optional)
2bblue source (optional)
3aalpha source (optional)

Parameters

nametypedefaultrangedescription
modeenum"pack"pack inputs into RGBA, or extract a channel of input 0
options: pack extract
channelenum"r"extract: which channel
options: r g b a luminance
fillvec4[1,0.5,0,1]pack: values of unconnected channels
imagestring""which image of input 0 (extract) to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
namestring""pack: the new image's name, extract: the result's ("" = this node's name)
aliases: image_name output_name

Writes: pack: a new RGBA image <name> (default: the node name); extract: input 0 with the channel as its layer, renamed <name>

Example

{
  "nodes": {
    "ao": {
      "type": "tex_noise",
      "params": { "resolution": 256, "feature": 0.33 }
    },
    "rough": { "type": "tex_cells", "params": { "resolution": 256 } },
    "orm": {
      "type": "tex_channel",
      "in": ["ao", "rough"],
      "params": { "fill": [1, 0.5, 0, 1] }
    }
  },
  "output": "orm"
}

Used in the examples eroded_valley, image_cutouts, material_set.

tex_clamp#

aliases: clamp_texture cop_clamp clamp_values

Clamp values to a range (default 0..1): cut overshoots after add, subtract or levels without clamping.

Substance: Clamp; Houdini COP: Clamp. Every value below min becomes min and above max becomes max (grey or RGB; alpha untouched). Unclamped blends and levels, SDF images and heights can run outside 0..1; PNGs clamp anyway, a material input may not.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
minfloat0lowest value kept
aliases: low minimum
maxfloat1highest value kept
aliases: high maximum
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "n": { "type": "tex_noise", "params": { "resolution": 256 } },
    "out": {
      "type": "tex_clamp",
      "in": ["n"],
      "params": { "min": 0.3, "max": 0.7 }
    }
  },
  "output": "out"
}

tex_colorize#

aliases: colorize gradient_map colourize color_ramp tint

Colorize: map a grey image through a colour ramp (gradient map) into RGBA.

Substance: Gradient Map; Houdini COP: Ramp lookup. ramp keys [[pos, colour], …] with colours as [r, g, b] or "#hex"; the image holds those numbers as they are, so a "#a5462e" key comes out of the PNG as #a5462e. RGBA input uses its luminance.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
rampramp[[0,"#000000"],[1,"#ffffff"]]colour ramp [[pos, colour], …]
aliases: gradient colors colours
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "n": {
      "type": "tex_cells",
      "params": { "resolution": 256, "output": "distance" }
    },
    "out": {
      "type": "tex_colorize",
      "in": ["n"],
      "params": { "ramp": [[0, "#3b2316"], [0.5, "#8a4b2a"], [1, "#c9845a"]] }
    }
  },
  "output": "out"
}

Used in the examples asset_cleanup, image_cutouts, machined_bracket, material_set.

tex_compact#

aliases: image_compact keep_layers layers_keep

Keep only the named layers of images and store the 0..1 ones as 16-bit floats: less memory for bakes that stay cached between cooks.

For every image of input 0 (or the one named by image), keeps the layers keep names ("" = all) and stores those half names as 16-bit floats: about three significant digits, so 0..1 masks come back within 0.0003 and whole numbers exactly up to 2048 (ids above that, such as island, are left out of half by default). The values are rounded the same way on every runtime; where it has Float16Array (Node 24, current browsers) they also take half the memory, elsewhere they stay 32-bit arrays. Names are separated by spaces; * matches any run of characters and !name leaves a name out ("* !island"). An image that loses its main layer C has its first kept layer as the main one (the layer filters read, and the one tex_layers names after the image), so keep C when other nodes read the layers by name. A keep name that matches no layer of any image is reported. Nodes after it read the layers as usual (texture filters take a 32-bit copy). Stats: layers (kept), dropped, half, and mb (megabytes the images take after it, a shared layer once).

Inputs

#namedescription
0imagesgeometry with images (bakes)

Parameters

nametypedefaultrangedescription
keepstring""layers to keep, by name ("" = all; e.g. "C occ cav kind_*")
aliases: layers
halfstring"* !island"kept layers stored as 16-bit floats (names, * and !name; "" = none)
aliases: half_layers f16
imagestring""the image to compact ("" = every image of input 0)
aliases: input_image

Writes: input 0 with each image holding the kept layers, those named by half at 16 bits

Example

{
  "nodes": {
    "box": { "type": "box", "params": { "size": [1, 1, 1] } },
    "uv": { "type": "uv_unwrap", "in": ["box"], "params": { "resolution": 64 } },
    "bake": {
      "type": "bake_measure",
      "in": ["uv"],
      "params": {
        "resolution": 64,
        "name": "m",
        "measures": [
          { "by": "facing", "name": "top" },
          { "by": "height", "name": "ht" },
          { "by": "noise", "name": "grain", "size": [0.2, 0.2, 0.2] }
        ]
      }
    },
    "compact": {
      "type": "tex_compact",
      "in": ["bake"],
      "params": { "keep": "top ht texel island mask" }
    }
  },
  "output": "compact"
}

Used in the example worn_machine.

tex_constant#

aliases: constant_texture uniform_color solid_color flat_color fill_image cop_constant

Constant image: one grey value or one RGBA colour everywhere, sized by resolution or by an input image.

Substance: Uniform Color; Houdini COP: Constant. channels grey fills layer C with value (a flat roughness, metallic or height, a mask of 1); rgba with color (display values like every colour param: "#a5462e" comes out of the PNG as #a5462e) and alpha. With input 0 connected the image takes the size of an image there (image picks one when it holds several) and resolution is ignored, and the constant covers the same metres as that image (texture_size is ignored too); the output holds only the new image either way. Blend over it, pack it into an ORM channel, or give a material a flat map.

Inputs

#namedescription
0size_fromoptional: an image whose size the constant takes (optional)

Parameters

nametypedefaultrangedescription
resolutionivec2[512,512]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
channelsenum"grey"grey = one value (value), rgba = a colour (color, alpha)
options: grey rgba
aliases: mode type
valuefloat0.5grey: the value of every pixel
aliases: grey level
colorcolor[0.5,0.5,0.5]rgba: the colour of every pixel
aliases: rgb colour
alphafloat10..1rgba: the alpha of every pixel
texture_sizefloat10.000001..metres the image's width covers on the model (one texel is texture_size / width metres): the image carries it, and every filter after this node reads its lengths in metres against it. Leave it out and the image has the size 1 m but states none: tex_to_heightfield and trace_image then need an extent
aliases: world_size tile_size image_width
imagestring""which image of input 0 (the size source) to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: image <name> (default: the node name): C grey or RGBA, one value everywhere

Example

{
  "nodes": {
    "noise": { "type": "tex_noise", "params": { "resolution": 128 } },
    "roughness": {
      "type": "tex_constant",
      "in": ["noise"],
      "params": { "value": 0.65 }
    },
    "paint": {
      "type": "tex_constant",
      "params": { "resolution": 64, "channels": "rgba", "color": "#a5462e" }
    },
    "out": { "type": "merge", "in": ["roughness", "paint"] }
  },
  "output": "out"
}

tex_crop#

Extract an exact pixel rectangle, optionally resize it; all image layers stay aligned.

Origin is [x,y] from the top left, in pixels (a crop addresses pixels). Size 0 on an axis means the remaining source extent; resolution 0 keeps the crop size. The result covers the same surface the pixels did: its size in metres is the crop's share of the source's, and a "texel" layer follows a resize. Outside pixels are zero, never wrapped. Filtered resize uses area averaging down and bilinear up; nearest preserves discrete masks. Values are not colour-converted. The result takes this node's name unless name is set; other geometry/images pass through.

Inputs

#namedescription
0imagegeometry carrying an image

Parameters

nametypedefaultrangedescription
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name
originivec2[0,0]-1000000..1000000crop origin in pixels, from the top left; negative origins add zero padding
sizeivec2[0,0]0..8192crop width/height in pixels; 0 = source extent minus origin
resolutionivec2[0,0]0..8192output width/height; 0 = cropped size on that axis
filterenum"filtered"resampling filter (no resampling when the crop and output sizes match)
options: filtered nearest

Writes: selected image replaced by its cropped/resized layers

Example

{
  "nodes": {
    "img": { "type": "tex_pattern", "params": { "resolution": [64, 32] } },
    "out": {
      "type": "tex_crop",
      "in": ["img"],
      "params": { "origin": [8, 4], "size": [32, 16] }
    }
  },
  "output": "out"
}

Used in the examples image_cutouts, material_set.

tex_curvature#

aliases: curvature_texture curvature_from_normal normal_to_curvature curvature_smooth cop_curvature

Curvature from a normal map in physical units: 0.5 flat, bright on convex edges and bumps, dark in creases; layers convex and concave.

Substance: Curvature / Curvature Smooth; Houdini COP: Curvature. The mean curvature (the divergence of the normals, in 1/metres): C = 0.5 + 0.5 × curvature × radius, so bends of radius radius metres or tighter read full white (convex) or black (concave), the same at any resolution. blur (metres) smooths the normals first to measure broader curvature (Curvature Smooth). Layers convex and concave hold the two sides 0..1, like bake_curvature: tex_output {layer: "convex"} → tex_histogram_scan gives edge wear, concave gives dirt. Needs a normal map (tex_normal_from_height of a height, bake_normal).

Inputs

#namedescription
0normalgeometry holding a tangent-space normal map (RGBA); everything else passes through

Parameters

nametypedefaultrangedescription
radiusfloat0.020.000001..bend radius in metres that reads full white / black (larger = more contrast)
aliases: range intensity
blurfloat00..smooth the normals over this many metres first (broader curvature)
aliases: smooth smoothing
formatenum"opengl"green channel convention of the normal map
options: opengl directx
aliases: convention
tileablebooltruethe image tiles: filters read across the opposite border (keep a tileable texture tileable)
aliases: wrap seamless
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: the curvature (grey, 0.5 = flat) named <name> (default: the node name); layers convex and concave (0..1)

Example

{
  "nodes": {
    "plates": {
      "type": "tex_pattern",
      "params": {
        "resolution": 256,
        "pattern": "tiles",
        "count": [4, 4],
        "bevel": 0.1
      }
    },
    "n": {
      "type": "tex_normal_from_height",
      "in": ["plates"],
      "params": { "depth": 0.01 }
    },
    "out": {
      "type": "tex_curvature",
      "in": ["n"],
      "params": { "radius": 0.02 }
    }
  },
  "output": "out"
}

tex_curves#

aliases: tone_curve cop_lookup lookup_texture texture_curve

Curves: map every value through a ramp (a tone curve).

Substance: Curve; Houdini COP: Lookup. ramp keys [[in, out], …] interpolated linearly (input clamped to 0..1). Applies to grey or RGB (alpha untouched); a colour ramp maps through its luminance.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
rampramp[[0,0],[0.5,0.5],[1,1]]tone curve [[in, out], …]
aliases: curve lut
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "n": { "type": "tex_noise", "params": { "resolution": 256 } },
    "out": {
      "type": "tex_curves",
      "in": ["n"],
      "params": { "ramp": [[0, 0], [0.4, 0.1], [0.6, 0.9], [1, 1]] }
    }
  },
  "output": "out"
}

Used in the examples fracture_settle, material_set.

tex_dilate#

Extend nearest valid image values into an invalid band, preserving opacity by default.

Validity comes from RGBA alpha or an explicit, same-sized mask. Grey images need a mask input. Valid pixels and pixels beyond distance (metres) are untouched. Nearest-site ties prefer the topmost, then leftmost source. No wrapping or colour conversion. Other layers pass through; preserve_alpha keeps every original RGBA alpha value. Uses the same exact distance transform as wide bake padding. The distance is the same real size at any resolution; on an atlas (the "island" and "texel" layers a bake writes) it is that size on every island and a texel only takes values from its own island. The result takes this node's name unless name is set.

Inputs

#namedescription
0imageimage to pad
1maskoptional explicit validity mask (same dimensions) (optional)

Parameters

nametypedefaultrangedescription
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer name (empty selects the main layer)
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name
distancefloat0.0160..maximum Euclidean distance in metres from a valid source (on an atlas: on every island, whatever its texel density). The default, 16 mm, is 8 pixels only on 512 pixels over 1 m: on another resolution or size it is another number of pixels
mask_imagestring""which image of input 1 (the mask) to use ("" = its only image; needed when it holds several)
mask_layerstring""layer name (empty selects the main layer)
mask_channelenum"luminance"channel to read; alpha requires RGBA, luminance/R/G/B accept grey
options: alpha luminance r g b
mask_thresholdfloat0mask values strictly greater than this are valid
preserve_alphabooltruekeep original alpha at every RGBA pixel while padding RGB

Writes: selected image layer padded; original mask/alpha preserved

Example

{
  "nodes": {
    "img": { "type": "tex_shape", "params": { "resolution": 32, "falloff": 0 } },
    "out": {
      "type": "tex_dilate",
      "in": ["img", "img"],
      "params": { "distance": 0.09 }
    }
  },
  "output": "out"
}

Used in the example image_cutouts.

tex_directional_blur#

aliases: directional_blur motion_blur blur_directional anisotropic_blur streak_blur

Directional (motion) blur along an angle, length in metres: brushed metal from noise, streaks, rain and speed lines.

Substance: Directional Blur / Motion Blur; Houdini COP: Blur (directional). Every pixel averages the image along a line length metres long at angle (0 = +u, 90 = +v): centred on the pixel when symmetric, else trailing behind it, so bright marks streak along the angle. length is in metres, so a blur looks the same at any resolution (and on every island of an atlas). Brushed metal: tex_noise {feature: 0.0167} → tex_directional_blur {length: 0.2} → tex_levels. Grey or RGBA (alpha blurs too).

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
lengthfloat0.050..blur length in metres
aliases: distance intensity
anglefloat0direction in degrees (0 = +u, 90 = +v)
aliases: direction rotation
symmetricbooltrueblur both ways around each pixel (off = a one-sided trail along angle)
aliases: centered
tileablebooltruethe image tiles: filters read across the opposite border (keep a tileable texture tileable)
aliases: wrap seamless
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "grain": {
      "type": "tex_noise",
      "params": {
        "resolution": 256,
        "feature": 0.0167,
        "octaves": 3,
        "seed": 4
      }
    },
    "brushed": {
      "type": "tex_directional_blur",
      "in": ["grain"],
      "params": { "length": 0.15, "angle": 0 }
    }
  },
  "output": "brushed"
}

Used in the examples machined_bracket, material_set.

tex_distance#

aliases: distance_texture grow_mask mask_distance mask_grow expand_mask

Grow a mask by a distance in metres: a falloff gradient or a hard grown mask; with a source, carry its values (colours, ids) out into the grown area.

Substance: Distance. gradient: 1 inside the mask (value ≥ threshold) falling linearly to 0 at distance metres outside (glows, soft dirt around shapes, fall-off masks). grow: the mask grown by distance metres, antialiased. With a source image on input 1, C is instead the source's value at the nearest mask pixel, carried out to distance (0 beyond, inside the mask the source itself): per-tile colours or ids bled into the gaps, texture padding in metres; layer "mask" holds the gradient or grown mask. Distances in metres, so the same at any resolution (and on every island of an atlas, never across its border); with tileable they cross the borders.

Inputs

#namedescription
0maskgrey mask to grow (its geometry passes through)
1sourceoptional: an image whose values are carried out from the mask (optional)

Parameters

nametypedefaultrangedescription
distancefloat0.050..how far the mask grows, in metres
aliases: radius grow
modeenum"gradient"gradient = linear falloff to 0 at distance; grow = hard edge at distance
options: gradient grow
aliases: type
thresholdfloat0.5the value where the mask's outline runs (inside = at or above it)
aliases: level cut
tileablebooltruethe image tiles: filters read across the opposite border (keep a tileable texture tileable)
aliases: wrap seamless
imagestring""which image of input 0 (the mask) to use ("" = its only image; needed when it holds several)
aliases: input_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
source_imagestring""which image of input 1 (the source) to use ("" = its only image; needed when it holds several)
source_layerstring""layer of the source ("" = main)
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: the grown mask (grey), or with a source its carried values (grey or RGBA) and layer mask; named <name> (default: the node name)

Example

{
  "nodes": {
    "dots": {
      "type": "tex_sdf_shape",
      "params": {
        "resolution": 256,
        "shape": "disc",
        "radius": 0.05,
        "tile": [4, 4]
      }
    },
    "mask": { "type": "tex_sdf_to_mask", "in": ["dots"] },
    "glow": {
      "type": "tex_distance",
      "in": ["mask"],
      "params": { "distance": 0.06 }
    }
  },
  "output": "glow"
}

tex_edge_detect#

aliases: edge_detect edges_texture sobel cop_edge

Edge detection: Sobel gradient magnitude, or lines of a set width in metres along a mask's outline (centred, inside or outside), flat or rounded.

Substance: Edge Detect; Houdini COP: Edge Detect. sobel: the gradient magnitude of the (grey) image per texel; a 0 → 1 step gives about 1 at strength 1, and grow thickens the lines by that many metres (max filter). outline, inner and outer draw a line line_width metres wide along where the image crosses threshold (centred on it, just inside, just outside), from its signed distance to a tenth of a pixel, so the line is the same width in metres at any resolution: panel seams, grout lines, the rim of a decal, edge wear bands. roundness 0 gives a flat antialiased line, 1 a rounded ridge (a height: feed tex_normal_from_height).

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
modeenum"sobel"sobel = gradient magnitude; outline / inner / outer = a line of line_width metres along the mask's outline
options: sobel outline inner outer
aliases: type method
strengthfloat10..sobel: multiplier of the gradient magnitude
aliases: intensity contrast
growfloat00..sobel: thicken the edges by this many metres
line_widthfloat0.010..outline / inner / outer: line width in metres
aliases: edge_width thickness
roundnessfloat00..1outline / inner / outer: 0 = flat line, 1 = rounded ridge
aliases: edge_roundness
thresholdfloat0.5outline / inner / outer: the value where the outline runs
aliases: tolerance
tileablebooltruethe image tiles: filters read across the opposite border (keep a tileable texture tileable)
aliases: wrap seamless
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "bricks": { "type": "tex_pattern", "params": { "resolution": 256 } },
    "out": {
      "type": "tex_edge_detect",
      "in": ["bricks"],
      "params": { "grow": 0.0039 }
    }
  },
  "output": "out"
}

tex_flood_fill#

aliases: flood_fill floodfill flood_fill_to_random flood_fill_to_color flood_fill_to_gradient tile_id connected_components

Flood fill: find the separate tiles of a mask (bricks, planks, stones, panels) and give each a random grey or colour, a gradient across it, its size or its position.

Substance: Flood Fill + Flood Fill to Random Grayscale / Random Color / Gradient / BBox Size / Position. A tile is a connected area at or above threshold (4- or 8-connected); with tileable a tile cut by a border is one tile. random: a random grey per tile; color: a random RGB (alpha 1 on tiles, 0 in the gaps); gradient: 0 → 1 across each tile along angle, turned by up to ± angle_random per tile (directional wear, per-plank shading); bbox_size: the longer side of the tile's bounding box in metres (bigger stones darker, small chips brighter); position: the tile's centre as (u, v, 0, 1) (feed per-tile offsets). Layer "id" holds the random grey. Random values come from each tile's centre (area-weighted with its antialiased edge), so they stay with the tile whatever the resolution or the order tiles are found in. The gaps are 0. Stat tiles = the number of tiles.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
outputenum"random"what each tile gets in C
options: random color gradient bbox_size position
aliases: mode type
thresholdfloat0.5the value where the mask's outline runs (inside = at or above it)
aliases: level cut
connectivityenum4pixels touching at corners join (8) or not (4)
options: 4 8
aliases: neighbours
anglefloat0gradient: direction in degrees (0 = +u, 90 = +v)
aliases: direction
angle_randomfloat00..180gradient: random turn per tile, ± degrees
aliases: angle_variation
seedfloat0random seed
tileablebooltruetiles continue across the borders
aliases: wrap seamless
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: the per-tile values (grey, or RGBA for color and position) named <name> (default: the node name); layer id (random grey per tile); stat tiles

Example

{
  "nodes": {
    "bricks": {
      "type": "tex_pattern",
      "params": {
        "resolution": 256,
        "pattern": "bricks",
        "count": [4, 8],
        "bevel": 0
      }
    },
    "out": {
      "type": "tex_flood_fill",
      "in": ["bricks"],
      "params": { "output": "gradient", "angle": 0, "angle_random": 20 }
    }
  },
  "output": "out"
}

tex_gradient#

aliases: gradient ramp_texture gradient_linear gradient_radial cop_ramp

Gradient image: linear, mirror, radial, angular or diamond, 0..1.

Substance: Gradient Linear / Radial / Axial; Houdini COP: Ramp. linear runs along angle (0 = left → right, 90 = bottom → top) and spans the image corner to corner; mirror rises to 1 in the middle; radial and diamond grow from center (a position in uv) over radius metres; angular sweeps once around center.

Inputs

None (generator).

Parameters

nametypedefaultrangedescription
resolutionivec2[512,512]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
modeenum"linear"gradient shape
options: linear mirror radial angular diamond
aliases: type
anglefloat0direction in degrees (linear, mirror) or start angle (angular)
aliases: rotation direction
centervec2[0.5,0.5]centre in uv (radial, diamond, angular)
reachfloat0.50.001..radial / diamond: distance in metres from the centre where the gradient reaches 1 (a circle in metres whatever the image's shape)
texture_sizefloat10.000001..metres the image's width covers on the model (one texel is texture_size / width metres): the image carries it, and every filter after this node reads its lengths in metres against it. Leave it out and the image has the size 1 m but states none: tex_to_heightfield and trace_image then need an extent
aliases: world_size tile_size image_width
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: image <name> (default: the node name): C grey 0..1

Example

{
  "type": "tex_gradient",
  "params": { "resolution": 256, "mode": "radial", "reach": 0.5 }
}

Used in the examples image_cutouts, material_set.

tex_grunge#

aliases: grunge_generator dirt_texture leaks rust_spots grunge_map

Grunge mask: dirt patches, vertical leaks or scattered spots, with a set coverage and edge hardness; tileable.

Substance: Grunge Map / Dirt / Leaks / Rust spots. dirt is blotchy domain-warped noise with speckle; leaks are vertical runs streaking down from random sources (rain marks, rust runs under bolts: mask them with an AO or cavity map); spots are round stains and pits of random size. coverage is the fraction of the image that turns white, measured on the mask's own histogram like tex_histogram_scan, so 0.2 is a fifth whatever the style or seed; contrast is the edge hardness (1 = hard); detail mixes in fine breakup. feature = the size of a feature in metres (texture_size / feature of them across the width, at most 256). Built from noise over uv, so the same at any resolution.

Inputs

None (generator).

Parameters

nametypedefaultrangedescription
resolutionivec2[512,512]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
styleenum"dirt"dirt patches, vertical leaks or round spots
options: dirt leaks spots
aliases: type mode
featurefloat0.250.000001..size of a feature in metres (the image has texture_size / feature of them across its width, at most 256: a smaller feature is clamped to texture_size / 256)
aliases: feature_size wavelength
coveragefloat0.350..1fraction of the image that turns white
aliases: amount density
contrastfloat0.60..1edge hardness (1 = hard)
aliases: hardness
detailfloat0.40..1fine breakup mixed in (0 = smooth shapes)
aliases: breakup
tileablebooltruerepeat seamlessly at the image borders
aliases: tile tiling seamless
texture_sizefloat10.000001..metres the image's width covers on the model (one texel is texture_size / width metres): the image carries it, and every filter after this node reads its lengths in metres against it. Leave it out and the image has the size 1 m but states none: tex_to_heightfield and trace_image then need an extent
aliases: world_size tile_size image_width
seedfloat0random seed
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: image <name> (default: the node name): C grey 0..1 (white = grime)

Example

{
  "type": "tex_grunge",
  "params": {
    "resolution": 256,
    "style": "leaks",
    "feature": 0.16,
    "coverage": 0.3,
    "seed": 2
  }
}

tex_height_from_normal#

aliases: height_from_normal normal_to_height normal_integrate cop_normaltoheight

Height from a normal map: integrate its slopes back into a height in physical units (the inverse of tex_normal_from_height).

Substance: Normal to Height; Houdini COP: Normal to Height. The slopes of the normals are integrated by solving a Poisson equation over the whole image (FFT when tileable, else with mirrored borders), so the height is the one whose normal map best matches, in metres: tex_normal_from_height {depth} then this node with the same depth gives the height back (up to an offset) on an image of the same size. It works on the whole image with its (median) texel size, atlas islands included. range depth writes (height − lowest) / depth (0 at the lowest point; a relief deeper than depth runs past 1); normalize fits lowest..highest to 0..1. The stat relief is the height range in metres. Use it for AO and curvature from a baked or downloaded normal map, or to blend normals as heights.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
depthfloat0.011e-9..metres a height value of 1 stands for
aliases: height height_scale relief
formatenum"opengl"green channel convention of the input
options: opengl directx
aliases: convention
rangeenum"depth"depth = (height − lowest) / depth; normalize = lowest..highest to 0..1
options: depth normalize
aliases: fit
tileablebooltruethe normal map tiles (integrated as periodic)
aliases: wrap seamless
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: the height (grey) named <name> (default: the node name); stat relief (metres)

Example

{
  "nodes": {
    "bumps": {
      "type": "tex_noise",
      "params": { "resolution": 256, "feature": 0.16, "octaves": 3 }
    },
    "n": {
      "type": "tex_normal_from_height",
      "in": ["bumps"],
      "params": { "depth": 0.02 }
    },
    "back": {
      "type": "tex_height_from_normal",
      "in": ["n"],
      "params": { "depth": 0.02 }
    }
  },
  "output": "back"
}

tex_height_to_ao#

aliases: height_to_ao hbao ao_from_height texture_ao

Ambient occlusion of a height image (horizon based): white = open, dark in pits, gaps and mortar.

Substance: Ambient Occlusion (HBAO). For each pixel, directions rays march steps samples up to radius metres and keep the highest horizon; depth sets how tall a height of 1 is, in metres. For the physical version (a tilted plane stays white) use tex_ao.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
reachfloat0.050.000001..search radius in metres
relief_depthfloat0.050..height of a value of 1 in metres (larger = deeper shadows)
directionsint81..32directions per pixel
aliases: dirs
stepsint61..64samples along each direction
tileablebooltruethe image tiles: filters read across the opposite border (keep a tileable texture tileable)
aliases: wrap seamless
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "bricks": { "type": "tex_pattern", "params": { "resolution": 256 } },
    "out": {
      "type": "tex_height_to_ao",
      "in": ["bricks"],
      "params": { "reach": 0.03, "name": "brick_ao" }
    }
  },
  "output": "out"
}

tex_histogram_range#

aliases: histogram_range histogramrange range_texture

Histogram range: squeeze the values toward a position (range 1 = unchanged, 0 = flat at position); a contrast and level control in one.

Substance: Histogram Range. value = position + (value - 0.5) × range, clamped to 0..1: range scales the contrast around the middle grey, position moves the result's centre (0.5 keeps it). Narrow a mask to a subtle variation (range 0.2, position 0.6: a roughness that varies between 0.5 and 0.7). Grey or RGB (alpha untouched).

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
rangefloat0.50..1contrast kept (1 = unchanged, 0 = flat)
aliases: contrast amount
positionfloat0.50..1where the middle grey lands
aliases: center level
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "n": { "type": "tex_noise", "params": { "resolution": 256 } },
    "out": {
      "type": "tex_histogram_range",
      "in": ["n"],
      "params": { "range": 0.3, "position": 0.65 }
    }
  },
  "output": "out"
}

Used in the example machined_bracket.

tex_histogram_scan#

aliases: histogram_scan histogramscan scan

Histogram scan: turn a grey image into a mask with a set white coverage (or a threshold position) and hardness (contrast); the classic mask maker.

Substance: Histogram Scan. coverage is the fraction of the image that turns white, measured on its own histogram: 0.3 makes the brightest 30 % of the pixels white whatever the input's range (a noise of 0..0.48, a curvature bake), so a value read off a wear reference works on any input. With coverage -1, position sets a value cut instead: the cut sits at 1 - position (0 = black, 1 = white; 0.5 with contrast 0 = unchanged), so how much turns white depends on the input. contrast is the hardness of the transition around the cut (1 = hard; softer edges blend around the same cut). The stat coverage reports the fraction of the result above 0.5. Use on noise or a curvature bake to grow wear or dirt masks.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
coveragefloat-1-1..1fraction of the pixels that turn white (0.3 = the brightest 30 %), from the image's own histogram; -1 = use position
aliases: white_fraction amount
positionfloat0.50..1coverage -1: value cut at 1 - position (higher = more white; how much depends on the input's range)
contrastfloat0.50..1hardness of the transition (1 = hard cut)
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: the mask (grey) named <name> (default: the node name); stat coverage = its fraction above 0.5

Example

{
  "nodes": {
    "n": {
      "type": "tex_noise",
      "params": { "resolution": 256, "feature": 0.25 }
    },
    "out": {
      "type": "tex_histogram_scan",
      "in": ["n"],
      "params": { "coverage": 0.3, "contrast": 0.8 }
    }
  },
  "output": "out"
}

Used in the example material_set.

tex_histogram_select#

aliases: histogram_select histogramselect value_band band_select

Histogram select: a mask of the values within a band (position ± range / 2), with soft or hard edges.

Substance: Histogram Select. White where the (grey, or luminance) value lies within range / 2 of position, black beyond; contrast 1 is a hard band, lower values soften both edges around the same half-way points (0 = a tent that peaks at position). Pick one height band of a terrain or heightmap, one id range of tex_flood_fill, the mid-tones of a noise.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
positionfloat0.5centre of the selected band
aliases: center value
rangefloat0.250..width of the band
aliases: width
contrastfloat0.50..1edge hardness (1 = hard)
aliases: hardness
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: the mask (grey) named <name> (default: the node name)

Example

{
  "nodes": {
    "g": { "type": "tex_gradient", "params": { "resolution": 256 } },
    "out": {
      "type": "tex_histogram_select",
      "in": ["g"],
      "params": { "position": 0.5, "range": 0.2, "contrast": 0.8 }
    }
  },
  "output": "out"
}

Used in the example material_set.

tex_invert#

aliases: invert cop_invert negate

Invert: 1 - value (grey or RGB; alpha untouched).

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "n": { "type": "tex_noise", "params": { "resolution": 256 } },
    "out": { "type": "tex_invert", "in": ["n"] }
  },
  "output": "out"
}

tex_layers#

aliases: layers material_layers texture_layers layer_stack

A layer stack over a base: each layer is a mask expression with a colour or ramp, roughness, metallic and height; writes base colour, normal, ORM and height together on the covered texels, then pads.

Input 0 is the base: an image whose C is the base colour and whose layers "roughness" and "metallic" hold the base values (bake_material gives exactly this), or any colour image with base_roughness / base_metallic set; its layer "mask" is the coverage (coverage param), its layers "texel" (metres per texel along u and v) and "island" give the normal map its slopes and keep it on one island. Input 1 holds the mask images (merge the bakes). A layer's mask is an expression over the layers of the images in both inputs: an image's main layer is a variable named like the image, each other layer <image>_<layer> (an image "edges" with layers convex and concave gives edges, edges_convex, edges_concave; the base image's own layers too: base_kind_painted_metal); a grey layer is its value, a colour layer its luminance and its channels <name>_r, <name>_g, <name>_b, <name>_a; the wrangle helpers (smoothstep, fit, clamp, min, max, pow …) and the graph vars are there, and a bare layer name is an expression too. Layer names that are no identifier cannot be read: a warning lists them. A name two layers share is an error only where an expression uses it, as is an image called like a helper function (noise, fit …). Layers run bottom to top; a = clamp(mask, 0, 1) × opacity. color is "#rrggbb", a name, [r, g, b] or a ramp [[t, colour], …] read at the expression color_by (0..1; a noise image for varied rust); color_mode normal replaces, multiply darkens by the colour, overlay overlays it, lighten keeps the lighter of the two (a fade toward a pale colour). roughness and metallic replace the values below where the mask is, roughness_offset adds to roughness (clamped to 0..1 after every layer); height is metres added where the mask is (negative = a step down: chips). A layer with signed true reads its mask as -1..1 for roughness_offset and height alone (one mask makes both bumps and dents, rougher and smoother). The normal map is made from the summed height at the texel size of every texel (the base's "texel" layer; without one, the metres the base image covers: its size, which a bake writes and a generator sets with texture_size), so a 0.15 mm step has the same slope at 1024 and 2048 and on a non-square image, and a texel only reads neighbours of its own island, so a chip never leaves a ridge on the island next to it. Only covered texels are composed and expressions run on them only, so nothing a mask holds outside the islands reaches the maps; at the end every map is padded from the covered texels by padding texels (a neutral value beyond). Mask images of another size than the base are resized, with a warning. Expressions are compiled once per distinct text and run in chunks on the worker pool for large images (code that reads globalThis, this or geometry functions runs in one piece), with identical results without it. Outputs: images <name>_base_color, <name>_normal, <name>_orm (R occlusion, G roughness, B metallic) and <name>_height (metres), each keeping the coverage as layer "mask"; texture_to_material makes a material of the first three.

Inputs

#namedescription
0basethe base: colour in C, layers roughness, metallic, texel, island and mask (bake_material)
1masksgeometry holding the images the mask expressions name (merge the bake outputs) (optional)

Parameters

nametypedefaultrangedescription
layersjson[]the layers, bottom to top: [{"name": "dust", "mask": "smoothstep(0.4, 0.8, top)", "opacity": 1, "color": "#a69d8b" | [r, g, b] | [[0, "#5c2a14"], [1, "#9a4a20"]], "color_by": "0", "color_mode": "normal" | "multiply" | "overlay" | "lighten", "roughness": 0.95, "roughness_offset": 0, "metallic": 0, "height": 0.0003, "signed": false}]; name and mask are required, the rest optional (a field left out leaves that channel alone)
aliases: stack
masksjson[]named masks, computed first in order: [{"name": "dust", "mask": "smoothstep(0.4, 0.8, top) * grain"}]; every later mask, layer mask, color_by and the occlusion read each by its name (computed once however many read it), and they are written as the layers of image <name>_masks (clamped to 0..1; "write": false leaves one out: a step between masks)
aliases: named_masks
outputsenum"both"what to write: the maps, the masks image (when masks are named), or both
options: both maps masks
aliases: output
occlusioncode""expression for ORM red (occlusion 0..1) over the same variables ("" = 1)
aliases: ao occlusion_expression
base_roughnessfloat-1-1..1roughness of the whole base, 0..1 (-1 = read the base's layer "roughness"; an error when it has none)
aliases: roughness
base_metallicfloat-1-1..1metallic of the whole base, 0..1 (-1 = read the base's layer "metallic"; an error when it has none)
aliases: metallic
coveragestring"mask"the base layer that holds the coverage (texels above 0 are composed and padded from; "" = every texel counts)
aliases: coverage_layer
paddingint80..256texels to pad from the coverage at the end (the nearest covered texel; a neutral value beyond)
aliases: dilation margin
normal_formatenum"opengl"green channel convention of the normal map (glTF and Blender read OpenGL, Unreal DirectX)
options: opengl directx
aliases: format convention
imagestring""which image of input 0 (the base) to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
namestring""prefix of the output images ("" = this node's name): <name>_base_color, <name>_normal, <name>_orm, <name>_height
aliases: image_name output_name

Writes: images <name>_base_color (RGBA), <name>_normal (RGBA, tangent space), <name>_orm (R occlusion, G roughness, B metallic) and <name>_height (grey, metres), each with layer mask (the coverage)

Example

{
  "nodes": {
    "box": { "type": "box" },
    "paint": {
      "type": "material",
      "in": ["box"],
      "params": {
        "name": "paint",
        "base_color": "#6f8fae",
        "roughness": 0.55,
        "kind": "painted_metal"
      }
    },
    "uv": { "type": "uv_unwrap", "in": ["paint"] },
    "base": {
      "type": "bake_material",
      "in": ["uv"],
      "params": { "resolution": 256 }
    },
    "curv": {
      "type": "bake_curvature",
      "in": ["uv"],
      "params": { "resolution": 256 }
    },
    "stack": {
      "type": "tex_layers",
      "in": ["base", "curv"],
      "params": {
        "layers": [
          {
            "name": "chips",
            "mask": "smoothstep(0.15, 0.4, curv_convex)",
            "color": "#9a9a96",
            "roughness": 0.4,
            "metallic": 1,
            "height": -0.0005
          },
          {
            "name": "grime",
            "mask": "smoothstep(0.1, 0.5, curv_concave)",
            "color": "#3d3529",
            "color_mode": "multiply",
            "roughness": 0.9,
            "opacity": 0.8
          }
        ]
      }
    }
  },
  "output": "stack"
}

Used in the examples rusty_drum, worn_machine.

tex_levels#

aliases: levels cop_levels remap_texture contrast

Levels: remap the input range, apply gamma, remap to the output range (contrast, brightness, inversion).

Substance: Levels; Houdini COP: Levels. value = out_low + (out_high - out_low) × ((value - in_low) / (in_high - in_low))^(1/gamma). Applies to grey or RGB (alpha untouched).

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
in_lowfloat0input black point
in_highfloat1input white point
gammafloat10.01..10midtones (> 1 brightens)
aliases: mid
out_lowfloat0output black
out_highfloat1output white
clampbooltrueclamp to 0..1
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "n": { "type": "tex_noise", "params": { "resolution": 256 } },
    "out": {
      "type": "tex_levels",
      "in": ["n"],
      "params": { "in_low": 0.3, "in_high": 0.7, "gamma": 1.2 }
    }
  },
  "output": "out"
}

Used in the examples image_cutouts, material_set, ocean_surface.

tex_make_tile#

aliases: make_tile make_it_tile makeittile make_tileable seamless_texture

Make it tile: blend an image (a photo, a non-tileable noise) with copies shifted by half, so its borders meet seamlessly.

Substance: Make It Tile Photo / Patch. Along u, then along v, the image is blended with a copy shifted by half the image: near the borders the copy shows (it runs on across them), from blend (a fraction of the image) inward the original does (covering the copy's seam). noise 0 is a smooth cross-fade over the band; toward 1 the hand-over becomes a narrow edge that wanders with a noise of noise_scale cells (a patch edge hides the blend better on photos and coarse noise). The result always tiles; the middle of the image is untouched.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
blendfloat0.250.01..0.5width of the blended band at each border (fraction of the image)
aliases: band mask_size
noisefloat0.50..10 = smooth cross-fade, 1 = a narrow edge wandering with noise
aliases: patch warp
noise_scalefloat61..64cells of the edge noise across the image
aliases: frequency
seedfloat0random seed
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "n": {
      "type": "tex_noise",
      "params": { "resolution": 256, "feature": 0.18, "tileable": false }
    },
    "out": {
      "type": "tex_make_tile",
      "in": ["n"],
      "params": { "blend": 0.2, "noise": 0.6 }
    }
  },
  "output": "out"
}

tex_noise#

aliases: noise_texture perlin_noise clouds fractal_sum cop_noise fractalnoise

Noise image: perlin, simplex, value or worley, layered as fbm, ridged or turbulence; features in metres, tileable by default.

Substance: Perlin Noise / Clouds / Fractal Sum; Houdini COP: Noise. Grey 0..1 in layer C. feature = the size of one cell at the first octave in metres, on an image texture_size metres wide (so there are texture_size / feature cells across it, at any resolution); each octave multiplies the frequency by lacunarity and the amplitude by roughness. tileable rounds every octave to whole cells (simplex samples 4D noise on a torus) so the image repeats seamlessly: the feature is then the nearest size that fits a whole number of times. shift moves the field in metres. Runs in chunks on the worker pool for large images.

Inputs

None (generator).

Parameters

nametypedefaultrangedescription
resolutionivec2[512,512]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
noiseenum"perlin"base noise
options: perlin simplex value worley
aliases: type basis noise_type
fractalenum"fbm"octave layering (ridged = sharp crests, turbulence = billows)
options: none fbm ridged turbulence
featurefloat0.250.000001..size of one cell at the first octave, in metres (the image has texture_size / feature of them across; whole numbers when tileable)
aliases: cell_size wavelength
octavesint51..12number of octaves
roughnessfloat0.50..1amplitude gain per octave (persistence)
aliases: persistence gain
lacunarityfloat21..4frequency gain per octave
jitterfloat10..1worley: randomness of the feature points (0 = regular grid)
shiftvec2[0,0]shift of the noise field in metres (vary or animate without changing the seed)
aliases: translate
tileablebooltruerepeat seamlessly at the image borders
aliases: tile tiling seamless
texture_sizefloat10.000001..metres the image's width covers on the model (one texel is texture_size / width metres): the image carries it, and every filter after this node reads its lengths in metres against it. Leave it out and the image has the size 1 m but states none: tex_to_heightfield and trace_image then need an extent
aliases: world_size tile_size image_width
seedfloat0random seed
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: image <name> (default: the node name): C grey 0..1

Example

{
  "type": "tex_noise",
  "params": {
    "resolution": 512,
    "feature": 0.16,
    "fractal": "ridged",
    "seed": 2
  }
}

Used in the examples fracture_settle, image_cutouts, machined_bracket, material_set, ocean_surface.

tex_normal_blend#

aliases: normal_blend blend_normals normal_combine rnm detail_normal combine_normals

Combine two normal maps: a detail (micro grain, a tiling pattern) over a base (a baked normal map), reoriented (RNM) by default, with strength and an optional mask.

Substance: Normal Combine / Normal Blend; Unreal: BlendAngleCorrectedNormals. The detail's tilt is scaled by strength (0 = no detail, 2 = twice as steep), then: rnm (reoriented normal mapping) rotates the detail onto the base normal, so the baked shapes and the detail both keep their depth; udn adds the detail's x and y to the base (cheaper, flattens strong detail on steep base slopes); linear normalises the sum (softens both, even the base). The mask (input 2, grey) fades from the base where it is 0 to the blend where it is 1. The detail and mask are resized to the base; the base's alpha is kept. Both maps must use the same green convention (OpenGL or DirectX). tex_blend overlay is no substitute: it flattens and skews normal maps.

Inputs

#namedescription
0basebase normal map (RGBA; its geometry passes through)
1detaildetail normal map (RGBA) laid over the base
2maskgrey mask: where the detail applies (optional) (optional)

Parameters

nametypedefaultrangedescription
modeenum"rnm"rnm = reoriented (keeps both reliefs), udn = add x and y (cheaper), linear = normalised sum (softens both)
options: rnm udn linear
aliases: method blend_mode
strengthfloat10..detail tilt multiplier (0 = base only, 1 = as baked, 2 = twice as steep)
aliases: intensity detail_strength amount
imagestring""which image of input 0 (the base) to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
detail_imagestring""which image of input 1 (the detail) to use ("" = its only image; needed when it holds several)
detail_layerstring""layer of the detail ("" = main)
mask_imagestring""which image of input 2 (the mask) to use ("" = its only image; needed when it holds several)
mask_layerstring""layer of the mask ("" = main)
tileablebooltrueresizing the detail and mask wraps at the borders
aliases: wrap seamless
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: the base image with the combined normal map (RGBA), named <name> (default: the node name)

Example

{
  "nodes": {
    "bricks": {
      "type": "tex_pattern",
      "params": { "resolution": 256, "count": [4, 8] }
    },
    "base": {
      "type": "tex_normal_from_height",
      "in": ["bricks"],
      "params": { "depth": 0.015 }
    },
    "grain": {
      "type": "tex_noise",
      "params": { "resolution": 256, "feature": 0.025, "octaves": 3 }
    },
    "detail": {
      "type": "tex_normal_from_height",
      "in": ["grain"],
      "params": { "depth": 0.0004 }
    },
    "out": {
      "type": "tex_normal_blend",
      "in": ["base", "detail"],
      "params": { "mode": "rnm", "strength": 1 }
    }
  },
  "output": "out"
}

tex_normal_from_height#

aliases: normal_from_height height_to_normal normal_map bump_to_normal cop_bumptonormal

Normal map from a height image (Sobel) in physical units (relief depth in metres, texel size from the image): tangent-space RGBA, OpenGL (+Y up) or DirectX (Y down).

Substance: Normal (from height); Houdini COP: Bump to Normal. The slope is real: a value of 1 stands depth metres high and one texel is the image's own texel size (texture_size / width; per island on an atlas), so the normal tilts by atan(height step × depth / texel size). The same graph gives the same normals at any resolution, and a value you can measure picks the strength: 0.0003 for paint and cast grain, 0.002 for hammered metal, 0.01 to 0.02 for brick and mortar. For bake_height's "distance" layer (metres already) use depth 1. Steps narrower than a texel (hard pattern edges, thresholds) stay steeper at higher resolutions, as a finer step is physically steeper; give them a bevel or a blur in metres first. A flat image gives (0.5, 0.5, 1). glTF and Blender use OpenGL; Unreal uses DirectX (or flip green on import). Combine with another normal map in tex_normal_blend.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
depthfloat0.01relief: metres a height value of 1 stands above 0 (negative inverts the relief)
aliases: height height_scale bump_depth relief
formatenum"opengl"green channel convention
options: opengl directx
aliases: convention
tileablebooltruethe image tiles: filters read across the opposite border (keep a tileable texture tileable)
aliases: wrap seamless
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "bricks": { "type": "tex_pattern", "params": { "resolution": 256 } },
    "brick_normal": {
      "type": "tex_normal_from_height",
      "in": ["bricks"],
      "params": { "depth": 0.015 }
    }
  },
  "output": "brick_normal"
}

Used in the examples fracture_settle, image_cutouts, machined_bracket, material_set, ocean_surface.

tex_normal_invert#

aliases: normal_invert invert_normal flip_green normal_flip directx_to_opengl

Invert a normal map's green (OpenGL ↔ DirectX) or red channel, or both (turn the relief inside out).

Substance: Normal Invert. green flips the Y convention: OpenGL (glTF, Blender, TopoTopo) ↔ DirectX (Unreal), the usual fix for normal maps lit from below. red flips X; both inverts the relief (bumps become dents). Alpha is kept.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
channelenum"green"channel(s) to flip (green = OpenGL ↔ DirectX)
options: green red both
aliases: flip axis
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "bricks": { "type": "tex_pattern", "params": { "resolution": 256 } },
    "gl": {
      "type": "tex_normal_from_height",
      "in": ["bricks"],
      "params": { "depth": 0.015 }
    },
    "dx": {
      "type": "tex_normal_invert",
      "in": ["gl"],
      "params": { "channel": "green" }
    }
  },
  "output": "dx"
}

tex_normal_normalize#

aliases: normal_normalize normalize_normal renormalize_normals

Normalize a normal map: scale every vector back to unit length after blurs, resizes, blends or hand edits.

Substance: Normal Normalize. Blurring, resizing, tex_blend or levels on a normal map leave vectors shorter than 1 (flatter shading, wrong reflections); this rescales each to length 1 and lifts any below the surface (z < 0) to it. Alpha is kept. A grey input is an error: it is not a normal map.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "bricks": { "type": "tex_pattern", "params": { "resolution": 256 } },
    "n": {
      "type": "tex_normal_from_height",
      "in": ["bricks"],
      "params": { "depth": 0.015 }
    },
    "soft": { "type": "tex_blur", "in": ["n"], "params": { "blur": 0.012 } },
    "out": { "type": "tex_normal_normalize", "in": ["soft"] }
  },
  "output": "out"
}

tex_output#

aliases: texture_output rename_image image_output cop_null

Name an image (rename), or copy one of its layers out as a new image (e.g. the "id" layer of a pattern).

Substance: Output node; Houdini COP: Null / Output. With layer "" the image is renamed to name (default: this node's name); with a layer, a new image name holds that layer as C and the original stays. An image already called name is replaced. keep_only drops every other image (and the mesh) from the output: the way to isolate one image of a stack.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""copy this layer out as a new image ("" = rename the whole image)
keep_onlyboolfalseoutput only this image

Writes: the image renamed <name> (default: the node name), or with layer set a new image <name> holding that layer

Example

{
  "nodes": {
    "bricks": { "type": "tex_pattern", "params": { "resolution": 256 } },
    "brick_id": {
      "type": "tex_output",
      "in": ["bricks"],
      "params": { "layer": "id" }
    }
  },
  "output": "brick_id"
}

Used in the examples material_set, weathered_cabinet, worn_machine.

tex_pack#

Pack named images into aligned atlases and output per-item UV placement attributes.

items is [{name:"leaf",maps:{color:"leaf_color",normal:"leaf_normal"}}]. Empty items packs each input image under the channel C. Every item must have the same map labels; images within an item must match dimensions and images within a channel must have matching channel counts. The selected images use their main layer. Native resolution, no rotation/downscaling, zero gutters. Outputs <name>_<channel> images and placement points in item order. rect is [x,y,width,height] in top-left pixels; atlasUV = localUV * uv_scale + uv_offset (V up). Connect the image output to texture_to_material and read placement attributes with a wrangle; do not merge placement points into your mesh. The atlas images carry a texel layer (the own texel size of each item) and an island layer (one island per item; its own pixels hold the number of the item and its gutter that number plus a half, so a filter treats the gutter as padding: a blur does not pull the empty gutter into the item and a distance does not take it for surface; background between the items is -1), so the filters after it work in metres on each item and tex_dilate pads inside it. Padding is separate: tex_dilate. Limits: 4096 items, normal per-image pixel limit, at most 1 GiB of output image layers.

Inputs

#namedescription
0imagesgeometry carrying named source images (combine with merge)

Parameters

nametypedefaultrangedescription
itemsjson[]array of {name, maps:{channel:imageName}}; empty = each image becomes one item in channel C
resolutionivec2[2048,2048]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
paddingint80..8192empty gutter on every side of each item, in pixels
namestring""atlas image name prefix ("" = this node's name); images are named <name>_<channel>

Writes: atlas images; points with name, rect, uv_offset and uv_scale; detail atlas_size

Example

{
  "nodes": {
    "a": { "type": "tex_shape", "params": { "resolution": 32, "name": "disc" } },
    "b": {
      "type": "tex_pattern",
      "params": { "resolution": [32, 16], "name": "pattern" }
    },
    "images": { "type": "merge", "in": ["a", "b"] },
    "out": {
      "type": "tex_pack",
      "in": ["images"],
      "params": { "resolution": 128, "padding": 4 }
    }
  },
  "output": "out"
}

Used in the example image_cutouts.

tex_pattern#

aliases: tile_generator bricks brick checker tiles_pattern cop_pattern

Tiling pattern image: bricks, tiles, checker, stripes, hex, dots, or a grid line mask, with gap (mortar), bevel and per-cell random id.

Substance: Tile Generator / Bricks / Checker; Houdini COP: Pattern. For bricks, tiles, stripes, hex and dots C is a height-like profile: 1 on the cells, 0 in the gaps, a smooth bevel between (feed tex_normal_from_height for bricks with depth). grid is the opposite, a line mask: 1 on the lines (gap is their width), 0 inside the cells, so multiplying a material by it darkens all but the lines; for cells separated by grooves use tiles (grid is 1 - tiles without variation). checker alternates 1 and 0. Layer "id" holds a random 0..1 per cell (tex_colorize it with layer "id" for per-brick colour). count = cells along u (columns) and v (rows); stripes are vertical (u count), and with a u count of 1 the v count makes horizontal stripes; bricks and dots shift every other row by offset (keep the row count even for seamless tiling); hex uses offset for its staggered rows. gap and bevel are fractions of the smaller cell side; variation darkens cells randomly. A cell is texture_size / count metres: for bricks of a given size in metres, count = texture_size / brick size.

Inputs

None (generator).

Parameters

nametypedefaultrangedescription
resolutionivec2[512,512]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
patternenum"bricks"pattern
options: bricks tiles checker stripes hex dots grid
aliases: type mode
countivec2[4,8]1..4096cells along u (columns) and v (rows) across the whole image: a count per image, so a larger texture_size makes bigger cells, not more of them
aliases: tiles repeat cells
offsetfloat0.50..1bricks / hex / dots: shift of every other row (fraction of a cell)
aliases: row_offset stagger
gapfloat0.060..1mortar / gap width as a fraction of the smaller cell side (dots: 1 - diameter)
aliases: mortar spacing
bevelfloat0.080..1bevel width as a fraction of the smaller cell side (0 = hard antialiased edge)
aliases: smooth roundness
variationfloat00..1random darkening per cell (0 = all cells 1; not grid or checker)
aliases: height_variation luminance_random
texture_sizefloat10.000001..metres the image's width covers on the model (one texel is texture_size / width metres): the image carries it, and every filter after this node reads its lengths in metres against it. Leave it out and the image has the size 1 m but states none: tex_to_heightfield and trace_image then need an extent
aliases: world_size tile_size image_width
seedfloat0random seed
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: image <name> (default: the node name): C grey profile (1 on the cells; grid: 1 on the lines), id grey random per cell

Example

{
  "type": "tex_pattern",
  "params": { "pattern": "bricks", "count": [4, 8], "gap": 0.05, "bevel": 0.1 }
}

Used in the examples asset_cleanup, material_set.

tex_quantize#

aliases: quantize posterize cop_quantize quantize_grayscale posterize_texture steps_texture

Quantize (posterize): reduce the values to a few even levels: terraces, stepped masks, toon bands, palette ids.

Substance: Quantize / Posterize; Houdini COP: Quantize. levels evenly spaced values 0 … 1 (2 = black and white). round snaps every value to the nearest level; floor cuts 0..1 into levels equal bands (posterize: as many pixels per band as the input has in that range). Grey or RGB per channel (alpha untouched).

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
levelsint42..256number of output values
aliases: steps count
modeenum"round"round = nearest level, floor = equal bands (posterize)
options: round floor
aliases: method type
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "n": { "type": "tex_noise", "params": { "resolution": 256 } },
    "out": { "type": "tex_quantize", "in": ["n"], "params": { "levels": 5 } }
  },
  "output": "out"
}

tex_scratches#

aliases: scratches scratch_generator directional_scratches strokes cracks

Seeded scratches: thin tapered strokes along a direction with random spread, length and intensity.

Substance: Scratches Generator / Directional Scratches. Strokes are slightly bent, thin at both ends, combined with max; they wrap at the borders (tileable). length and width are in metres on an image texture_size metres wide (a stroke is never thinner than about one texel, so a hairline is a one-texel line at any resolution). count is the number of strokes in the whole image. Blend over a roughness or base colour map with tex_blend.

Inputs

None (generator).

Parameters

nametypedefaultrangedescription
resolutionivec2[512,512]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
countint2000..100000number of strokes in the whole image (a count per image: a larger texture_size makes the same strokes longer, not more of them)
aliases: number amount
stroke_lengthvec2[0.05,0.25]0..stroke length range in metres
stroke_widthfloat0.0030..stroke width in metres (at least about one texel)
anglefloat20mean direction in degrees (0 = along u)
spreadfloat300..180random deviation from angle in degrees
curvaturefloat0.10..1sideways bend as a fraction of the length
intensityvec2[0.4,1]0..intensity range of a stroke
tileablebooltruestrokes wrap at the borders
aliases: tile wrap
texture_sizefloat10.000001..metres the image's width covers on the model (one texel is texture_size / width metres): the image carries it, and every filter after this node reads its lengths in metres against it. Leave it out and the image has the size 1 m but states none: tex_to_heightfield and trace_image then need an extent
aliases: world_size tile_size image_width
seedfloat0random seed
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: image <name> (default: the node name): C grey 0..1

Example

{
  "type": "tex_scratches",
  "params": { "resolution": 512, "count": 150, "angle": 45, "seed": 3 }
}

tex_sdf_boolean#

aliases: sdf_boolean_texture sdf_combine_texture cop_sdfblend sdf_union

Combine two SDF images: union, subtract, intersect or xor, hard or smooth (blend width in metres), or morph from one to the other.

Houdini COP: SDF Blend; Substance: SDF Boolean. An SDF image holds the signed distance in metres in C (negative inside, 0 on the outline), as tex_sdf_shape and tex_sdf_from_mask make it. union = either shape, subtract = input 0 minus input 1, intersect = both, xor = one but not both. smoothness blends the seam over that many metres (a fillet where shapes meet: welded plates, melted blobs); 0 is a hard cut. morph mixes the two fields by amount (0 = input 0, 1 = input 1). Input 1 is resized to input 0. Smooth results and morphs are not exact distances away from the outline: follow with tex_sdf_op redistance before offsets.

Inputs

#namedescription
0aSDF image A (its geometry passes through)
1bSDF image B

Parameters

nametypedefaultrangedescription
modeenum"union"how the shapes combine
options: union subtract intersect xor morph
aliases: operation type
smoothnessfloat00..width of the smooth blend in metres (0 = hard)
aliases: smooth blend radius
amountfloat0.50..1morph: 0 = A, 1 = B
aliases: mix t
tileablebooltrueresizing B wraps at the borders
aliases: wrap seamless
imagestring""which image of input 0 (A) to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
b_imagestring""which image of input 1 (B) to use ("" = its only image; needed when it holds several)
b_layerstring""layer of B ("" = main)
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "plate": {
      "type": "tex_sdf_shape",
      "params": {
        "resolution": 256,
        "shape": "box",
        "extent": [0.7, 0.5],
        "corner": 0.05
      }
    },
    "hole": {
      "type": "tex_sdf_shape",
      "params": { "resolution": 256, "shape": "disc", "radius": 0.12 }
    },
    "cut": {
      "type": "tex_sdf_boolean",
      "in": ["plate", "hole"],
      "params": { "mode": "subtract", "smoothness": 0.03 }
    },
    "out": {
      "type": "tex_sdf_to_mask",
      "in": ["cut"],
      "params": { "mode": "bevel", "width": 0.04 }
    }
  },
  "output": "out"
}

tex_sdf_from_mask#

aliases: sdf_from_mask mask_to_sdf sdf_from_mono cop_sdffrommono distance_field

SDF from a mask: the signed distance in metres (negative inside) to where a grey image crosses threshold, accurate to about a tenth of a pixel.

Houdini COP: SDF from Mono; Substance: Distance / SDF. The outline is found between pixels by interpolation, so antialiased masks (tex_pattern, tex_shape, tex_text, a threshold with softness) give smooth distances that are the same in metres at any resolution (on an atlas on every island, at its texel size); an exact distance transform carries them across the image. With tileable distances are measured across the borders. A mask without any outline (all inside or all outside) gives ± the image's width + height in texels. Feed tex_sdf_op, tex_sdf_boolean and tex_sdf_to_mask.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
thresholdfloat0.5the value where the mask's outline runs (inside = at or above it)
aliases: level cut
tileablebooltruethe image tiles: filters read across the opposite border (keep a tileable texture tileable)
aliases: wrap seamless
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: the SDF (grey, metres, negative inside) named <name> (default: the node name)

Example

{
  "nodes": {
    "word": {
      "type": "tex_text",
      "params": { "resolution": [256, 128], "text": "SDF", "text_height": 0.3 }
    },
    "sdf": {
      "type": "tex_sdf_from_mask",
      "in": ["word"],
      "params": { "tileable": false }
    }
  },
  "output": "sdf"
}

tex_sdf_op#

aliases: sdf_op sdf_operation sdf_texture_offset cop_sdfoffset sdf_round

Operate on an SDF image in metres: offset (grow or shrink), round convex corners, fillet concave ones, stroke (an outline band), invert, redistance.

Houdini COP: SDF Offset / Round; Substance: SDF operations. An SDF image holds the signed distance in metres in C (negative inside, 0 on the outline), as tex_sdf_shape and tex_sdf_from_mask make it. offset grows the shape by amount metres (negative shrinks); round rounds its convex corners with radius amount and fillet its concave ones (shrink or grow, measure again, return); stroke turns it into a band amount wide centred on the outline (rings from discs, frames from boxes, then tex_sdf_to_mask); invert swaps inside and outside; redistance measures the distance to the outline again after smooth booleans or a morph. Distances are in metres.

Inputs

#namedescription
0sdfgeometry holding an SDF image (signed distance in metres: tex_sdf_shape, tex_sdf_from_mask); everything else passes through

Parameters

nametypedefaultrangedescription
modeenum"offset"operation
options: offset round fillet stroke invert redistance
aliases: operation type
amountfloat0.01offset distance, corner radius or stroke width in metres
aliases: distance radius width
tileablebooltruethe image tiles: filters read across the opposite border (keep a tileable texture tileable)
aliases: wrap seamless
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "star": {
      "type": "tex_sdf_shape",
      "params": {
        "resolution": 256,
        "shape": "star",
        "radius": 0.4,
        "sides": 5
      }
    },
    "soft": {
      "type": "tex_sdf_op",
      "in": ["star"],
      "params": { "mode": "round", "amount": 0.04 }
    },
    "ring": {
      "type": "tex_sdf_op",
      "in": ["soft"],
      "params": { "mode": "stroke", "amount": 0.03 }
    },
    "out": { "type": "tex_sdf_to_mask", "in": ["ring"] }
  },
  "output": "out"
}

tex_sdf_shape#

aliases: sdf_shape_texture cop_sdfshape shape_sdf distance_shape

SDF shape image: the signed distance in metres to a disc, box, polygon, star, capsule or cross (or a grid of them), for SDF offsets, booleans, bevels and outlines.

Houdini COP: SDF Shape; Substance: Shape (as a distance field). C holds the signed distance in metres (negative inside, 0 on the outline) on an image whose width covers texture_size metres, so every distance node downstream (tex_sdf_op, tex_sdf_boolean, tex_sdf_to_mask) works in metres and gives the same result at any resolution. radius sizes disc, polygon and star; extent sizes box (width, height), capsule (length, thickness) and cross (arm length, thickness); corner rounds box, polygon and cross. tile repeats the shape (center places it in each tile, in the tile's uv); with tileable the grid continues past the borders, so the field tiles and shapes cut by a border continue on the other side. Panels, plates, rivets, slots, vents, decals. See it with tex_sdf_to_mask.

Inputs

None (generator).

Parameters

nametypedefaultrangedescription
resolutionivec2[512,512]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
shapeenum"box"shape
options: disc box polygon star capsule cross
aliases: type
radiusfloat0.30..disc, polygon, star: (outer) radius in metres
extentvec2[0.6,0.4]0..box: width and height; capsule: length and thickness; cross: arm length and thickness (metres)
aliases: box_size shape_size
cornerfloat00..corner rounding radius in metres (box, polygon, cross)
aliases: corner_radius rounding
sidesint63..64polygon: sides; star: points
inner_radiusfloat0.50.01..1star: inner radius / outer radius
aliases: inner
rotationfloat0rotation in degrees (counter-clockwise)
aliases: angle rotate
centervec2[0.5,0.5]centre in each tile's uv (0.5, 0.5 = the middle)
aliases: position
tileivec2[1,1]1..512repeats along u and v
aliases: tiling repeat count
texture_sizefloat10.000001..metres the image's width covers on the model (one texel is texture_size / width metres): the image carries it, and every filter after this node reads its lengths in metres against it. Leave it out and the image has the size 1 m but states none: tex_to_heightfield and trace_image then need an extent
aliases: world_size tile_size image_width
tileablebooltruethe grid of shapes continues past the borders (the field tiles)
aliases: wrap seamless
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: image <name> (default: the node name): C grey signed distance in metres (negative inside)

Example

{
  "type": "tex_sdf_shape",
  "params": {
    "resolution": 256,
    "shape": "box",
    "extent": [0.4, 0.4],
    "corner": 0.06,
    "tile": [2, 2]
  }
}

tex_sdf_to_mask#

aliases: sdf_to_mask sdf_to_mono sdf_render cop_sdftomono sdf_fill

Render an SDF image: an antialiased fill, an outline of a set width, a bevel profile (a height), or the field encoded 0..1 for export.

Houdini COP: SDF to Mono; Substance: SDF to mask. An SDF image holds the signed distance in metres in C (negative inside, 0 on the outline), as tex_sdf_shape and tex_sdf_from_mask make it. fill: 1 inside, 0 outside, antialiased over one texel or softened over softness metres. outline: a line width metres wide centred on the outline. bevel: 0 on the outline rising through the profile (linear, smooth, round = a quarter circle, ramp = your curve) to 1 at width metres inside: a height for tex_normal_from_height. distance: 0.5 on the outline, 1 at width metres inside, 0 at width outside (the usual encoding of distance-field textures for decals and text in shaders).

Inputs

#namedescription
0sdfgeometry holding an SDF image (signed distance in metres: tex_sdf_shape, tex_sdf_from_mask); everything else passes through

Parameters

nametypedefaultrangedescription
modeenum"fill"what to draw
options: fill outline bevel distance
aliases: type output
widthfloat0.020..outline width, bevel width or distance range in metres
aliases: distance bevel_width
softnessfloat00..fill and outline: edge softness in metres (0 = antialiased over a texel)
aliases: falloff blur
profileenum"smooth"bevel: profile from the outline inward
options: linear smooth round ramp
aliases: curve_type
rampramp[[0,0],[1,1]]bevel with profile ramp: height [[t, value], …] from the outline (t 0) to width inside (t 1)
aliases: curve
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: the grey result named <name> (default: the node name)

Example

{
  "nodes": {
    "rivets": {
      "type": "tex_sdf_shape",
      "params": {
        "resolution": 256,
        "shape": "disc",
        "radius": 0.04,
        "tile": [6, 6]
      }
    },
    "out": {
      "type": "tex_sdf_to_mask",
      "in": ["rivets"],
      "params": { "mode": "bevel", "width": 0.04, "profile": "round" }
    }
  },
  "output": "out"
}

tex_shape#

aliases: shape_texture cop_shape polygon_shape disc_texture

Shape image: disc, square, polygon, star or ring with a soft falloff, optionally repeated in a grid.

Substance: Shape; Houdini COP: Shape. 1 inside, 0 outside; falloff (fraction of the radius) ramps the edge inward, so falloff 1 gives a cone or pyramid usable as a height stamp. fill is the radius relative to half a tile, so a tile of texture_size / tile metres holds a shape of fill × half of that. tile repeats the shape (a tileable stud or rivet grid). Use as a mask, a stamp for tex_tile_sampler, or a bump through tex_normal_from_height; for a shape of a size in metres use tex_sdf_shape.

Inputs

None (generator).

Parameters

nametypedefaultrangedescription
resolutionivec2[512,512]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
shapeenum"disc"shape
options: disc square polygon star ring
aliases: type
fillfloat0.80.001..2radius as a fraction of half a tile (1 touches the tile border)
aliases: scale
sidesint63..64polygon / star: sides or points
inner_radiusfloat0.50..1star: inner / outer radius; ring: hole / outer radius
aliases: inner
rotationfloat0rotation in degrees (counter-clockwise)
aliases: angle rotate
fallofffloat00..1soft edge as a fraction of the radius (0 = antialiased hard edge, 1 = a cone)
aliases: softness blur
tileivec2[1,1]1..512repeats along u and v
aliases: tiling repeat count
texture_sizefloat10.000001..metres the image's width covers on the model (one texel is texture_size / width metres): the image carries it, and every filter after this node reads its lengths in metres against it. Leave it out and the image has the size 1 m but states none: tex_to_heightfield and trace_image then need an extent
aliases: world_size tile_size image_width
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: image <name> (default: the node name): C grey 0..1

Example

{
  "type": "tex_shape",
  "params": { "shape": "star", "sides": 5, "falloff": 0.3, "tile": [4, 4] }
}

Used in the examples image_cutouts, material_set.

tex_slope_blur#

aliases: slope_blur slopeblur slope_blur_grayscale flow_blur

Slope blur: smear an image along the slopes of a second grey image (blur, min or max): flowing edges, melted and eroded looks, organic paint wear.

Substance: Slope Blur Grayscale / Color. Every pixel walks down (or up) the slope of the grey map on input 1 for distance metres in samples steps, re-reading the slope at each step, and combines what it meets: blur (the mean: flowing smears), min (eats bright areas along the flow: eroded, chipped edges) or max (grows them). Where the map is flatter than half its average slope the steps shrink in proportion, so flat areas stay put. Distances in metres, so the same at any resolution. Typical: a histogram_scan wear mask slope-blurred by tex_noise for ragged paint edges. Grey or RGBA (alpha is kept).

Inputs

#namedescription
0imageimage to blur (its geometry passes through)
1slopegrey map whose slopes the blur follows (noise, a height)

Parameters

nametypedefaultrangedescription
distancefloat0.020..how far each pixel follows the slope, in metres
aliases: intensity length
samplesint161..64steps along the slope (more = smoother)
aliases: steps
modeenum"blur"blur = mean, min = erode bright areas, max = grow them
options: blur min max
aliases: type
directionenum"downhill"follow the slope down (default) or up
options: downhill uphill
tileablebooltruethe image tiles: filters read across the opposite border (keep a tileable texture tileable)
aliases: wrap seamless
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
slope_imagestring""which image of input 1 (the slope map) to use ("" = its only image; needed when it holds several)
slope_layerstring""layer of the slope map ("" = main)
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "mask": {
      "type": "tex_sdf_shape",
      "params": { "resolution": 256, "shape": "disc", "radius": 0.3 }
    },
    "fill": { "type": "tex_sdf_to_mask", "in": ["mask"] },
    "flow": {
      "type": "tex_noise",
      "params": { "resolution": 256, "feature": 0.125, "seed": 3 }
    },
    "out": {
      "type": "tex_slope_blur",
      "in": ["fill", "flow"],
      "params": { "distance": 0.04, "mode": "min" }
    }
  },
  "output": "out"
}

tex_splatter#

aliases: splatter blobs stains dirt_map grunge

Seeded splatter: ragged soft blobs (stains, dirt, paint drops) scattered over the image.

Substance: Splatter / Dirt / Grunge Map. radius is the blob radius range in metres on an image texture_size metres wide; irregularity makes the outlines ragged (0 = discs); softness is the edge blur as a fraction of the radius; blobs wrap at the borders (tileable) and combine with max, or add (clamped to 1). count is the number of blobs in the whole image. For strokes use tex_scratches.

Inputs

None (generator).

Parameters

nametypedefaultrangedescription
resolutionivec2[512,512]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
countint600..100000number of blobs in the whole image (a count per image: a larger texture_size makes the same blobs bigger, not more of them)
aliases: number amount
blob_radiusvec2[0.02,0.08]0..blob radius range in metres
irregularityfloat0.60..1ragged outline (0 = discs)
aliases: roughness disorder
softnessfloat0.40..1edge blur as a fraction of the radius
aliases: falloff blur
intensityvec2[0.5,1]0..intensity range of a blob
combineenum"max"how overlapping blobs combine
options: max add
aliases: blend
tileablebooltrueblobs wrap at the borders
aliases: tile wrap
texture_sizefloat10.000001..metres the image's width covers on the model (one texel is texture_size / width metres): the image carries it, and every filter after this node reads its lengths in metres against it. Leave it out and the image has the size 1 m but states none: tex_to_heightfield and trace_image then need an extent
aliases: world_size tile_size image_width
seedfloat0random seed
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: image <name> (default: the node name): C grey 0..1

Example

{
  "type": "tex_splatter",
  "params": {
    "resolution": 512,
    "count": 40,
    "blob_radius": [0.03, 0.1],
    "seed": 2
  }
}

tex_text#

aliases: text_texture label_texture stencil

Text image: a line (or lines) of text from the bundled font (or a named one), filled and antialiased.

Substance: Text. Uses the text node's glyph outlines (bundled DejaVu Sans by default, identical on every machine), fits the text block's height to height metres (shrunk to fit the width of an image texture_size metres wide) and places its centre at position (uv). Labels, stencils, decals, serial numbers.

Inputs

None (generator).

Parameters

nametypedefaultrangedescription
resolutionivec2[512,512]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
textstring"TOPOTOPO"text (use \n for new lines)
fontstring""font file or family ("" = the bundled DejaVu Sans)
weightfloat4001..1000font weight on the wght axis of a variable font: 100 thin, 400 regular, 700 bold (see the text node; a font without a wght axis is drawn at its own weight)
aliases: wght font_weight
text_heightfloat0.20.00001..height of the text block in metres (shrunk to fit the width)
positionvec2[0.5,0.5]centre of the text in uv
aliases: center
alignenum"center"horizontal alignment of lines
options: left center right
texture_sizefloat10.000001..metres the image's width covers on the model (one texel is texture_size / width metres): the image carries it, and every filter after this node reads its lengths in metres against it. Leave it out and the image has the size 1 m but states none: tex_to_heightfield and trace_image then need an extent
aliases: world_size tile_size image_width
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: image <name> (default: the node name): C grey 0..1

Example

{
  "type": "tex_text",
  "params": { "resolution": [512, 128], "text": "EXIT", "text_height": 0.175 }
}

tex_threshold#

aliases: threshold cop_threshold binarize

Threshold: grey 1 where the value (luminance) is above threshold, else 0, with an optional soft band.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
thresholdfloat0.5cut value
aliases: level value
softnessfloat00..1width of the smooth transition around threshold
aliases: smooth falloff
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "n": { "type": "tex_noise", "params": { "resolution": 256 } },
    "out": {
      "type": "tex_threshold",
      "in": ["n"],
      "params": { "threshold": 0.55, "softness": 0.05 }
    }
  },
  "output": "out"
}

Used in the examples image_cutouts, material_set.

tex_tile_sampler#

aliases: tile_sampler tilesampler scatter_texture stamp_scatter

Tile sampler: scatter an image (a shape, a brick, a pebble; or several, picked at random) N × M times with random offset, rotation, scale and intensity; masks and per-instance maps; grey, id or colour output.

Substance: Tile Sampler / Splatter Circular. One instance per grid cell: position jitter (fraction of a cell), rotation ± degrees, scale range relative to a cell, intensity range. With a mask (input 1) a cell keeps its instance with probability mask(cell centre). The maps on inputs 2–4 are read at each instance's centre: scale map × scale, rotation map × 360° added to the rotation, intensity map × intensity (bigger stones where a gradient is bright, scales that follow a flow, studs that fade out). stamps random uses every image in input 0 and picks one per instance (several pebbles, leaves, bolts). Instances wrap at the borders when tileable and combine with max or add. output grey is the stamps' luminance; id gives each instance a flat random 0..1 and color a random RGB (alpha = the stamps), both taken from the strongest instance at a pixel, with the grey stamps in layer "mask" (tex_colorize an id for a palette, or tex_blend a colour over a base: its alpha masks it).

Inputs

#namedescription
0patternimage to scatter (e.g. tex_shape); with stamps random, every image here
1maskgrey mask: probability of a cell keeping its instance (optional)
2scale_mapgrey: multiplies each instance's scale (read at its centre) (optional)
3rotation_mapgrey: 0..1 adds 0..360° to each instance's rotation (optional)
4intensity_mapgrey: multiplies each instance's intensity (optional)

Parameters

nametypedefaultrangedescription
resolutionivec2[512,512]1..8192image size in pixels [width, height] (one number = square; at most 16,777,216 pixels); powers of two suit GPUs
aliases: res output_size dimensions image_size
countivec2[8,8]1..1024grid cells along u and v of the whole image (one instance each): a count per image, so a larger texture_size makes the instances bigger, not more
aliases: tiles x_y_amount
scalevec2[0.8,1]0..instance size range relative to a cell
aliases: instance_size
rotationfloat1800..180random rotation ± degrees
aliases: rotation_random
jitterfloat0.50..2random position offset (fraction of a cell)
aliases: position_random
offsetfloat00..1shift of every other row (fraction of a cell)
intensityvec2[0.6,1]0..intensity range per instance
aliases: luminance_random
combineenum"max"how overlapping instances combine
options: max add
aliases: blend
outputenum"grey"grey = the stamps; id = a random grey per instance; color = a random colour per instance (alpha = the stamps)
options: grey id color
aliases: mode output_type
stampsenum"one"one = the image picked by image; random = every image of input 0, one at random per instance
options: one random
aliases: pattern_input pattern_select
tileablebooltrueinstances wrap at the borders (the result tiles)
aliases: wrap seamless
texture_sizefloat10.000001..metres the image's width covers on the model (one texel is texture_size / width metres): the image carries it, and every filter after this node reads its lengths in metres against it. Leave it out and the image has the size 1 m but states none: tex_to_heightfield and trace_image then need an extent
aliases: world_size tile_size image_width
seedfloat0random seed
imagestring""which image of input 0 (the pattern) to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
mask_imagestring""which image of input 1 (the mask) to use ("" = its only image; needed when it holds several)
scale_map_imagestring""which image of input 2 (the scale map) to use ("" = its only image; needed when it holds several)
rotation_map_imagestring""which image of input 3 (the rotation map) to use ("" = its only image; needed when it holds several)
intensity_map_imagestring""which image of input 4 (the intensity map) to use ("" = its only image; needed when it holds several)
namestring""image name ("" = this node's name); materials reference it as "image:<name>"
aliases: image_name output_name

Writes: a new image <name> (default: the node name): C grey (or the id grey, or the RGBA colour); mask grey (the stamps; id and color only)

Example

{
  "nodes": {
    "stamp": {
      "type": "tex_shape",
      "params": { "resolution": 128, "shape": "disc", "falloff": 0.6 }
    },
    "out": {
      "type": "tex_tile_sampler",
      "in": ["stamp"],
      "params": { "count": [12, 12], "scale": [0.3, 0.9] }
    }
  },
  "output": "out"
}

tex_to_heightfield#

aliases: image_to_heightfield texture_to_heightfield tex2hf

Bridge: an image (grey or luminance) becomes a heightfield of the same sample count (u → +X, v → −Z).

Both are 2D grids: image pixel (i, j) becomes heightfield sample (i, j) (row 0 = the image top = −Z side), height = value × height_scale + height_offset + center.y. extent is the extent in metres along X, first sample to last (Z follows the image aspect), so the cell is extent / (w - 1). Without one a sample is a texel of the image, so the cell is the texel of the image, its size / w: the image must state how many metres it covers (a bake writes it, a generator states it when its texture_size is set, 1 included; a generator left at the default states nothing), else the node refuses, as there is no default size. heightfield_to_tex writes an image of w x cell metres, whose texel is the cell, so a round trip through both keeps the cell exactly. Use texture generators as terrain stamps, or heightfield_to_tex to go back. Writing another layer (layer_name "mask") keeps height at center.y + height_offset.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
extentfloat00..extent along X in metres, first sample to last; 0 = one sample per texel of the image (cell = its size / width, when the image states a size: a texture_size set on its generator, 1 included, or a bake), and a refusal when it states none
height_scalefloat1metres per unit of image value
aliases: amplitude
height_offsetfloat0added height (metres)
centervec3[0,0,0]center position
aliases: t translate position pos origin
layer_namestring"height"heightfield layer to write ("height" or a mask layer)
aliases: hf_layer
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer

Writes: heightfield volume (layers height, mask)

Example

{
  "nodes": {
    "n": {
      "type": "tex_noise",
      "params": { "resolution": 129, "fractal": "ridged", "feature": 0.33 }
    },
    "hf": {
      "type": "tex_to_heightfield",
      "in": ["n"],
      "params": { "extent": 40, "height_scale": 6 }
    }
  },
  "output": "hf"
}

tex_transform#

aliases: transform_texture transformation_2d offset_texture tile_texture cop_transform

Offset, rotate, scale and tile an image (2D transform with wrap).

Substance: Transformation 2D; Houdini COP: Transform. The content is repeated tile times, scaled by scale (> 1 enlarges), rotated about the centre and shifted by shift (metres: half of the width of the image in metres is half the image, and along v half of its height in metres); tiling is about the lower-left corner, so cell 0 starts at uv (0, 0) and offset 0 keeps the cells aligned with the image edges. With tileable the source repeats, else the outside is 0. Whole-number tiling and offsets keep a tileable image tileable; other rotations generally do not.

Inputs

#namedescription
0imagegeometry holding the image to process (everything else passes through; with several images, image names the one)

Parameters

nametypedefaultrangedescription
shiftvec2[0,0]shift in metres along u and v (half the image's width in metres is half the image; v is measured in metres too, so a non-square image is shorter than it is wide)
rotatefloat0rotation in degrees (counter-clockwise)
aliases: rotation r angle
scalevec2[1,1]zoom (> 1 enlarges the content)
aliases: s zoom
tilevec2[1,1]0.001..repeats of the content along u and v; cells start at the lower-left corner (uv 0, 0), so [1, 2] gives two stacked cells, each the whole image
aliases: tiling repeat
tileablebooltruerepeat the source outside 0..1 (else black)
aliases: wrap seamless
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "star": {
      "type": "tex_shape",
      "params": { "resolution": 256, "shape": "star" }
    },
    "out": {
      "type": "tex_transform",
      "in": ["star"],
      "params": { "rotate": 45, "tile": [4, 4] }
    }
  },
  "output": "out"
}

Used in the example material_set.

tex_warp#

aliases: warp directional_warp vector_warp cop_displace distort non_uniform_directional_warp multi_directional_warp

Warp an image by a second image: directional, along its slope, by an RG vector map, with a per-pixel angle map (non-uniform), or in several directions at once.

Substance: Warp / Directional Warp / Vector Warp / Non-Uniform Directional Warp / Multi-Directional Warp; Houdini COP: Displace. intensity is the largest offset in metres, so a warp looks the same at any resolution (and on every island of an atlas). directional moves each pixel by distance × warp value along angle; slope along the warp image's gradient (normalised so the steepest slope moves intensity); vector by (R, G) × 2 − 1 of an RGBA warp image; nonuniform like directional, with the angle map on input 2 (grey 0..1 = 0..360°) added to angle per pixel (flow along a pattern: wood grain around knots, fibres, brushed swirls); multi averages directions directional warps whose angles split the circle evenly from angle (a soft, direction-free smear: melted edges, worn paint borders).

Inputs

#namedescription
0imageimage to warp (its geometry passes through)
1warpgrey (directional, slope, nonuniform, multi) or RGBA (vector) warp image
2anglenonuniform: grey angle map (0..1 = 0..360°, added to angle) (optional)

Parameters

nametypedefaultrangedescription
modeenum"slope"how the warp image moves pixels
options: directional slope vector nonuniform multi
aliases: type
distancefloat0.02largest offset in metres
anglefloat0directional, nonuniform, multi: direction in degrees (0 = +u)
directionsint41..32multi: number of directions averaged
tileablebooltruethe image tiles: filters read across the opposite border (keep a tileable texture tileable)
aliases: wrap seamless
imagestring""which image of the input to use ("" = its only image; needed when it holds several)
aliases: input_image source_image
layerstring""layer to process ("" = the main layer "C"; others: "id", "mask", …)
aliases: plane channel_layer
warp_imagestring""which image of input 1 (the warp image) to use ("" = its only image; needed when it holds several)
warp_layerstring""layer of the warp image ("" = main)
angle_imagestring""which image of input 2 (the angle map) to use ("" = its only image; needed when it holds several)
angle_layerstring""layer of the angle map ("" = main)
namestring""name of the result ("" = this node's name; an image already so called is replaced); materials reference it as "image:<name>"
aliases: image_name output_name

Example

{
  "nodes": {
    "bricks": { "type": "tex_pattern", "params": { "resolution": 256 } },
    "n": {
      "type": "tex_noise",
      "params": { "resolution": 256, "feature": 0.25 }
    },
    "out": {
      "type": "tex_warp",
      "in": ["bricks", "n"],
      "params": { "mode": "slope", "distance": 0.03 }
    }
  },
  "output": "out"
}

Used in the examples image_cutouts, material_set.

texture_to_material#

aliases: texture_material material_textures attach_textures apply_textures

Attach images as texture maps (base colour, normal, roughness, ORM) to a named material and assign it; the images travel with the geometry and exporters embed them.

Input 0 is the mesh (with uv), input 1 the images (merge several texture branches first). Each slot names an image of input 1 (or input 0), by default the name of the node that made it; it is copied into the output and the material table entry gets "image:<name>" in that slot (two different images under the named one are an error). orm is a packed occlusion (R) / roughness (G) / metallic (B) map (tex_channel pack), written to glTF as the metallicRoughness and occlusion textures and to USD through the r/g/b outputs; occlusion and metallic images given separately are packed into "<material>_orm" (missing channels from the material: occlusion 1, its roughness and metallic; a roughness image goes in too). The material is created with defaults when missing (or updated) and assigned to the prims of group ("" = every prim when the material is new, none when it exists). render {textures: true} shows base colour maps on the mesh; views "texture" shows the images. With nothing in input 0 the result is the material alone with the maps it uses: a material output (kind material), which other packages assign through input 1 of the material node. It sets no alpha mode: for a blended or cut-out material put a material node {name, alpha_mode: "blend" or "mask"} in input 0 (with no input of its own for a material output); this node adds the maps to it and keeps the mode.

Inputs

#namedescription
0geomesh to texture (needs uv); none: the material alone, for a material output (optional)
1imagesgeometry holding the images (merge texture branches) (optional)

Parameters

nametypedefaultrangedescription
materialstring"material"material name (created when missing)
aliases: material_name shop_materialpath
base_colorstring""image for the base colour (written as sRGB)
aliases: basecolor albedo diffuse color
normalstring""image for the tangent-space normal map (OpenGL convention)
aliases: normal_map
roughnessstring""image for roughness (grey)
aliases: roughness_map rough
metallicstring""image for metallic (grey; packed into the ORM map)
aliases: metalness
occlusionstring""image for ambient occlusion (grey; packed into the ORM map)
aliases: ao
ormstring""packed occlusion / roughness / metallic image (R, G, B)
aliases: orm_map packed
groupgroup (prim)""prims that get the material ("" = all prims when the material is new, else none)
base_color_tintcolor[1,1,1]base colour factor of a new material (glTF writes white under a base colour map)
aliases: tint
roughness_valuefloat-1-1..1roughness. -1 = unset: 0.8 for a new material; with an orm map the glTF roughnessFactor is 1 (a material on input 0 does not set it). A value is the roughnessFactor that multiplies the ORM green channel; for occlusion / metallic images packed here it fills the green channel when no roughness image is given
metallic_valuefloat-1-1..1metallic. -1 = unset: 0 for a new material; with an orm map the glTF metallicFactor is 1 (a material on input 0 does not set it). A value is the metallicFactor that multiplies the ORM blue channel; for occlusion / metallic images packed here it fills the blue channel when no metallic image is given

Writes: prim "material", detail "materials" with image:<name> texture slots, the referenced images as image volumes

Example

{
  "nodes": {
    "box": { "type": "box" },
    "uv": { "type": "uv_project", "in": ["box"], "params": { "method": "box" } },
    "bricks": { "type": "tex_pattern", "params": { "resolution": 256 } },
    "brick_color": {
      "type": "tex_colorize",
      "in": ["bricks"],
      "params": { "ramp": [[0, "#6b6b66"], [0.5, "#7a3424"], [1, "#a5462e"]] }
    },
    "brick_normal": {
      "type": "tex_normal_from_height",
      "in": ["bricks"],
      "params": { "depth": 0.02 }
    },
    "maps": { "type": "merge", "in": ["brick_color", "brick_normal"] },
    "out": {
      "type": "texture_to_material",
      "in": ["uv", "maps"],
      "params": {
        "material": "brick",
        "base_color": "brick_color",
        "normal": "brick_normal"
      }
    }
  },
  "output": "out"
}

Used in the examples asset_cleanup, fracture_settle, image_cutouts, machined_bracket, material_set, ocean_surface, worn_machine.

weather#

aliases: weathering age_material wear_and_tear grunge_material smart_material

Weather a model in one node: paint chips on edges and where hands go, grime in cavities, dust on tops, splash at the ground, rain and rust runs from where the shape sheds water, sun fade and moss, each by the material kind of the part. Out come base colour, normal and a packed map on one material, every mask in one image.

Input 0: a mesh with uv and materials, each with a kind. The maps of the materials (base colour, roughness, packed, normal; tiling in metres with the material's tile) are read with the uv as it comes (kept as uv_maps) and baked onto the atlas, so their look survives: at zero weathering the maps are the material's. layout visible re-packs the islands with more texels where they show (uv_layout visibility_weight), keep bakes on the uv as it is (it must not overlap), unwrap charts it again (tiling uv that folds, trim sheets). Input 1: surroundings (a wall, the ground: they block rays and catch drips); with none, mount adds a plane. Input 2: images whose layers, named like the masks, replace them before the stack. Input 3: photographs for image layers (overrides {"<layer>": {"image": "rust_photo", "size": 0.5}}: colour, roughness and normal projected in world metres from three axes, bake_triplanar, so no uv seam shows) and a route B reference. Kinds (the material node's kind, or kinds here; never guessed from names): painted ones lose their coat (painted_metal: chips to primer, bare steel, rust in the chip cores; cast_metal: larger chips, pitting, iron, heavier rust; painted_concrete: chips to concrete; painted_plaster: peels in larger sheets, water marks; painted_wood: flakes to wood that greys; decal: fades and scratches), bare ones stain, darken or grey through the whole surface and only wear lighter at edges (concrete: damp, stains, efflorescence below runs, worn arrises, moss; bare_steel: mill scale, flash and heavy rust, and it sources rust runs onto what is below; galvanised: dulls, white bloom, red rust on edges above rust 0.6; stainless: smudges where handled, tea stain; plastic: chalks in the sun, scuffs; rubber: greys; bare_wood: greys in the sun, damp low down; asphalt: fades, stains pool on flats; ceramic: chips to bisque); keep leaves a part as it is. Shared over every kind: film (sheltered paint duller), grime, dust, splash (mount ground), dirt runs, rust runs, moss on growing kinds outdoors, and blotch and grain on roughness. Dirt runs start where the shape sheds water, measured, not named: the outer edge of every face turned up that meets a steep face below at a convex edge (copings, parapets, sills, ledges, plate and canopy tops) and the wall under a face turned down that meets it at a concave edge (under a balcony slab or canopy), or, when the wall is a separate piece, the wall that short level rays from just below the lip of an overhang reach (under a coping or sill that is its own box), one point every 1 / leak_density metres, kept with the chance of the rain that reaches its ledge (rays up against the model and its surroundings; indoors a fixed chance, as water below windows). Named parts add to them: handled parts wear, rust sources (bare_steel, and galvanised above rust 0.6) run rust onto what is below. mount and exposure scale them. Raise leak_wander to make the runs fan out and wind like rain on a rough wall. Route B (a prop with its own unique maps): layout keep, and reference {"color": "#6b665c", "roughness": 0.85} or {"image": "name"} with match pulls the mean colour and roughness toward it before the weathering (the variation stays). Out: the mesh with material material on every weathered prim (parts of kind keep keep theirs), images <material>_base_color, _normal (in normal_format), the packed map (_orm, or <packing> in the stated layout, h = height around 0.5 at 5 mm per unit) and masks holding every mask as a layer: edge_wear, chip, bare, core, handled, cavity, occlusion, grime, dust, splash, fade, rust, runs_rust, runs_dirt, streaks, growth, damp, joints, blotch, grain (and the steps between them). Built from bakes (uv_layout, bake_material, bake_measure twice: rays and shape, then seeded noise; bake_edge_wear, bake_mask, bake_flow for rust and dirt runs, bake_triplanar per photo) and one tex_layers stack, cooked as a nested graph: each step is cached by its own signature, so dirt and rust re-cook only the stack, wear and age (age wears the edges too) also the chip threshold of the edge wear (its wear field is kept), and seed also the noise, the edge wear and the runs. Worn edges are bake_edge_wear: its amount is the wear slider after age and exposure, its focus the handled parts, and chip, bare and core (nested, capped per face: at most about a third of any face chips) are the masks of the same names; edge_wear is its raw wear field. Runs are a dark narrow core in a broad faint stain (bake_flow stain), nearly straight on flat faces; their drip points gather at the ends of a ledge, at its joints and low end and around a few spots along it. Splash is densest at the ground and thins upward into spatter with a ragged top, lighter under an overhang. The graph for the defaults, to copy and take over any step (vars k* are the sliders after age and exposure, x* the exposure weights): {"nodes":{"mesh":{"type":"input","params":{"index":0}},"surroundings":{"type":"input","params":{"index":1}},"leak_sources":{"type":"input","params":{"index":2}},"atlas":{"type":"uv_layout","in":["mesh","surroundings"],"params":{"visibility_weight":1,"resolution":1024,"padding":8}},"base":{"type":"bake_material","in":["atlas"],"params":{"resolution":1024,"padding":4,"uv_attrib":"uv","map_uv":"uv_maps","kinds":{"paint":"painted_metal"},"name":"base","masks":"kinds"}},"measure":{"type":"bake_measure","in":["atlas","surroundings"],"params":{"resolution":1024,"padding":4,"uv_attrib":"uv","measures":[{"by":"occlusion","name":"occ"},{"by":"cavity","name":"cav","max_distance":0.02},{"by":"shelter","name":"shel","direction":[0,1,0],"cone":35},{"by":"visibility","name":"vis"},{"by":"facing","name":"top","min":0,"max":20,"falloff":25},{"by":"facing","name":"sun","direction":[0,1,0],"min":0,"max":45,"falloff":90},{"by":"height","name":"ht"},{"by":"height","name":"low","min":0,"max":0,"falloff":0.2}],"samples":32,"name":"m"}},"noise":{"type":"bake_measure","in":["atlas"],"params":{"resolution":1024,"padding":4,"uv_attrib":"uv","seed":0,"name":"n","measures":[{"by":"noise","name":"patch","size":[0.15,0.15,0.15]},{"by":"noise","name":"grain","size":[0.004,0.004,0.004],"octaves":3},{"by":"noise","name":"blotch","size":[0.4,0.4,0.4]},{"by":"noise","name":"ragged","size":[0.03,0.03,0.03]},{"by":"noise","name":"streak","size":[0.03,0.35,0.03]}]}},"wear":{"type":"bake_edge_wear","in":["atlas","surroundings"],"params":{"resolution":1024,"padding":4,"uv_attrib":"uv","name":"ew","amount":"=k_amount","radius":0.006,"reach":0.012,"chip_size":0.006,"patch_size":0.15,"seed":0}},"parts":{"type":"bake_mask","in":["atlas"],"params":{"resolution":1024,"padding":4,"uv_attrib":"uv","attrib":"wpart","name":"part"}},"dirt_runs":{"type":"bake_flow","in":["atlas","leak_sources"],"params":{"resolution":1024,"padding":4,"uv_attrib":"uv","seed":0,"length":[0.03,1],"width":[0.0015,0.005],"wobble":0.04,"breakup":0.3,"stain":6,"stain_skew":2,"step":0.003,"name":"rd"}},"dirt_runs_kept":{"type":"tex_compact","in":["dirt_runs"],"params":{"keep":"C strength stain","half":""}},"parts_kept":{"type":"tex_compact","in":["parts"],"params":{"keep":"C","half":""}},"wear_kept":{"type":"tex_compact","in":["wear"],"params":{"keep":"C chip bare core convex concave","half":""}},"noise_kept":{"type":"tex_compact","in":["noise"],"params":{"keep":"C patch grain blotch ragged streak","half":""}},"measure_kept":{"type":"tex_compact","in":["measure"],"params":{"keep":"C occ cav shel vis top sun ht low","half":""}},"mask_images":{"type":"merge","in":["measure_kept","noise_kept","wear_kept","parts_kept","dirt_runs_kept"]},"stack":{"type":"tex_layers","in":["base","mask_images"],"params":{"masks":[{"name":"pv","mask":"0.8 + 0.4 * frac(part * 13.37 + k_seed * 0.618)","write":false},{"name":"convex","mask":"ew_convex","write":false},{"name":"occlusion","mask":"m_occ"},{"name":"cavity","mask":"clamp(m_cav * 1.4 + ew_concave * 0.6, 0, 1)"},{"name":"handled","mask":"0"},{"name":"edge_wear","mask":"ew"},{"name":"chip","mask":"ew_chip"},{"name":"bare","mask":"ew_bare"},{"name":"core","mask":"ew_core"},{"name":"edges_soft","mask":"clamp(smoothstep(0.1, 0.6, convex) * (0.3 + 0.8 * n_patch) * k_wear, 0, 1)","write":false},{"name":"peel","mask":"smoothstep(k_cut - 0.1, k_cut - 0.04, (chip * 0.5 + n_patch * 0.8 + m_low * k_ground * 0.4) * pv)","write":false},{"name":"blotch","mask":"n_blotch"},{"name":"grain","mask":"n_grain"},{"name":"patch_mix","mask":"n_patch * 0.6 + n_blotch * 0.4","write":false},{"name":"grime","mask":"clamp(k_dirt * (cavity * 1.1 + (1 - m_occ) * 0.9) * (0.4 + 0.9 * n_blotch) * (0.7 + 0.6 * (1 - m_ht)) * pv + handled * k_dirt * 0.35 * n_patch, 0, 1)"},{"name":"dust","mask":"clamp(k_dirt * x_dust * smoothstep(0.15, 0.8, m_top) * (1 - x_wash + x_wash * m_shel) * (0.35 + 0.9 * n_grain) , 0, 1)"},{"name":"splashd","mask":"m_low * (0.55 + 0.9 * n_ragged)","write":false},{"name":"splash","mask":"k_ground * clamp(x_splash * k_dirt * 1.3, 0, 1) * clamp(max(smoothstep(0.45, 0.85, splashd), smoothstep(1 - 0.55 * splashd, 1.06 - 0.55 * splashd, n_grain) * smoothstep(0.08, 0.3, splashd)), 0, 1) * (0.6 + 0.5 * n_blotch) * (1 - 0.6 * m_shel)"},{"name":"fade","mask":"clamp(k_fade * m_sun * m_vis * (0.7 + 0.6 * n_blotch), 0, 1)"},{"name":"rust","mask":"clamp(k_rust * x_rust * (0.45 + 0.8 * n_blotch) * (0.7 + 0.5 * cavity + 0.3 * m_top + 0.3 * m_low), 0, 1)"},{"name":"rust_core","mask":"clamp(0, 0, 1)","write":false},{"name":"rust_stain","mask":"clamp(0, 0, 1)","write":false},{"name":"runs_rust","mask":"clamp(rust_core + rust_stain * 0.6, 0, 1)"},{"name":"dirt_core","mask":"rd * smoothstep(0.7, 1, rd_strength) * clamp(k_dirt * x_runs_dirt * 1.5, 0, 1)","write":false},{"name":"dirt_stain","mask":"smoothstep(0.12, 0.85, rd_stain) * clamp(k_dirt * x_runs_dirt * 1.8, 0, 1)","write":false},{"name":"runs_dirt","mask":"clamp(dirt_core + dirt_stain * 0.6, 0, 1)"},{"name":"streaks","mask":"clamp(k_dirt * x_runs_dirt * (1 - m_top) * smoothstep(0.62, 0.8, n_streak) * smoothstep(0.35, 0.65, n_blotch) * m_ht * m_ht * 1.4, 0, 1)"},{"name":"damp","mask":"clamp(x_damp * clamp(k_dirt * 2, 0, 1) * (k_ground * m_low * 0.8 + cavity * 0.4 + runs_dirt * 0.5) * (0.45 + n_patch), 0, 1)"},{"name":"growth","mask":"0"},{"name":"joints","mask":"0"}],"layers":[{"name":"painted_metal_fade","mask":"base_kind_painted_metal * fade","color":"#d6d2c8","opacity":0.55,"roughness_offset":0.25},{"name":"painted_metal_primer","mask":"base_kind_painted_metal * chip","color":"#8e8b84","roughness":0.75,"metallic":0,"height":-0.00004},{"name":"painted_metal_bare","mask":"base_kind_painted_metal * bare","color":"#9a9a96","roughness":0.4,"metallic":1,"height":-0.00008},{"name":"painted_metal_rust","mask":"base_kind_painted_metal * clamp(core * 1.1 + bare * 0.45, 0, 1) * clamp(0.2 + rust * 1.1, 0, 1)","color":[[0,"#3e1c0e"],[0.5,"#64301a"],[1,"#8a4420"]],"color_by":"grain","roughness":0.9,"metallic":0,"height":0.0001},{"name":"film","mask":"(1 - occlusion) * clamp(k_dirt, 0, 1)","color":[0.86,0.86,0.86],"color_mode":"multiply","roughness_offset":0.1},{"name":"grime_film","mask":"clamp(k_dirt * 1.3, 0, 1) * (0.3 + 0.7 * smoothstep(0.2, 0.8, patch_mix))","color":[0.86,0.84,0.81],"color_mode":"multiply","roughness_offset":0.06},{"name":"bottom","mask":"clamp(k_dirt * 1.4, 0, 1) * (1 - smoothstep(0.0, 0.1 + 0.08 * n_ragged + 0.05 * n_patch, m_ht)) * (0.7 + 0.3 * n_blotch)","color":[0.8,0.77,0.73],"color_mode":"multiply","roughness_offset":0.05},{"name":"soil","mask":"clamp(k_dirt * (0.35 + 0.6 * blotch) * (0.6 + 0.7 * (1 - m_ht)), 0, 1)","color":[0.84,0.82,0.78],"color_mode":"multiply","roughness_offset":0.05},{"name":"grime","mask":"grime","color":"#3d3529","roughness":0.9,"metallic":0},{"name":"dust","mask":"dust","color":"#a69d8b","roughness":0.95,"metallic":0},{"name":"splash","mask":"splash","color":[[0,"#3a3128"],[0.5,"#54473a"],[1,"#6e604d"]],"color_by":"blotch","opacity":0.85,"roughness":0.9,"metallic":0},{"name":"streaks","mask":"streaks","color":"#5f574b","opacity":0.4,"roughness_offset":0.05},{"name":"dirt_stain","mask":"dirt_stain","color":"#4c4338","opacity":0.55,"roughness_offset":0.06},{"name":"runs_dirt","mask":"dirt_core","color":"#3e372d","opacity":0.25,"roughness_offset":0.1},{"name":"rust_stain","mask":"rust_stain","color":"#9a5a2c","opacity":0.5,"roughness_offset":0.08},{"name":"runs_rust","mask":"rust_core","color":[[0,"#6a3418"],[1,"#a45a26"]],"color_by":"grain","opacity":0.9,"roughness":0.85,"metallic":0},{"name":"blotch","mask":"(blotch * 2 - 1) * clamp(k_dirt + k_age, 0, 1)","signed":true,"roughness_offset":0.07},{"name":"grain","mask":"(grain * 2 - 1) * clamp(k_dirt + k_age, 0, 1)","signed":true,"roughness_offset":0.05}],"outputs":"both","padding":4,"name":"weathered"}},"out":{"type":"texture_to_material","in":["atlas","stack"],"params":{"material":"weathered","base_color":"weathered_base_color","normal":"weathered_normal","orm":"weathered_orm"}}},"output":"out"}

Inputs

#namedescription
0geomesh with uv and materials (each with a kind)
1surroundingswhat it stands on or hangs from: blocks rays, catches drips (replaces the mount plane) (optional)
2overridesimages whose layers, named like the masks, replace those masks (optional)
3photosimages for image layers (overrides "image") and the route B reference (optional)

Parameters

nametypedefaultrangedescription
wearfloat0.50..1chipped and worn edges, wear where hands and tools touch
aliases: edge_wear chips
dirtfloat0.50..1grime in cavities, dust on tops, splash at the ground, dirt runs below ledges
aliases: grime
rustfloat0.50..1rust in chips and on bare steel, rust runs below rusting parts
aliases: corrosion
agefloat0.50..10 new, 0.5 about ten years, 1 decades: sun fade, chalking, zinc dulling, greying wood, moss; it also scales the other three
aliases: years
seedint00..2147483647changes where things happen (which stretches of an edge chip, where runs start, the patches), not how much
exposureenum"outdoor"outdoor: rain runs, sun fade, washed tops, splash, moss; sheltered: dust holds, little rain; indoor: no rain or rust runs, dust, more handling (water marks only below windows and at ceiling corners)
options: outdoor sheltered indoor
mountenum"free"what the object stands on, stated, never guessed: ground = a plane at the lowest point (splash band, contact grime); wall = a plane at the wall_side of the bounding box (the back is hidden: few texels, no wear; dust gathers against it); input 1 replaces the plane
options: free ground wall
wall_sideenum"-z"mount wall: the side of the bounding box on the wall
options: -z +z -x +x
kindsjson{}kind per material name, e.g. {"zinc_steel": "galvanised", "glass": "keep"}; wins over the material's own kind (kinds: painted_metal, cast_metal, galvanised, bare_steel, stainless, plastic, rubber, concrete, painted_concrete, painted_plaster, painted_wood, bare_wood, asphalt, ceramic, decal, keep)
aliases: material_kinds
handledgroup (prim)""parts hands and tools touch ("@name=handle*"): they wear more and stainless smudges there; "" = none (never guessed from names)
sunvec3[0,1,0]where the sun comes from (fade, chalk, greying): straight up by default, a model does not know where south is
paddingint40..64texels the islands are padded by
aliases: dilation
samplesint324..256rays per cloud point of the occlusion, cavity, shelter and visibility bake
leak_densityfloat1200..500run starts per metre of ledge, sill, coping or overhang edge, and per metre where a rusting part meets the surface (0 = no runs): most runs are faint, a few strong, and under a long edge they merge into a wash. 120 is fast; 250 to 500 gives a denser, finer streaking for a final look at a small cost (a 2048 bake of a prop under a metre tall takes about 10 % longer at 250, 25 % at 500)
aliases: runs_per_metre
leak_wanderfloat00..1how much the leak runs spread sideways and meander (0 = straight down, as on a flat face in still air, 1 = fanned out and winding, like wind-blown rain on a rough wall)
aliases: run_wander
resolutionint102464..8192map size: 1024 is about 10 s, 2048 for hero props
aliases: res size
layoutenum"visible"visible: re-pack the uv islands, more texels where they show; keep: bake on the uv as it is (route B, no overlaps); unwrap: chart again (tiling uv that folds, trim sheets)
options: visible keep unwrap
materialstring"weathered"name of the output material and prefix of its images
aliases: name
overridesjson{}per layer of the stack: {"painted_metal_rust": {"color": "#5a2a14"}, "dust": {"opacity": 0}, "grime": {"image": "oil_photo", "size": 0.6}}; fields color, opacity, roughness, roughness_offset, metallic, height, color_mode, image, normal, roughness_image, size
aliases: override
referencejson{}route B: what the base is pulled toward before weathering: {"color": "#6b665c", "roughness": 0.85} or {"image": "name"} (input 3); {} = none
aliases: target_look
matchfloat0.60..1route B: how far toward the reference (0 = not at all)
aliases: pull
packingstring"orm"channel layout of the packed map: letters o occlusion, r roughness, m metallic, h height, s smoothness, x unused; orm (glTF, Unreal), hro (R height, G roughness, B occlusion), rma (stored as rmo: the map is named <material>_rmo), mrox; glTF and usda exports read it by this layout
aliases: packed_layout
normal_formatenum"opengl"green channel of the normal map: opengl (glTF, Blender) or directx (Unreal)
options: opengl directx

Writes: the mesh with the weathered material; images <material>_base_color, _normal, the packed map, _height, _masks

Example

{
  "nodes": {
    "body": {
      "type": "box",
      "params": { "size": [0.5, 0.8, 0.3], "center": [0, 0.4, 0] }
    },
    "top": {
      "type": "box",
      "params": { "size": [0.6, 0.04, 0.4], "center": [0, 0.82, 0] }
    },
    "parts": { "type": "merge", "in": ["body", "top"] },
    "paint": {
      "type": "material",
      "in": ["parts"],
      "params": {
        "name": "paint",
        "base_color": "#4f6b48",
        "roughness": 0.45,
        "kind": "painted_metal"
      }
    },
    "uv": { "type": "uv_unwrap", "in": ["paint"] },
    "weather": {
      "type": "weather",
      "in": ["uv"],
      "params": { "resolution": 256, "samples": 8, "mount": "ground" }
    }
  },
  "output": "weather"
}

Used in the examples rusty_drum, weathered_cabinet.

weather_masks#

aliases: weather_mask weathering_masks grunge_masks mask_pack

Weathering as packed masks for an engine material: dirt, leaks and runs, worn edges, coating lost (by default) in one RGBA image per seeded variant, on a uv set you laid out; materials unchanged. Kit pieces are weathered each as if alone; borders (water from above, joints, ground) are stated, never guessed.

For buildings and kits whose engine material blends its own tiling textures: the masks go on a second uv set (uv, e.g. "uv2": an atlas without overlaps, one island per piece or more), the materials keep their tiling uv. Each variant is one image <name>, <name>_2, …: C packs channels (R G B A; default dirt leaks edges coating), and each channel is also a layer by its name. The variants share the structure (edges, shelter, where water can run) and differ in which stretches wear, where runs start and where the patches lie. piece names a prim attribute that tells the pieces of a merged kit apart: each is moved apart for the bakes, so it is weathered as if alone (no shadow or stain from a neighbour), and the mount and borders apply per piece. Borders, as stated: above open (rain on its own tops, as measured), covered (something sits on it: no rain or sky from above), source (water arrives along its top edge: runs from the whole top); joints "sides bottom top" darken a band joint_width wide along those borders of each piece (the joint lines of precast panels); mount ground adds splash and moss at the bottom. Worn edges (edges) is the chip layer of bake_edge_wear (everywhere the top coat is gone, the primer ring included) with a faint rub along the edges; coating lost (coating) is its bare layer (down to the substrate) on painted kinds, with the larger peeling of age. Kinds (the material node's kind, or kinds here; never guessed from names): painted ones lose their coat (painted_metal: chips to primer, bare steel, rust in the chip cores; cast_metal: larger chips, pitting, iron, heavier rust; painted_concrete: chips to concrete; painted_plaster: peels in larger sheets, water marks; painted_wood: flakes to wood that greys; decal: fades and scratches), bare ones stain, darken or grey through the whole surface and only wear lighter at edges (concrete: damp, stains, efflorescence below runs, worn arrises, moss; bare_steel: mill scale, flash and heavy rust, and it sources rust runs onto what is below; galvanised: dulls, white bloom, red rust on edges above rust 0.6; stainless: smudges where handled, tea stain; plastic: chalks in the sun, scuffs; rubber: greys; bare_wood: greys in the sun, damp low down; asphalt: fades, stains pool on flats; ceramic: chips to bisque); keep leaves a part as it is. Shared over every kind: film (sheltered paint duller), grime, dust, splash (mount ground), dirt runs, rust runs, moss on growing kinds outdoors, and blotch and grain on roughness. Coating lost is 0 on bare kinds. kind gives the kind of prims whose material says none (or of a mesh with no materials). Dirt runs start where the shape sheds water, measured, not named: the outer edge of every face turned up that meets a steep face below at a convex edge (copings, parapets, sills, ledges, plate and canopy tops) and the wall under a face turned down that meets it at a concave edge (under a balcony slab or canopy), or, when the wall is a separate piece, the wall that short level rays from just below the lip of an overhang reach (under a coping or sill that is its own box), one point every 1 / leak_density metres, kept with the chance of the rain that reaches its ledge (rays up against the model and its surroundings; indoors a fixed chance, as water below windows). Named parts add to them: handled parts wear, rust sources (bare_steel, and galvanised above rust 0.6) run rust onto what is below. mount and exposure scale them. Raise leak_wander to make the runs fan out and wind like rain on a rough wall. preview bakes the material of the mesh on the mask uv and blends the first variant over it like a simple engine material (dirt darkens and roughens, leaks tint, worn edges lighten, coating lost shows under): material <name>_preview, for looking only. Input 2: images whose layers, named like the masks, replace them. The graph for one variant: {"nodes":{"mesh":{"type":"input","params":{"index":0}},"surroundings":{"type":"input","params":{"index":1}},"leak_sources":{"type":"input","params":{"index":2}},"base":{"type":"bake_material","in":["mesh"],"params":{"resolution":2048,"padding":4,"uv_attrib":"uv2","map_uv":"uv","kinds":{"paint":"painted_metal"},"name":"base","masks":"kinds"}},"measure":{"type":"bake_measure","in":["mesh","surroundings"],"params":{"resolution":2048,"padding":4,"uv_attrib":"uv2","measures":[{"by":"occlusion","name":"occ"},{"by":"cavity","name":"cav","max_distance":0.02},{"by":"shelter","name":"shel","direction":[0,1,0],"cone":35},{"by":"visibility","name":"vis"},{"by":"facing","name":"top","min":0,"max":20,"falloff":25},{"by":"facing","name":"sun","direction":[0,1,0],"min":0,"max":45,"falloff":90},{"by":"height","name":"ht"},{"by":"height","name":"low","min":0,"max":0,"falloff":0.2}],"samples":32,"name":"m"}},"noise":{"type":"bake_measure","in":["mesh"],"params":{"resolution":2048,"padding":4,"uv_attrib":"uv2","seed":0,"name":"n","measures":[{"by":"noise","name":"patch","size":[0.15,0.15,0.15]},{"by":"noise","name":"grain","size":[0.004,0.004,0.004],"octaves":3},{"by":"noise","name":"blotch","size":[0.4,0.4,0.4]},{"by":"noise","name":"ragged","size":[0.03,0.03,0.03]},{"by":"noise","name":"streak","size":[0.03,0.35,0.03]}]}},"wear":{"type":"bake_edge_wear","in":["mesh","surroundings"],"params":{"resolution":2048,"padding":4,"uv_attrib":"uv2","name":"ew","amount":"=k_amount","radius":0.006,"reach":0.012,"chip_size":0.006,"patch_size":0.15,"seed":0}},"parts":{"type":"bake_mask","in":["mesh"],"params":{"resolution":2048,"padding":4,"uv_attrib":"uv2","attrib":"wpart","name":"part"}},"dirt_runs":{"type":"bake_flow","in":["mesh","leak_sources"],"params":{"resolution":2048,"padding":4,"uv_attrib":"uv2","seed":0,"length":[0.03,1],"width":[0.0015,0.005],"wobble":0.04,"breakup":0.3,"stain":6,"stain_skew":2,"step":0.003,"name":"rd"}},"dirt_runs_kept":{"type":"tex_compact","in":["dirt_runs"],"params":{"keep":"C strength stain","half":""}},"parts_kept":{"type":"tex_compact","in":["parts"],"params":{"keep":"C","half":""}},"wear_kept":{"type":"tex_compact","in":["wear"],"params":{"keep":"C chip bare core convex concave","half":""}},"noise_kept":{"type":"tex_compact","in":["noise"],"params":{"keep":"C patch grain blotch ragged streak","half":""}},"measure_kept":{"type":"tex_compact","in":["measure"],"params":{"keep":"C occ cav shel vis top sun ht low","half":""}},"mask_images":{"type":"merge","in":["measure_kept","noise_kept","wear_kept","parts_kept","dirt_runs_kept"]},"stack":{"type":"tex_layers","in":["base","mask_images"],"params":{"masks":[{"name":"pv","mask":"0.8 + 0.4 * frac(part * 13.37 + k_seed * 0.618)","write":false},{"name":"convex","mask":"ew_convex","write":false},{"name":"occlusion","mask":"m_occ"},{"name":"cavity","mask":"clamp(m_cav * 1.4 + ew_concave * 0.6, 0, 1)"},{"name":"handled","mask":"0"},{"name":"edge_wear","mask":"ew"},{"name":"chip","mask":"ew_chip"},{"name":"bare","mask":"ew_bare"},{"name":"core","mask":"ew_core"},{"name":"edges_soft","mask":"clamp(smoothstep(0.1, 0.6, convex) * (0.3 + 0.8 * n_patch) * k_wear, 0, 1)","write":false},{"name":"peel","mask":"smoothstep(k_cut - 0.1, k_cut - 0.04, (chip * 0.5 + n_patch * 0.8 + m_low * k_ground * 0.4) * pv)","write":false},{"name":"blotch","mask":"n_blotch"},{"name":"grain","mask":"n_grain"},{"name":"patch_mix","mask":"n_patch * 0.6 + n_blotch * 0.4","write":false},{"name":"grime","mask":"clamp(k_dirt * (cavity * 1.1 + (1 - m_occ) * 0.9) * (0.4 + 0.9 * n_blotch) * (0.7 + 0.6 * (1 - m_ht)) * pv + handled * k_dirt * 0.35 * n_patch, 0, 1)"},{"name":"dust","mask":"clamp(k_dirt * x_dust * smoothstep(0.15, 0.8, m_top) * (1 - x_wash + x_wash * m_shel) * (0.35 + 0.9 * n_grain) , 0, 1)"},{"name":"splashd","mask":"m_low * (0.55 + 0.9 * n_ragged)","write":false},{"name":"splash","mask":"k_ground * clamp(x_splash * k_dirt * 1.3, 0, 1) * clamp(max(smoothstep(0.45, 0.85, splashd), smoothstep(1 - 0.55 * splashd, 1.06 - 0.55 * splashd, n_grain) * smoothstep(0.08, 0.3, splashd)), 0, 1) * (0.6 + 0.5 * n_blotch) * (1 - 0.6 * m_shel)"},{"name":"fade","mask":"clamp(k_fade * m_sun * m_vis * (0.7 + 0.6 * n_blotch), 0, 1)"},{"name":"rust","mask":"clamp(k_rust * x_rust * (0.45 + 0.8 * n_blotch) * (0.7 + 0.5 * cavity + 0.3 * m_top + 0.3 * m_low), 0, 1)"},{"name":"rust_core","mask":"clamp(0, 0, 1)","write":false},{"name":"rust_stain","mask":"clamp(0, 0, 1)","write":false},{"name":"runs_rust","mask":"clamp(rust_core + rust_stain * 0.6, 0, 1)"},{"name":"dirt_core","mask":"rd * smoothstep(0.7, 1, rd_strength) * clamp(k_dirt * x_runs_dirt * 1.5, 0, 1)","write":false},{"name":"dirt_stain","mask":"smoothstep(0.12, 0.85, rd_stain) * clamp(k_dirt * x_runs_dirt * 1.8, 0, 1)","write":false},{"name":"runs_dirt","mask":"clamp(dirt_core + dirt_stain * 0.6, 0, 1)"},{"name":"streaks","mask":"clamp(k_dirt * x_runs_dirt * (1 - m_top) * smoothstep(0.62, 0.8, n_streak) * smoothstep(0.35, 0.65, n_blotch) * m_ht * m_ht * 1.4, 0, 1)"},{"name":"damp","mask":"clamp(x_damp * clamp(k_dirt * 2, 0, 1) * (k_ground * m_low * 0.8 + cavity * 0.4 + runs_dirt * 0.5) * (0.45 + n_patch), 0, 1)"},{"name":"growth","mask":"0"},{"name":"joints","mask":"0"},{"name":"dirt","mask":"clamp(max(grime, max(dust, max(splash, growth * 0.8))) + joints * 0.9 + damp * 0.3, 0, 1)"},{"name":"leaks","mask":"clamp(runs_dirt + runs_rust + streaks * 0.6, 0, 1)"},{"name":"edges","mask":"clamp(chip + edges_soft * 0.5, 0, 1)"},{"name":"coating","mask":"(base_kind_painted_metal) * clamp(bare + peel * 0.7, 0, 1)"},{"name":"zero","mask":"0"},{"name":"one","mask":"1"}],"layers":[],"outputs":"masks","padding":4,"name":"weather"}}},"output":"stack"}

Inputs

#namedescription
0geomesh with the mask uv set (and materials with kinds, or kind)
1surroundingswhat one piece stands on or against (replaces the mount plane) (optional)
2overridesimages whose layers, named like the masks, replace those masks (optional)

Parameters

nametypedefaultrangedescription
wearfloat0.50..1chipped and worn edges, wear where hands and tools touch
aliases: edge_wear chips
dirtfloat0.50..1grime in cavities, dust on tops, splash at the ground, dirt runs below ledges
aliases: grime
rustfloat0.50..1rust in chips and on bare steel, rust runs below rusting parts
aliases: corrosion
agefloat0.50..10 new, 0.5 about ten years, 1 decades: sun fade, chalking, zinc dulling, greying wood, moss; it also scales the other three
aliases: years
seedint00..2147483647changes where things happen (which stretches of an edge chip, where runs start, the patches), not how much
exposureenum"outdoor"outdoor: rain runs, sun fade, washed tops, splash, moss; sheltered: dust holds, little rain; indoor: no rain or rust runs, dust, more handling (water marks only below windows and at ceiling corners)
options: outdoor sheltered indoor
mountenum"free"what the object stands on, stated, never guessed: ground = a plane at the lowest point (splash band, contact grime); wall = a plane at the wall_side of the bounding box (the back is hidden: few texels, no wear; dust gathers against it); input 1 replaces the plane
options: free ground wall
wall_sideenum"-z"mount wall: the side of the bounding box on the wall
options: -z +z -x +x
kindsjson{}kind per material name, e.g. {"zinc_steel": "galvanised", "glass": "keep"}; wins over the material's own kind (kinds: painted_metal, cast_metal, galvanised, bare_steel, stainless, plastic, rubber, concrete, painted_concrete, painted_plaster, painted_wood, bare_wood, asphalt, ceramic, decal, keep)
aliases: material_kinds
handledgroup (prim)""parts hands and tools touch ("@name=handle*"): they wear more and stainless smudges there; "" = none (never guessed from names)
sunvec3[0,1,0]where the sun comes from (fade, chalk, greying): straight up by default, a model does not know where south is
paddingint40..64texels the islands are padded by
aliases: dilation
samplesint324..256rays per cloud point of the occlusion, cavity, shelter and visibility bake
leak_densityfloat1200..500run starts per metre of ledge, sill, coping or overhang edge, and per metre where a rusting part meets the surface (0 = no runs): most runs are faint, a few strong, and under a long edge they merge into a wash. 120 is fast; 250 to 500 gives a denser, finer streaking for a final look at a small cost (a 2048 bake of a prop under a metre tall takes about 10 % longer at 250, 25 % at 500)
aliases: runs_per_metre
leak_wanderfloat00..1how much the leak runs spread sideways and meander (0 = straight down, as on a flat face in still air, 1 = fanned out and winding, like wind-blown rain on a rough wall)
aliases: run_wander
uvstring"uv2"the uv set the masks go on (no overlaps)
aliases: uv_attrib mask_uv
resolutionint204864..8192mask size (2048 or 4096 for a kit atlas)
aliases: res size
channelsstring"dirt leaks edges coating"the mask in each channel R G B (A): dirt, leaks, edges, coating, edge_wear, chip, bare, core, handled, cavity, occlusion, grime, dust, splash, fade, rust, runs_rust, runs_dirt, streaks, growth, damp, joints, blotch, grain, zero, one
aliases: channel_map layout
variantsint11..8seeded variants on the same uv, one image each
aliases: count
kindenum""kind of the prims whose material says none ("" = refuse them)
options: painted_metal cast_metal galvanised bare_steel stainless plastic rubber concrete painted_concrete painted_plaster painted_wood bare_wood asphalt ceramic decal
piecestring""prim attribute naming the pieces of a kit, each weathered alone ("" = one piece)
aliases: piece_attrib pieces
aboveenum"open"what is above each piece: open (rain on its tops), covered (nothing from above), source (water arrives along its top edge)
options: open covered source
aliases: top_edge
jointsstring""borders of each piece that are joints, darkened: "sides", "bottom", "top" ("" = none)
aliases: joint_edges
joint_widthfloat0.030.001..1width of the joint band on each piece (metres)
previewboolfalseadd a preview material on the mask uv (for looking only)
undercolor"#9a958c"preview: the colour coating lost shows
namestring"weather"name of the mask images

Writes: the mesh as it came with images <name> (and <name>_2 …): C packed, a layer per channel, texel, island, mask

Example

{
  "nodes": {
    "panel": {
      "type": "box",
      "params": { "size": [1.2, 1, 0.12], "center": [0, 0.5, 0] }
    },
    "concrete": {
      "type": "material",
      "in": ["panel"],
      "params": {
        "name": "precast",
        "base_color": "#a39e94",
        "roughness": 0.9,
        "kind": "concrete"
      }
    },
    "uv2": {
      "type": "uv_unwrap",
      "in": ["concrete"],
      "params": { "uv_attrib": "uv2" }
    },
    "masks": {
      "type": "weather_masks",
      "in": ["uv2"],
      "params": {
        "resolution": 256,
        "samples": 8,
        "mount": "ground",
        "joints": "sides bottom"
      }
    }
  },
  "output": "masks"
}