glTF Metallic Roughness Texture Channels Explained
In the glTF 2.0 specification, physical material properties are
packed into single texture files to optimize memory and rendering
performance. This article explains exactly which color channels within
the metallicRoughnessTexture define roughness and
metalness, how these values interact with material factors, and how to
properly format these textures in 3D production pipelines.
In a glTF metallicRoughnessTexture, the data is stored
in the following standard color channels:
- Green Channel (G): Stores the roughness values. A value of 0.0 (black) represents a completely smooth, mirror-like surface, while 1.0 (white) represents a completely rough, diffuse surface.
- Blue Channel (B): Stores the metalness (metallic) values. A value of 0.0 (black) represents a dielectric (non-metallic) surface such as wood, plastic, or stone, while 1.0 (white) represents a fully metallic surface.
- Red Channel (R): Unused by the default metallic-roughness definition. However, in standard asset workflows, the red channel is frequently packed with the Ambient Occlusion map, creating a combined "ORM" (Occlusion, Roughness, Metallic) texture.
- Alpha Channel (A): Ignored by the glTF specification for this material model.
Value Calculations
The final metallic and roughness values used in rendering are calculated by multiplying the sampled texture channel values by their corresponding scalar factors defined in the material:
- \(\text{Roughness} = \text{Texture(Green)} \times \text{roughnessFactor}\)
- \(\text{Metallic} = \text{Texture(Blue)} \times \text{metallicFactor}\)
By default, both roughnessFactor and
metallicFactor are set to 1.0 in glTF. If no texture is
assigned, the material defaults entirely to these scalar values.
Color Space Considerations
Because roughness and metallic data represent raw mathematical scalar
quantities rather than visible color information, the
metallicRoughnessTexture must always be sampled in
linear color space. Authoring tools and rendering
engines must ensure that sRGB-to-linear conversion is disabled for this
texture to prevent visual inaccuracies and incorrect shading
responses.