The 3D Handbook
Key term

Normal map

A texture that stores a surface direction in every pixel, so a low-poly mesh shades as if it had more detail. Covers how the colours encode directions, tangent versus object space, the OpenGL/DirectX green channel, compression, and blending detail normals.

materialstexturingbakingnormal-maps

A normal map is a texture in which every pixel stores a direction instead of a colour. The shader uses that direction in place of the mesh's own normal, so light and shadow behave as if the surface had grooves, bolts or bricks that are not really there. Epic: it "alters the facing direction of each pixel, adding surface detail without extra geometry" (Unreal Engine documentation: Material Inputs).

A detailed slab with grooves and bolts, a plain box, and the plain box showing the baked details.
Left: the high poly, 2,076 triangles, with bevelled edges, two grooves and eight bolts modeled as separate pieces sitting on the surface. Middle: the low poly, a 12-triangle box. Right: the same box with a normal map baked from the high poly (Cycles, tangent space, 1024 px). The grooves, bevels and bolts appear in the shading, but the silhouette stays a plain box.Rendered in Blender 5.2 (Cycles) by the handbook author
A lavender normal map texture with outlines of bolts, grooves and bevelled edges.
The tangent-space normal map baked for the box in the high-to-low render, 1024 × 1024, on a Smart UV Project layout. Flat areas are exactly RGB 128, 128, 255; slopes shift the colour towards red or green depending on their direction.Rendered in Blender 5.2 (Cycles) by the handbook author

#How colours become directions

A direction has three parts, X, Y and Z, each between −1 and +1. The normal map puts them in the red, green and blue channels. glTF's specification spells out the mapping: red 0…1 to X −1…+1, green to Y, and blue 0.5…1 to Z 0…+1 (Khronos Group: glTF 2.0 Specification). A flat, unchanged surface is therefore (0.5, 0.5, 1.0), the familiar lavender.

A side view of a flat surface with a semicircular bump. Orange arrows show the surface normal at five points: straight up on the flat parts, tilted left and right on the sides of the bump, and straight up on top. Below each point is a colour swatch with its values: lavender 128, 128, 255 for the flat and top points; blue 37, 128, 218 for the left-tilted point; pink 218, 128, 218 for the right-tilted point.
Tilting a normal to the right raises red; tilting it left lowers red. Straight up is always 128, 128, 255.Diagram by the handbook author

Because these are numbers, not colours, a normal map must be read as linear data; glTF says it "MUST be encoded with the linear transfer function" (Khronos Group: glTF 2.0 Specification).

#Tangent space and object space

The directions have to be measured relative to something.

For tangent-space maps, the baker and the engine must calculate the tangent frame identically, or you get seams and smudges. Marmoset: "If different tangent spaces are used in each step, the orientation of the normals in the map will no longer match" (Marmoset: The Toolbag Baking Tutorial).

#The green channel: OpenGL or DirectX

Programs disagree on which way Y points. Adobe: "OpenGL expects the first pixel to be at the bottom while DirectX expects it to be at the top" (Substance 3D Bakers documentation: What is the difference between the OpenGL and…). In practice:

A wrong green channel makes bumps look like dents when lit from above or below. The fix is to invert green, either at export or on import: Godot's Normal Map Invert Y (Godot documentation: Importing images), Unity's flip-green option (Unity Scripting Reference: TextureImporter.flipGreenChannel). The tangent space and MikkTSpace page has the full table.

#Compression and bit depth

Normal maps break easily under colour compression, so engines treat them specially:

See texture formats, compression and mipmaps.

#Detail normals

A detail normal map is a small tiling normal map (wood grain, fabric weave, pores) layered over the main normal map, often at a higher tiling rate. Both Unity URP and Godot have dedicated detail slots (Unity Manual: Lit shader material Inspector window…; Godot documentation: Standard Material 3D and ORM Material 3D), and HDRP's detail map packs detail normal X and Y into its alpha and green channels (High Definition Render Pipeline manual 17.0: Mask map and detail map). See detail maps and macro variation.

Combining two normal maps is not like layering colours. Barré-Brisebois and Hill explain: "Since the data represents directions, we can't simply treat the channels independently as we do for colours" (Self Shadow: Blending in Detail). Simply averaging them ends up "'flattening' both the base orientations and the details" (Self Shadow: Blending in Detail). Use your engine's normal-blend node (whiteout, UDN or reoriented normal mapping) instead of a Photoshop overlay (Self Shadow: Blending in Detail).

#Example

#Common mistakes

#In different tools

tangent space and MikkTSpace · baking · normals · height and displacement maps · detail maps and macro variation · fixing baking artefacts · texture formats, compression and mipmaps

#Further reading and watching

Compares four normal-blending methods by cost and quality; watch before setting up detail normals. Watch on YouTube

References

  1. Epic Games · Material Inputs (Unreal Engine 4.27) · Unreal Engine documentation, 2021 · docs · accessed 2026-10-21
  2. Khronos Group · glTF 2.0 Specification · Khronos Group (GitHub) · docs · accessed 2026-10-21
  3. Blender Foundation · Render Baking (Cycles) · Blender Manual (2.93), 2021 · docs · accessed 2026-10-21
  4. Joe Wilson · The Toolbag Baking Tutorial · Marmoset, 2017 · article · accessed 2026-10-21
  5. Unity Technologies · Lit material Inspector reference (HDRP) · High Definition Render Pipeline manual 17.0 · docs · accessed 2026-10-21
  6. Adobe · What is the difference between the OpenGL and DirectX normal format? · Substance 3D Bakers documentation · docs · accessed 2026-10-21
  7. AlexG · DirectX vs OpenGL: Understanding, Using, Creating DirectX or OpenGL Normal Map Formats · World of Level Design, 2026 · article · accessed 2026-10-21
  8. Godot Engine contributors · Standard Material 3D and ORM Material 3D (documentation source) · Godot documentation (GitHub) · docs · accessed 2026-10-21
  9. Godot Engine contributors · Importing images (documentation source) · Godot documentation (GitHub) · docs · accessed 2026-10-21
  10. Unity Technologies · TextureImporter.flipGreenChannel · Unity Scripting Reference (6.3 LTS) · docs · accessed 2026-10-21
  11. Nathan Reed · Understanding BCn Texture Compression Formats · Nathan Reed's coding blog, 2012 · article · accessed 2026-10-21
  12. Epic Games · Texture Compression Settings (Unreal Engine 4.27) · Unreal Engine documentation, 2021 · docs · accessed 2026-10-21
  13. Unity Technologies · Lit shader material Inspector window reference for URP · Unity Manual (6000.2) · docs · accessed 2026-10-21
  14. Unity Technologies · Mask map and detail map (HDRP) · High Definition Render Pipeline manual 17.0 · docs · accessed 2026-10-21
  15. Colin Barré-Brisebois and Stephen Hill · Blending in Detail · Self Shadow, 2012 · article · accessed 2026-10-21
  16. Godot Engine contributors · BaseMaterial3D (class reference source) · Godot Engine (GitHub) · docs · accessed 2026-10-21

Also consulted

Last updated 2026-10-22