Blog · Deep dives
PBR materials in GLB — a practical primer
Open a modern GLB in any viewer and the model looks photorealistic. Metal looks like metal, plastic looks like plastic, wood looks like wood — even though the renderer is the same in each case. The difference is the material. PBR (Physically Based Rendering) is the system that makes it work. Here's what's actually in a GLB material and how each piece contributes.
Why PBR replaced the old system
Before PBR, materials in 3D were ad-hoc: diffuse colour, specular colour, shininess number, ambient term. Different renderers used different conventions; the same material on different engines could look completely different.
PBR replaces that with a small set of parameters that describe the physical properties of a surface — does it conduct electricity (metal vs dielectric), how rough is the microscopic surface, what colour does it absorb. Any compliant renderer that follows the standard produces the same look. That's the breakthrough.
The five maps
Base color (albedo)
The "what colour is this material in flat lighting" map. For a non-metal (plastic, wood, fabric, skin) base color is the diffuse colour you'd intuit. For a metal it's the colour of the reflection — gold's base color is a yellow-tan, copper's is a pinkish-orange.
Important: base color contains no lighting. No baked shadows, no AO, no specular highlights. If you import a painted texture from an old asset library and it has shadows baked in, the result will look wrong under PBR.
Metallic
A single value (or texture) from 0 (fully dielectric — plastic, wood, fabric, skin, paint) to 1 (fully metallic — bare metal). There's no in-between physically; the texture mostly stores 0 or 1, with a transitional band only at edges where a metal coating meets a non-metal substrate.
Common mistake: using metallic = 1 for shiny plastic. Plastic is dielectric — metallic = 0, roughness = low.
Roughness
Microscopic surface roughness. 0 is a perfect mirror, 1 is a perfectly diffuse surface. Real materials live everywhere in between — polished steel is 0.05, brushed steel is 0.4, matte paint is 0.7, unfinished concrete is 0.95.
Roughness is usually the most expressive PBR map. Variation across a surface — fingerprints, wear, dust — comes through as roughness changes, not colour changes.
Normal map
Encodes high-frequency surface detail as a per-pixel surface normal. The geometry stays smooth, but lighting calculations use the per-pixel normal to compute as if the surface were bumpy. Lets you simulate detail (rivets, fabric weave, leather grain) without the polygon count.
Normal maps in GLB use tangent-space — RGB channels encode XYZ of the perturbed normal in tangent space, decoded back at render time.
Occlusion (ambient occlusion)
Pre-computed shadowing in crevices that ambient light doesn't reach. Darkens the corner where two surfaces meet. Ambient occlusion is cheap to bake offline and adds enormous visual depth.
In glTF, occlusion is sampled from the red channel. Often baked into the same texture as roughness (G channel) and metallic (B channel) — known as the ORM packing.
The ORM packing
Storing occlusion, roughness and metallic in one RGB texture saves bandwidth and memory:
- R = Occlusion
- G = Roughness
- B = Metallic
The glTF spec allows occlusion to either share or have its own texture; most production tooling defaults to ORM-packed.
Optional maps
Beyond the core five, glTF supports optional extension maps via the KHR_materials_* family of extensions:
- Emissive — surfaces that glow on their own (LED, screen, lava).
- Clearcoat — a separate glossy layer on top (car paint, lacquered wood).
- Transmission — light passes through (glass, water).
- Sheen — soft retro-reflection at grazing angles (velvet, fabric).
- Iridescence — colour shifts with viewing angle (soap bubble, beetle shell).
- Anisotropy — directional reflection (brushed metal).
Each is its own glTF extension; viewers that don't support a given extension fall back gracefully.
How environment lighting fits in
PBR materials only look correct under image-based lighting (IBL) — an HDR environment map. The renderer samples the environment based on the surface's reflectance properties to produce realistic specular reflections and diffuse irradiance.
This is why GLB viewers ship with a default studio HDR — without it, a polished metal sphere has nothing to reflect and looks flat black.
Common authoring mistakes
- Baking lighting into base color. The base color must be flat. Lighting comes from the renderer plus normal + roughness.
- Metallic = 1 for plastic. Plastic is dielectric. Use metallic = 0, low roughness for shine.
- Normal map in linear colourspace. Normal maps are linear data, but base color is sRGB. Many engines auto-detect; glTF marks the textures explicitly. If a normal map looks too contrasty or pastel, the colourspace flag is wrong.
- Forgetting occlusion. Without AO, crevices look flat. The depth perception you get from AO is often more important than perfectly accurate base color.