THREE.JS / FOUNDATIONS 260

Export the normal. Keep the tangent straight.

The glTF exporter has an important orientation boundary: normal maps use glTF's top-left texture convention, while Three.js materials expose a signed normal-scale Y. This lab keeps an OpenGL-style map beside a DirectX-style map, then inspects what the binary exporter and loader preserve.

Preparing normal-map fixtureWebGL2

Building two planes with opposite tangent-space Y conventions…

backend
—
source
—
artifact
—
round-trip
—
frame ms
—
Normal-map controlsready

Export GLB serializes the two source meshes; Load GLB parses that exact ArrayBuffer through GLTFLoader.

Normal orientation contractGLTFExporter
OpenGL mapwaiting

normalScale.y +0.75

DirectX mapwaiting

normalScale.y -0.75

UV sourceThree.js

plane attribute policy

GLB outputnot exported

binary glTF

loadernot loaded

independent parse

The official example demonstrates paired OpenGL and DirectX normal maps, a glTF UV alternative, and binary export. This local contract also makes the sign-preservation boundary observable.

Generated normal maps keep the study deterministic and offline-friendly.

Derived from the official glTF normals exporter example, GLTFExporter, and MeshStandardMaterial.

OPENGL NORMAL +Y tangent
DIRECTX NORMAL −Y tangent
LAB 260 / GLTF NORMAL MAP EXPORT