Skip to main content
Version: Next (dev)

Material Layer Nodes

The layered material stack is built from a small set of visual shader nodes in the Material Layers category of the node menu. The Layers panel creates and wires them for you, but you can also use them in any visual shader graph to build your own layer blends.

This page is for graph authors. If you only use the Layers panel, you do not need it.

The Material Layer Pin​

A layer travels between nodes as a single Material Layer wire, drawn in purple. One wire carries everything a surface needs: every input of the OpenPBR output (base colour, metalness, roughness, normal, occlusion, emission and the values of every lobe) plus a Height for height blending.

The workflow is always the same:

  1. Make a layer: Texture Layer from textures, or Make Layer from values and your own nodes.
  2. Optionally add lobes with the lobe nodes and adjust it with Modify Layer.
  3. Blend layers with Blend Layers, using a mask built from Layer Mask Term nodes.
  4. Split the result with Split Layer and connect its outputs to the OpenPBR output.

A Material Layer pin connects only to other Material Layer pins. If you try to connect it to a float or colour pin, the editor refuses with "A material layer connects only to material layer pins. Use Split Layer to read single values of a layer, Make Layer to build one."

Building Layers​

Texture Layer​

A layer from textures: base colour, normal, ORM (occlusion, roughness, metalness) and height. Its title shows the base colour texture's parameter.

A Texture Layer node

A Texture Layer that a stack built is titled after its base colour parameter, which includes the layer's id, for example Layer: Layer850ef771_BaseColor.

Property or pinDescription
Base Color / Normal / Orm / Height TextureThe names of the material parameters that hold the four textures.
Use Base Color / Normal / Orm / Height TextureTurns a texture off. A texture that is off is not sampled: the layer uses Tint, Metalness and Roughness as values, a flat normal and height 0.5.
Invert Occlusion / Roughness / MetalnessFlips a channel of the ORM texture, for cavity or gloss maps.
ProjectionMeshUV or Triplanar. Triplanar projects along the world axes and samples every texture three times.
UVThe UVs for MeshUV. Defaults to the first mesh UV set.
World Position, World NormalThe position and normal that Triplanar uses.
TilingHow often the textures repeat: per UV unit, or per metre with Triplanar.
TintMultiplies the base colour texture, or is the colour without one.
Metalness, RoughnessMultiply the ORM channels, or are the values without an ORM texture.
Height ContrastScales the height around 0.5.
EmissionThe colour the layer emits.

Make Layer​

A layer from values. Its inputs are the inputs of the OpenPBR output, with the same names and defaults, plus Height (0 to 1, compared by height blending). Connect your own nodes to any of them. A layer stack layer whose source is Graph creates a Make Layer node for you to wire.

A Make Layer node with a colour constant wired into it

Lobe Nodes​

Each lobe node takes a Material Layer, sets one OpenPBR lobe on it, and outputs the changed layer. Chain several to add several lobes. In the graph their titles are the node type names: LayerSpecular, LayerAnisotropy, LayerCoat, LayerFuzz, LayerSubsurface, LayerTransmission and LayerThinFilm.

The LayerCoat node

NodePinsUse it for
SpecularWeight, Tint, IORWeaker or tinted reflections. The roughness stays the layer's own.
AnisotropyAmount, Rotation (0 to 1 is a full turn)Highlights stretched along the tangent, as on brushed metal.
CoatWeight, Tint, Roughness, IOR, Darkening, NormalLacquer, varnish, a film of water. Normal is the coat's own; leave it flat for a smooth coat over a bumpy surface.
FuzzWeight, Tint, RoughnessA soft sheen at grazing angles: dust, velvet, frost.
SubsurfaceWeight, Tint, Radius, Radius Scale, Scatter AnisotropyLight that scatters inside the surface: snow, wax, skin.
TransmissionWeight, Tint, Depth, Scatter, ThicknessLight that passes through: ice, glass. The material then draws with the transparent objects.
Thin FilmWeight, Thickness (micrometres), IORAn iridescent film: oil on water, a soap bubble. The material is then shaded in the forward pass.

See Lobes on the layered materials page for what each value does.

Modify Layer​

Changes a whole layer without splitting it.

PinDescription
TintMultiplies the base colour.
Roughness Scale, Metalness ScaleScale roughness and metalness.
Normal Strength0 flattens the normal, 1 leaves it unchanged.

Blending Layers​

Layer Mask Term​

One term of a layer mask: a value from 0 to 1, shaped by Contrast and Bias and optionally inverted. Its title shows the source, for example Mask: Slope. Chain terms by connecting a term's Mask output to the next term's Previous input; Combine (Multiply, Add, Subtract, Max, Min) says how they mix. A term with nothing connected to Previous is the first term.

Two chained mask terms, Mask: Slope into Mask: Noise

SourceValue
InputThe Input pin. Connect a vertex colour or texture channel here.
Slope1 on surfaces facing Up (default +Z), 0 facing away.
NoiseFractal noise on the UVs, Noise Scale cells per UV unit.
Height BelowHigh in the low parts of the layers below. Connect those layers to Below.
Constant1 everywhere.

Blend Layers​

Puts the Above layer over the Below layers. Its title shows the mode, for example Blend: Height.

A Blend Layers node in Height mode

Property or pinDescription
ModeMask blends by the mask. Height raises the layer by the mask, and the higher surface wins within Depth.
Below, AboveThe two layers.
MaskWhere the Above layer shows, from Layer Mask Term nodes. Not connected: everywhere.
OpacityMultiplies the mask.
DepthHeight mode: how far apart in height the two surfaces mix. Small values give sharp edges.
Height OffsetMoves the Above layer up (over the layers below) or down (into their gaps).
Material Layer (output)The blended layer.
Weight (output)How much of the Above layer shows, 0 to 1. Useful as a mask for further effects.

Every value of the layers blends, lobes included: a coat on the upper layer fades in with its mask.

Split Layer​

Turns a layer back into single values: every input of the OpenPBR output, plus Height. Connect the ones you need. A layer stack connects only the outputs its layers use, so lobes that no layer adds cost nothing.

A Split Layer node wired into the OpenPBR output, with the Layers.BaseColor portal below

Nodes Owned by a Layer Stack​

The nodes that a layer stack builds are locked. Trying to change one shows "This node belongs to the layer stack". Change the layer in the Layers panel instead, or detach the stack to turn them into ordinary nodes.

You can still use the stack's results elsewhere in the graph. The stack provides portals named Layers.BaseColor, Layers.Metalness, Layers.Roughness, Layers.Occlusion, Layers.Normal, Layers.Emission and Layers.Height. And if you wire an OpenPBR output input to nodes of your own, that input stays yours: the stack leaves it alone and the Layers panel lists it.

A layer stack needs an OpenPBR Output node. With another output node the panel reports "A layer stack needs the OpenPBR output".

Older Layer Nodes​

Graphs and stacks saved before the Material Layer pin used separate nodes that passed a layer as four values: Layer Sample, Layer Pack, Layer Mask, Layer Blend and Layer Output. These nodes still load and compile, so existing graphs keep working, but they are hidden from the node menu.

When you open a material whose layer stack was built with the old nodes, the stack is rebuilt with the new nodes. The material is marked as modified; save it to keep the rebuilt graph. Old nodes in a hand-built graph are not changed.

See Also​