This page sits under my guide to 3D product configurators, which covers rules, 3D assets, performance and hand-off.
PBR stands for physically based rendering. In a product viewer, it describes a way of modelling how materials respond to light. The aim is consistent behaviour under different lighting conditions, rather than a painted highlight that only looks right from one angle.
Discuss your product rangeTry the demos
PBR is useful for ecommerce because customers need to understand the difference between finishes. It does not make a model automatically accurate: the geometry, material inputs, lighting, display and reference photography still matter.
Try roughness and metalness on the same geometry
This original Three.js material lab keeps one sphere and the same studio environment while you change two material inputs. The presets are demonstrations, not calibrated samples of a supplier’s finishes. The viewer loads its rendering library from a public CDN.

Loading material lab…
A repeatable observation exercise
- Start with the painted-surface preset and leave metalness at zero.
- Reduce roughness and watch the reflected lighting become more defined.
- Increase roughness and compare the broader, softer response.
- Select the copper-like preset. Keep the sphere and camera unchanged.
- Reset, then repeat the comparison on another screen.
The exercise isolates two controls. A real timber, fabric or leather material needs more than one flat colour and these two numbers. Grain, weave, surface detail and the physical sample all affect the final result.
What each input is trying to describe
In a metallic-roughness workflow, base colour, roughness and metalness describe different aspects of a surface. Roughness affects the spread of reflections. Metalness separates metallic behaviour from non-metallic behaviour; it is not a general “make it shiny” control. Polished plastic can be shiny without being metal.
Texture maps let these properties vary over a surface. A normal map changes the apparent surface direction for lighting without adding the same detail to the silhouette. If the product’s outline must change, a texture trick cannot replace the necessary geometry.
Why a painted metal product can behave like a non-metal
The light sees the coating on a painted cabinet or lamp, rather than bare metal beneath it. Treating every metal object as fully metallic can give the wrong appearance. Start from the visible surface and use reference images or measured material data where available.
For mixed surfaces, identify the actual material boundaries. A chrome leg, fabric seat and painted frame should not share one material merely because they belong to the same product. That separation also helps a configurator change the right part when a customer selects a finish.
A material review sheet for a product team
| Check | Evidence to keep |
|---|---|
| Identity | Supplier finish code, approved name and physical reference. |
| Scale | A known dimension and the texture’s repeat size. |
| Lighting | A fixed camera and environment for side-by-side review. |
| Colour | Reference photography and the limitations of the viewing display. |
| Surface response | Notes on gloss, grain, weave, coating and visible material boundaries. |
| Approval | Who reviewed the render, which version and when. |
Use the same review conditions across a range. Changing lighting between swatches makes it harder to tell whether the finish or presentation caused the difference. Keep the approved material version with the model export.
Each map has its own glossary entry: normal maps, roughness maps, metalness and ambient occlusion. Lighting is covered under environment maps and tone mapping, and the 3D commerce glossary lists the rest.
How a GLB file stores these maps
Most configurators load products as GLB files, which use the glTF 2.0 material model. It is worth knowing how that model packs the maps, because a wrong channel is a common cause of odd-looking materials.
- Base colour is a normal colour image. It is stored in sRGB, like a photo.
- Roughness and metalness share one image. Roughness lives in the green channel and metalness in the blue channel.
- Ambient occlusion is read from the red channel. Many teams pack it into that same image, which is often called an ORM texture.
- Normal maps follow the OpenGL convention, with green pointing up. A map made for DirectX needs its green channel flipped first.
Only base colour is treated as colour. The other maps are data, so they must not be colour-converted when you export them.
Related reading: 3D product visualisation.
Normal maps
A normal is an arrow that points straight out from a surface. A normal map is a texture that stores one of these arrows for every pixel, and the lighting engine shades each spot as if the surface tilted in that direction. It fakes fine detail such as grooves, stitching and small bumps, while the mesh stays simple enough to draw quickly.
The glTF 2.0 specification calls these tangent-space normals: each direction is measured relative to the surface itself, so the same map keeps working when the object turns. The colours in the file are direction data, not paint. Most normal maps look mostly blue and purple, because a flat patch stores a neutral blue value.
How I make one
Most normal maps start from a high-detail model that has been sculpted or scanned. A baking tool records how that dense surface differs from a lighter version and saves the difference as an image. The light mesh keeps the outline and the large shapes; the map supplies the stitching, grain or chamfered edges. I cover the wider process in 3D models for product configurators.
I then light the result from several angles. Dark patches or odd streaks usually mean the source and target meshes did not line up, and I fix that first, because a bad bake looks worse than no detail at all.
Why configurators use them
A configurator swaps parts and finishes as the shopper clicks, and heavy geometry slows every one of those changes, especially on a phone with a weak connection. A normal map keeps the mesh light while a woven fabric or a brushed steel handle still looks finished rather than flat. One map can also serve every option that shares the same surface, which saves a great deal of repeated work.
Pitfalls and limits
- Loading the map as colour data distorts the lighting across the whole surface. three.js documents this clearly.
- A convention mix-up makes bumps look like dents. As well as the green-channel flip described above, three.js notes that a map authored in the left-handed convention needs the y part of normalScale negated. A map that looks right in one viewer can look wrong in another, so I test every export in the target viewer.
- The outline never changes. Viewed edge-on, the light mesh gives the trick away, and the bumps cast no shadows. Deep grooves and visible edges need real geometry.
- Fine patterns can shimmer at a distance if texture filtering is poor. I check each model at the closest camera distance a shopper can reach, and add geometry or change the scale of the map if the detail breaks.
A height map is a different thing: it stores how high each point sits above a base surface, while a normal map stores the direction each point faces. The lighting step can use that direction directly, which is why normal maps are common in real-time 3D.
Roughness maps
A roughness map sets how blurry or sharp reflections look, pixel by pixel, so one material can be glossy in places and matt in others. A smooth surface reflects light in a tight pattern and gives a clear, mirror-like highlight. A rough surface spreads the same light out, so its highlights look soft and wide. The three.js documentation sets the scale from 0.0 for a smooth mirror to 1.0 for fully diffuse.
The map multiplies the material’s single roughness number. It can only scale that number down or keep it the same, so if you want the map alone to decide the value, set the number to 1.
A map or a single value
- Glossy finishes need low values, so their reflections stay sharp and clear.
- Fabric and wood usually need high values, because they scatter light softly.
- Use a map for variation such as scratches, worn edges or fingerprints, and a single number for uniform finishes.
Finishes that change the look without changing the shape, such as brushed, satin and gloss, can share one model with only the roughness value changing between them. A shopper comparing matt black with satin black sees the difference without any extra geometry, the file stays small and each option switch stays fast on a phone.
Pitfalls and limits
- Inverted maps. Some tools store gloss, the opposite of roughness, so a glossy surface turns matt and a matt one turns glossy. Read the label on each map before you export.
- Overwritten or swapped channels. Roughness belongs in the green channel of the metallic-roughness texture, as described above. If a tool writes it to a separate image, swaps the channels or lets another map overwrite green, a matt sofa may turn glossy and a steel handle may turn to plastic. I check the channels in a viewer on every export rather than trusting the export log.
- Busy maps. Noise in a roughness map shows up as uneven gloss or sparkle across the whole surface.
- Lighting. A roughness map cannot change what a surface reflects; that still comes from the environment and the lights. Poor lighting can hide a good roughness setting, and good lighting can hide a poor one. I look at each finish under two different lights, then under the lighting the page will actually use, before I trust it. HDRI lighting covers the environment side.
Roughness is also a simplification. A satin finish can look different at close range than at a distance, and one map cannot capture both views fully, so test in the viewers your shoppers actually use.
Material swatches
A material swatch is the tile or dot a shopper clicks to change a finish, such as a fabric, leather or metal. Behind it sits a material: a colour, a texture and surface values such as roughness and metalness. Choosing it changes the model straight away. The Three.js desk lamp demo offers shade colours Linen, Ink and Coral, and the lamp shows each result at once. That instant feedback is what a good swatch should give.
Matching a physical sample
I start by asking for a physical sample of each finish, then photograph it under the same light each time. The screen colour is tuned to that reference, not to a web image found online. Weave and grain need their own maps, because a flat colour cannot show the weave of a tweed, and the roughness and metalness values decide whether a fabric reads as matt or satin. Getting those values right matters as much as the colour.
- Show a clear name next to each swatch, such as Oak or Navy, and choose names that describe the finish, not just the colour.
- Show texture on textured finishes, rather than a flat colour that hides the real look.
- Design swatches with the configurator’s rules in mind. A fabric may only come in some sizes, and the rules engine should check that before the choice is offered, so a shopper is less likely to pick a finish the factory cannot make.
Colour accuracy has limits
Screens cannot show every colour a physical sample can, and the limit varies between devices. The CSS color-gamut media feature reports whether a screen supports approximately sRGB, Display P3 or the wider Rec.2020 range. Brightness, calibration and room lighting change what a shopper sees as well, so two phones can show the same swatch differently even when both are set up correctly. A swatch is a guide, not a promise.
- Say on the page that screens vary, and offer a physical sample where the colour matters most.
- Test vivid colours on both standard and wide-gamut screens before you publish.
- Run the final check on real devices, not only in the editor. Some finishes only look right under light the viewer does not control.
Swatch quality is also a balance with speed. Larger textures improve detail but slow the page on a phone, so I choose a texture size that looks right on a small screen and still loads quickly. Swatches matter most for furniture, which I cover on the furniture page; the React Three Fiber sofa demo shows fabric choices alongside a seat-count rule.
Where PBR fits in a configurator
PBR helps show the surface. The application still needs a clear swatch label, valid product combinations and an unambiguous summary. A good render should support the decision, with accessible text for the selected material.
Related guides
- Try the GLB viewer with your own asset, read what a GLB file contains, or explore the working configurator demos. For an implementation project, see 3D product configurator development.
- The watch demo and retro appliance demo show metal and painted finishes changing on real product shapes.
- Reference: Three.js MeshStandardMaterial documentation. The material lab and review sheet are original demonstrations. Published 13 October 2026.
- To see finishes change on a working product model, try the Three.js desk lamp demo.