Procedural Materials

The Procedural Materials toolbox makes textures and materials from rules instead of painting them. You start from noise, shapes and patterns such as bricks or stones, and combine them. The result is a PBR material: the set of maps (color, height, roughness, metallic) that game engines and Blender use to draw a realistic surface. You can see the material on a sphere, a wall or your own model, then export it.

It is for game artists, 3D artists and anyone who wants surfaces they can change later. Because every step is a node with settings, a new variation is a new seed or a different count, not a new painting.

  • Included in: Divooka Explore and Divooka Compute Standard. In Compute, start a document from the Image Processing workload, or add the Image Processing reference with Add reference (Ctrl+Shift+L). The Image Processing reference holds Computer Graphics, Procedural Materials and Utilities.
  • Maturity: Usable · Support: Tier 2 (proposed) · what these mean
  • Open it: node library (Ctrl+Shift+Space) → Procedural Materials, or search for a node with Ctrl+Space.
  • Examples and reference: Ctrl+Shift+E → Procedural Materials (27 lessons and 23 finished materials) · node reference

New to graphs? Start with Your first program.

Main ideas

A texture is a grid of values. Grayscale textures have one channel, usually a height or a mask; color textures have four. White is high and black is low, and from a height Divooka works out the maps a renderer needs: a normal map (which way each point faces) and ambient occlusion (dark crevices).

Every texture tiles. Copies placed side by side meet without a seam. This holds for the generators and for filters and warps too.

Sizes do not change the look. A blur's radius, a warp's distance and a bevel's width are measured as if the texture were 1,024 pixels wide. A graph gives the same picture at 512 and at 4,096 pixels; only the detail changes.

A material is a set of maps. Create Material takes a base color and, if you have them, a height, roughness, metallic and other maps. A map you leave out is worked out from the height or set to one value. A material also knows how many meters one copy covers and how deep its height is, so previews and exports show it at its true size.

Example: your first texture

The task: gray clouds inside a grid of discs, and proof that the result tiles.

Open Procedural Materials > 01 Your First Texture from the examples (Ctrl+Shift+E). It has four main nodes, plus a Size node and Preview nodes. The pictures below are what each node produces:

Fractal Noise and Shape feed Blend, which feeds Repeat. Each node shows its settings and the texture it produces: clouds, white discs, clouds inside the discs, and the same tile repeated twice each way

  1. Fractal Noise, Scale 4, Octaves 6, Seed 1. It makes soft clouds. Scale sets how big they are, Octaves how much fine detail is layered on, and Seed picks one of many possible clouds.
  2. Shape, Kind Disc, Tiles 4, Scale 0.8. It draws a disc in each cell of a 4 by 4 grid.
  3. Blend, Foreground the noise, Background the discs, Mode Multiply. It keeps the clouds only where the discs are white.
  4. Repeat, Count X 2, Count Y 2. It shows the result twice across and twice down. You cannot see where the copies meet.

A Size node of 512 feeds the Size input of both generators, so one change makes every texture larger or smaller. This is a Flows graph: each node runs when its inputs are ready, so there are no execution pins to connect. Run it with F5; the Preview nodes show each texture.

To try more: change the noise's Seed, or the shape's Kind to Star or Ring, and run again.

To use your own image: start from Image As Color (for a photo or painted texture) or Image As Data (for a height or mask) in Texture Sources, and give it the image file.

Example: paving stones from one height

The task: a paving-stone material whose color and roughness come from its shape.

Open Procedural Materials > 07 From Height To A Full Material. It describes the stones' form once, as a height, and works out everything else from it:

Stones and Fractal Noise blend into a height. Gradient Map Stops and Color Variation make the base color from it, Levels makes the roughness, and Create Material and Preview Material show the result on a sphere

  1. Stones, Count 7, Randomness 0.95, Gap 0.05, Bevel 0.35, Height Variation 0.25, Tilt 0.3, Seed 11. It makes irregular stones with rounded edges, 7 across. Besides the height, its Cell Random output gives each stone a random gray.
  2. Fractal Noise, Scale 12, Roughness 0.6, Seed 12. Fine detail for the stone surface.
  3. Blend, Foreground the noise, Background the stones, Mode AddSubtract, Opacity 0.12. It lays the detail lightly over the stones. The result is the height.
  4. Gradient Map Stops, Greyscale the height, Stops 0 #2A2622; 0.25 #5B5248; 0.6 #8C8173; 1 #B8AE9E. It colors the height: dark in the joints, warm gray on the tops. Each stop is a position from 0 to 1 and a color.
  5. Color Variation, Color the gradient map, Variation the stones' Cell Random, Hue Range 0.04, Saturation Range 0.3, Value Range 0.25. It shifts each stone's color a little, so no two stones look the same. This is the base color.
  6. Levels, Texture the height, Output Low 0.95, Output High 0.55. It turns the height into roughness: joints rough, tops smoother, as if worn by feet.
  7. Create Material, Base Color the varied color, Height the height, Roughness the levels, Height Depth 0.03, Normal Intensity 5, Name Paving Stones.
  8. Preview Material, Shape Sphere. The example has a second one with Shape Plane:
