What is three.js’s normal map handedness convention?

It may be helpful to have this documented. @emackey pointed out an issue with GLTF2Loader (donmccurdy/three-gltf-viewer#10) and normal map inversion seems to be responsible. For comparison:

BabylonJS: x-axis = left, y-axis = down
OpenGL: x-axis = right, y-axis = up
DirectX: x-axis = right, y-axis = down

Author: Fantashit

1 thought on “What is three.js’s normal map handedness convention?

  1. The answers have been worked out by @WestLangley and @donmccurdy here: #13784 (comment)

    Hopefully I’m summarizing correctly:

    • ThreeJS’s default normal map handedness is OpenGL, right-handed, same as glTF.
    • ThreeJS’s default UV origin is lower-left, opposite of glTF’s upper-left UV origin.
    • As a result, GLTFLoader must flip the UVs and then flip the normal handedness to compensate.

Comments are closed.