Coordinate convention?

Started by
7 comments, last by Timkin 20 years, 1 month ago
Hi folks, I just wanted to check what the convention is for labelling coordinates relative to the screen within the graphics community. As I understand it, typically x is the horizontal coordinate and y as the vertical coordinate. Is it the case that within the graphics community these are preserved, with the addition of z as the depth coordinate (into the screen)? Thanks, Timkin
Advertisement
... except:
OpenGL -- Z goes out of the screen
D3D -- Z goes into the screen


However, when you say "labeling", do you mean diagrams and charts?
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
No, I simply want to know what the convention is for coordinate labels. For example, in a right handed coordinate system, if z is into the screen, then one could label positive x as vertical and up and positive y as horizontal and right (relative to looking at the screen), or positive x as horizontal and right and positive y as vertical and down. Alternatively, if z is out of the screen, then one could label positive x as horizontal and right and positive y as vertical and up.

... and then there are left-handed coordinate systems.

Is one of these options a standard convention, or do people just choose their own convention and describe it before going on to describe their operations (like moving things around, setting camera attributes, etc.)?

Thanks,

Timkin
My convention:
1. The origin is at the center of the viewport.
2. +Y is up.
3. +X is right.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!



+X Right
+Y Into the screen
+Z Up
+X = right
+Y = up
+Z = into the screen.

My Site
Coordinate system conventions typically depend on the programmer/engine, they''re mostly a matter of preference. You could also stick with either the OpenGL or the Direct3D one. But since coordframe conversions are easy to encode in either the world or projection matrix, they come basically for free.

Choose whatever you feel comfortable with. If your engine is supposed to work with an existing 3D modelling package, then it is usually a good idea to inherit the axis conventions from the modeller.
How can i convert one system to another??
If you just want to convert from the left handed system to the right handed system (or vica-versa), you can change the sign on the z component. For anything more complicated, you''d probably need a basic understanding of linear algebra.

This topic is closed to new replies.

Advertisement