The paving-stone material on a plane: the stones stand up from the surface and cast small shadows

To try more: set the Stones' Randomness to 0 and the stones become a regular grid. Then open 14 Export to see a material written as a GLB file and as texture sets for game engines.

To use it on your own model: lesson 15 Texturing A Model textures a sample box with Preview On Mesh. Swap its Sample Mesh for Load Mesh and give it your own OBJ, glTF or GLB file. The model must already have UVs.

More examples to open

The Procedural Materials category is a numbered course of 27 lessons, plus a Library folder of 23 finished materials, from Brushed Aluminium to Woven Linen.

Lessons What they cover
01 to 05 Noise, height, levels and curves, blending and masks, octaves
06 to 13 A brick wall, a full material, warping, scattering, flood fills, weathering, blending two materials, patterns
14 Export to GLB, game engines, Blender, USD and MaterialX
15 to 19 Texturing a model, a material library, materials in a 3D scene, a material as one node
20 to 27 Parallax and displacement, breaking up tiling, weather, a real sky, photographs, decals, painting, close-ups

Tips and limits

  • Build from form to looks. Make the height first, then work out color, roughness and wear from it. Most lessons follow this pattern.
  • Three ways to show relief. Preview Material's Relief input shows height as a normal map only, as parallax (the surface looks deep but stays flat), or as displacement (the surface really moves).
  • Exports keep the height where they can. glTF has no displacement, so Export GLB can turn the height into real geometry instead. Export Blender, Export USD and Export MaterialX keep the height as displacement in meters. The Blender script targets Blender 4.2 and later.
  • Normal maps are OpenGL style (green up), as glTF's are. The Unreal Engine texture set flips green for you.
  • Reuse a material as one node. Make the material's graph a Function whose inputs are its settings. Other documents can then call it like any node. Lessons 18 and 19 show how, and every material in the Library folder is made this way.
  • Work small, finish large. The material preview is drawn on the CPU, not the GPU, and large textures take longer. The examples use a Size node of 512 or 1,024 that feeds every generator, so you can raise it once at the end.

Goes well with: Computer Graphics for ordinary images, 3D Staging to render materials in a scene, Library Assets for ready-made textures. The Image Processing workload brings Procedural Materials, Computer Graphics and Utilities together.

What is in the toolbox

Category Some of its nodes
Texture Sources Uniform Color, Linear Gradient, Image As Color, Image As Data
Texture Noises Perlin Noise, Fractal Noise, Cellular Noise, Grain, Flakes
Texture Shapes Shape (square, disc, star, ring, dome, cone and more)
Texture Patterns Bricks, Tiles, Stones, Planks, Hexagons, Herringbone, Weave
Texture Scatter Tile Generator, Tile Sampler, Splatter
Texture Adjustments Levels, Curve, Histogram Scan, Threshold, Posterize
Texture Blending Blend, Lerp, Height Blend
Texture Channels Gradient Map Stops, Color Variation, Tint, Greyscale
Texture Transforms Transform, Repeat, Mirror, Make It Tile, Break Up Tiling
Texture Filters Blur, Sharpen, High Pass, Edge Detect, Dilate, Erode
Texture Warps Warp, Directional Warp, Swirl, Slope Blur
Texture Fields Distance Field, Bevel, Flood Fill, Flood Fill To Random Color
Texture Height Maps Normal From Height, Ambient Occlusion, Curvature, Shade
Texture Weathering Edge Wear, Dirt, Leaks, Cracks, Scratches, Grunge
Texture Functions Pixel Function, Map Values
Materials Create Material, Blend Materials, Preview Material
Material Layers Layer, Layer Stack
Mesh Materials Load Mesh, Bake Mesh Maps, Triplanar Project, Preview On Mesh
Material Export Export GLB, Export Texture Set, Export Blender, Export USD, Export MaterialX
Painting Stroke, Random Strokes, Place Decal, Project Decal
Hand Painting Paint By Hand

See also