Glossary · Materials & lighting

Texture maps

In short

Texture maps are images that assign material properties point by point across a 3D surface: colour, surface structure, roughness, metalness or shading. They sit on the model through UV coordinates [1].

The usual maps

glTF provides these textures for a material [1]:

MapWhat it controlsNote
Base colourcolour and pattern, e.g. wood grain, a labelcolour image
Metallic-roughnessmetalness (blue channel) and roughness (green channel)data image, linear
Normalfine surface structure without extra trianglestangent space
Occlusionshading in corners and joints (red channel)see ambient occlusion
Emissiveself-lit areas, e.g. displays, LEDscolour image

One export detail matters: colour textures such as base colour and emissive are stored in sRGB, data textures such as metallic-roughness linearly [1]. Mix them up and surfaces look too bright, too dark or wrongly glossy.

Normal maps: detail without geometry

A normal map changes how light falls on each pixel without changing the shape. Grooves, embossing, weave or chequer plate look three-dimensional although the surface stays flat. That saves a lot of triangles. If the model has no tangents, the viewer calculates them with a defined method (MikkTSpace) [1].

Where maps come from

  • photos and scans of real surfaces;
  • material libraries;
  • baking from a detailed model, for example normal and occlusion maps [2].

Size and memory

Every texture occupies its decompressed size on the graphics card, however small the JPEG was. GPU-compressed formats reduce this, but according to MDN they generally suit colours only, not normals [3]. Plan per material which maps are really needed and at what resolution; for GPU formats see KTX2.

From our library: the model of the office chair (example configurator, fictional product) uses colour and normal textures for upholstery and plastic parts.

Related terms

  • PBR (physically based rendering)

    PBR (physically based rendering) is a rendering approach that describes materials with physically motivated values such as base colour, metalness and roughness. They then look believable under changing light and similar across different viewers.

  • UV mapping

    UV mapping is the unwrapping of a 3D surface into a flat 2D layout so that an image (texture) sits correctly on it. Each vertex of a face gets a U/V coordinate in the image.

  • Baking

    Baking means storing expensively computed lighting or surface information in image files (textures) in advance. The browser then only displays it instead of recalculating it every frame.

  • KTX2 and Basis Universal

    KTX2 is a Khronos Group container format for GPU textures. With Basis Universal compression a texture is stored once and converted in the browser into whatever format the visitor's graphics card can use directly.

  • Normals

    Normals are direction vectors perpendicular to a surface. They decide how light falls on a model and whether it looks softly rounded or crisply edged. If a glTF file lacks them, the viewer computes flat normals; flipped normals are a common fault in CAD exports.

Examples to try

Example configurator · fictional product

Office chair configurator

An office task chair: mesh or upholstered back, covers, base, armrests and headrest – with adjustable seat height, synchro mechanism and an exploded view.

Furniture in the buyer’s room · Dimensions and sizes · Colours · Materials and finishes

Sources

  1. Khronos Group: glTF 2.0 Specification
  2. Blender Manual: Render Baking
  3. MDN Web Docs: WebGL best practices

← All terms in the glossary