Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coordinate System and Units #2352

Open
helviett opened this issue Dec 2, 2023 · 2 comments
Open

Coordinate System and Units #2352

helviett opened this issue Dec 2, 2023 · 2 comments

Comments

@helviett
Copy link

helviett commented Dec 2, 2023

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
Copy link
Contributor

javagl commented Dec 2, 2023

See #1640
And #2139
And #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
Copy link
Contributor

aaronfranke commented Dec 8, 2023

@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:

  • The front side is +Z, the rear side is -Z. This implies the left side +X is and right side is -X.
    • These sides are used for oriented 3D assets like characters and many props.
    • For Blender where +Z is up, -Y is front and +Y is rear.
  • The forward direction is -Z, the back direction is +Z. This implies the left direction -X is and right direction is +X.
    • These directions are used for things like cameras, lights, etc.
  • For non-oriented assets, like maps, use the cardinal directions instead: +X east, -X west, +Z south, -Z north.
    • For Blender where +Z is up, +Y is north and -Y is south.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants