KHR_materials_clearcoat Roughness and Normal Maps

The KHR_materials_clearcoat extension in glTF adds an independent, specular dielectric layer on top of a standard physically based rendering (PBR) material to simulate lacquered, varnished, or wet surfaces. This article outlines how the extension parameterizes clearcoat roughness and clearcoat normal maps, covering their property definitions, channel encodings, mathematical evaluation, and interaction with the underlying base material.

Clearcoat Roughness Parameterization

Clearcoat roughness determines the microfacet distribution of the clearcoat layer, controlling how sharp or blurry the top-layer specular highlights appear. It is evaluated using two properties:

  • clearcoatRoughnessFactor: A scalar float between 0.0 and 1.0 (default is 0.0), representing the overall perceptual roughness of the clearcoat layer.
  • clearcoatRoughnessTexture: A texture reference containing roughness data. In accordance with the glTF PBR standard, the clearcoat roughness value is sampled strictly from the Green (G) channel of this texture in linear color space.

When both a factor and a texture are present, they are multiplied together to determine the final clearcoat perceptual roughness:

\[\text{ClearcoatRoughness} = \text{clearcoatRoughnessFactor} \times \text{clearcoatRoughnessTexture.g}\]

To optimize memory and draw calls, glTF allows the clearcoat strength texture (clearcoatTexture, stored in the Red channel) and the roughness texture (clearcoatRoughnessTexture, stored in the Green channel) to reference the same image file.

The resulting perceptual roughness is converted to the linear roughness parameter \(\alpha\) by squaring it (\(\alpha = \text{ClearcoatRoughness}^2\)) for use in the standard Trowbridge-Reitz (GGX) microfacet distribution function.

Clearcoat Normal Map Parameterization

The clearcoat normal map defines the orientation of the microfacets at the top surface, separate from the normal map of the underlying base material. It is parameterized via the clearcoatNormalTexture property.

  • Color Encoding: Like the standard glTF normalTexture, the clearcoat normal map encodes a tangent-space normal vector \([x, y, z]\) into the RGB channels using standard linear encoding where values in \([0.0, 1.0]\) map to vectors in \([-1.0, 1.0]\).
  • Scaling: The property includes a scale parameter (float, default 1.0). The scale directly scales the tangent space \(X\) and \(Y\) components of the sampled normal:

\[\mathbf{n}_{\text{scaled}} = \text{normalize}\left(\left[ \mathbf{n}_{xy} \times \text{scale}, \mathbf{n}_z \right]\right)\]

  • Texture Coordinates: The clearcoat normal map can define its own texCoord index, allowing artists to tile clearcoat imperfections (such as scratches or dust) independently of the base mesh UVs.

Layer Separation and Geometric Normal Fallback

A defining architectural aspect of KHR_materials_clearcoat is that the clearcoat layer and the base layer maintain independent surface normals:

  1. Independent Evaluation: If clearcoatNormalTexture is defined, the clearcoat layer's specular reflections are evaluated against this perturbed normal. The base material continues to use its own standard normalTexture.
  2. Fallback Behavior: If clearcoatNormalTexture is omitted, the clearcoat layer does not inherit the base layer's normalTexture. Instead, it defaults to the interpolated geometric vertex normal (and vertex tangents). This enables the common real-world phenomenon where a smooth, glossy lacquer sits over a rough, heavily textured substrate, such as polished wood grain or carbon fiber weave.