Skip to content

Proposal: MaterialX Flake3d Node #2609

@msuzuki-nvidia

Description

@msuzuki-nvidia

MaterialX Flake3d Node Proposal

Summary

Flake generation provides a procedural method to create sparkling, metallic flake effects commonly seen in automotive paints, cosmetics, and other materials with embedded reflective particles. This document proposes a new MaterialX node <flake3d> based on the algorithm developed by Matthias Raab that generates procedurally distributed flake normals with controllable size, roughness, and coverage.

This node is particularly valuable for creating realistic car paint materials, glittery surfaces, and other effects that require procedural generation of micro-scale reflective particles without requiring high-resolution texture maps.

Key Features

The <flake3d> node provides the following key features:

  • Procedural generation: Creates infinite variations of flake patterns without requiring texture assets
  • Physically-based distribution: Uses microfacet theory (GGX) for realistic normal perturbation
  • Efficient evaluation: Optimized algorithm suitable for real-time rendering
  • Artistic control: Intuitive parameters for size, roughness, and coverage density

Parameters

<flake3d>

Parameter Type Range Default Description
size float [0.0, 5.0] 0.01 Size of individual flakes
roughness float [0.0, 1.0] 0.1 Roughness of the flake normal distribution
coverage float [0.0, 1.0] 0.5 Density of flake coverage (0 = no flakes, 1 = full coverage)
position vector3 Pworld 3D position for flake generation
normal vector3 Nworld Base surface normal
tangent vector3 Tworld Surface tangent vector
bitangent vector3 Bworld Surface bitangent vector

Outputs

The node returns multiple outputs to enable advanced shading workflows:

Output Type Range Description
id int [0, INT32_MAX] Unique identifier for each flake (0 for no flake)
rand float [0.0, 1.0] Random value per flake for additional variation (0 for no flake)
presence float [0.0, 1.0] Depth-based presence value per flake for additional variation (0 for no flake)
normal vector3 The computed flake normal (base normal if no flake present)

Examples

Outputs

rand presence normal

Basic Flake Material

<flake3d name="flakes" type="multioutput">
  <input name="size" type="float" value="0.01"/>
  <input name="roughness" type="float" value="0.2"/>
  <input name="coverage" type="float" value="0.5"/>
</flake3d>

<standard_surface name="surface">
  <input name="base" type="float" value="0.1"/>
  <input name="base_color" type="color3f" value="0.06, 0.424, 0.679"/>
  <input name="metalness" type="float" value="1.0"/>
  <input name="specular_roughness" type="float" value="0.2"/>
  <input name="coat" type="float" value="0.5"/>
  <input name="coat_roughness" type="float" value="0.05"/>
  <input name="normal" type="vector3" nodename="flakes" output="normal"/>
</standard_surface>
size = 0.01 size = 0.1 size = 1.0
roughness = 0.05 roughness = 0.2 roughness = 0.5
coverage = 0.1 coverage = 0.5 coverage = 1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions