Video summary

Unreal 5.8 - Materials Masterclass - Chapter 7: Material Instances & Custom Nodes

Main summary

Key takeaways

Technology

Main topic

Chapter 7 of an Unreal Engine 5.8 Materials Masterclass focuses on reducing repetition and improving iteration speed by using:

  • Material Functions (to package reusable node logic)
  • Material Instances (to create many variations from a single master material, using parameters instead of recompiling graphs)

Why the video introduces material instances/functions (AAA-scale problem)

  • Creating a brand-new material (or duplicating materials for every object) can explode counts to hundreds/thousands/more in large projects.
  • Unreal shader compilation becomes a pain:
    • Shader compilation happens at project/game launch and gets worse with more unique materials.
  • If edits require changing node graphs and reassigning materials repeatedly, iteration becomes:
    • slow
    • error-prone

Material Functions (reusable “custom nodes”)

Concept

  • A Material Function bundles a group of nodes into one reusable asset with defined inputs/outputs.
  • It behaves like a built-in engine node.

Benefit

  • Reuse complex logic across many materials without rewriting it.

Additional note

  • Material functions can also have instances.
  • When creating function inputs/outputs, the display order is controlled by Sort Priority.

Material Instances (infinite parameter variations)

Concept

  • A Material Instance provides “child” variations of a single master material.
  • It changes parameters (color, textures, scalars, switches) rather than rewriting graphs.

Performance and iteration advantages emphasized

  • Bypasses shader compilation for each parameter change:
    • no extra compile time
    • no extra editor/game init cost
  • Real-time updates in the 3D viewport when parameters change.
  • The base/master material’s complex logic is loaded once, reducing overhead when rendering many surface variations.
  • Parameters can be controlled at runtime via BluePrints (e.g., adjust settings at game launch).
  • Artists/designers get a cleaner instance UI (sliders, checkboxes, color pickers) instead of confusing node graphs.

Demonstration: parameter change vs duplicated materials

  • Two spheres start with the same base material.
  • Changing the base material requires:
    • compile/apply
    • affects both spheres
    • would require duplication to keep them different
  • Using a material instance instead shows:
    • a simplified details panel instead of the node graph
    • parameter edits updating instantly
    • one sphere changing while the other stays unchanged
  • Updating parameters in the instance propagates variation without editing/rebuilding logic per object.

Creating master material parameters (the 4 main parameter types)

The tutorial builds a “simple mat master” and adds parameters:

  • Vector Parameter (typically for colors; always a 4D vector)
  • Texture Sample 2D Parameter
  • Scalar Parameters (e.g., roughness, metallic)
  • Static Switch Parameter (toggles logic to disable the unused branch efficiently)

Important rules

  • Parameter names must match so they appear and behave correctly in the instance UI.
  • If you use the same name for two parameters, they share a value.

Use case shown

A static switch chooses between:

  • a default green color path
  • a texture path

Instances can then enable/disable the switch and set textures, metallic/roughness, etc.


Building a full procedural Material Function: “Brick Generator”

The chapter creates a Material Feature / Material Function (MF) for procedural brick generation.

Major steps in the function

1. Inputs

  • UV coordinates input (default preview uses texture coordinates)
  • X count and Y count (brick grid density)
  • Offset for alternating rows staggering
  • Gap size for grout/mortar thickness
  • Random grain and random seed for per-brick variation

2. Brick UV tiling and staggering

  • Scale UVs by brick counts
  • Use frac to get repeating UV behavior
  • Replace frac with:
    • Floor (to get integer row/indices)
    • Fmod (modulo) to alternate every other row
  • Create a mask pattern to shift alternate rows horizontally by an offset

3. Graph organization improvements (readability)

  • Named Reroute declarations (variable-like wires) to reuse common UV computations
  • Comment boxes (“Create comment from selection”, hotkey C) with customizable color and size

4. Brick and mortar masks

  • Center brick UVs per tile (transform UVs from 0..1 to -1..1, then Absolute)
  • Use OneMinus and Step to define:
    • interior brick area
    • edges
  • Outputs:
    • Brick mask (where brick exists)
    • Solution/grout mask (inverted brick mask)

5. Correcting texture mapping for gaps

  • If you multiply a sampled texture by brick mask, grout can cause texture “loss”
  • Fix by adjusting brick UVs:
    • Subtract half gap to shift UVs away from brick edges
    • Multiply by (1 + gap) to rescale so each brick texture fits correctly

6. Per-brick randomness (without expensive noise)

Instead of Unreal’s random noise generators, the function uses a pseudo-random approach:

  • Create per-brick grid identifiers using ceil so values stay constant per brick area
  • Use Dot Product with a constant vector and an input random seed
  • Apply Sign, multiply by a large non-integer number
  • Use Frac to bring it into a 0..1 distribution
  • Produces a value like “random for each brick” (optionally masked by brick area inside/outside the function)

7. Expose to library

  • Add a description
  • Set Expose to Library so the brick generator appears in the material function library under a searchable name
  • Set Library Categories

Using the brick generator function inside a Material

A later section builds a simple material demonstrating:

  • Two textures/colors:
    • Grout (mortar) color parameter + grout texture parameter
    • Brick color parameter + brick texture parameter
  • Random per-brick UV offsets to reduce visible repetition:
    • offset brick UVs by the random value per brick so each tile looks different
  • Blend using Lerp:
    • blend mortar vs brick using the brick mask
  • Color noise via second Lerp:
    • darken brick portions using random values multiplied by a “color noise amount” scalar
    • mask it so it affects bricks only (not mortar)

Exposed controls (example parameters mentioned):

  • Gap size (controls grout width)
  • Brick density/size parameters (X/Y counts)
  • Color noise amount (how much bricks vary darker)

Limitations / “next improvements” flagged by the instructor

  • Normals need to be generated procedurally because the brick pattern is generated by the brick generator.
  • Mortar/aspect ratio issues:
    • vertical gaps appear wider than horizontal ones (needs refinement)
  • Overall:
    • presented as a strong foundation

Forward-looking content

Next week (next chapter) will cover timing and animation, including:

  • ripple effects using math
  • gradient-based transitions
  • turning static structures into animated ones

Main speakers / sources

  • Enrique (speaker; referenced at the end: “I’m Enrique”)
  • Source content: Unreal Engine 5.8 Materials Masterclass (video series; Chapter 7: Material Instances & Custom Nodes)

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video