KhronosGroup / glTF

glTF – Runtime 3D Asset Delivery
Other
7.02k stars 1.13k forks source link

Coordinate System and Units #2352

Open helviett opened 6 months ago

helviett commented 6 months ago

Spec says:

glTF uses a right-handed coordinate system. glTF defines +Y as up, +Z as forward, and -X as right; the front of a glTF asset faces +Z.

Should it be +X as right?

javagl commented 6 months ago

See https://github.com/KhronosGroup/glTF/issues/1640 And https://github.com/KhronosGroup/glTF/pull/2139 And https://github.com/KhronosGroup/glTF/issues/2149

We're in the process of trying to find a better wording/image. So even though this is a duplicate, we could as well leave this issue open for now...

aaronfranke commented 6 months ago

@helviett There is a bit of confusion with the wording because of the mixing of directions and sides (forward vs front and back vs rear).

In OpenGL, cameras face -Z. By convention, it is common for objects to face towards the camera (so they face +Z). In GLTF, this convention is codified as part of the standard. Meaning: