I'm really trying to understand this from a mathematical viewpoint. After all, numbers are numbers, the chirality or handedness depends on how one interprets it.

Say I've three basis vectors x (1, 0, 0), y (0, 1, 0) and z (0, 0, 1). The same basis vectors would be seen differently by the two systems but the numbers remain the same.

enter image description here

When we do a cross product of x and y we'd get z in both systems, again the numbers of the result are the same, it's just the interpretation of the observer.

Then why do I see questions about handedness all the time? Is there a place where a game developer needs to differentiate and work in converting between the two really? Eric Haines in a related article uses the term "right-handed data". What does this really mean, aren't they all numbers? Why would they force a coordinate system on the user? Also do APIs like GL or DX force a system at some point? I've read somewhere that, in OpenGL the camera is always at origin looking at -Z direction, while it's the opposite in DirectX.

It'd be great if someone can list out where this convention really makes a difference and why.

EDIT: I think can explain it more explicitly since many seem to misunderstand the question (sorry, I'm not a native speaker of this tongue). Why do people talk about converting an asset for handedness? Say a triangle with coords (0, 0, 0), (0, 1, 0) and (1, 0, 0) would mean the same in both systems mathematically, where is the handedness here?

  • \$\begingroup\$ Preference really. People in Science just don't like to be limited to one possibility when there are more. If there is another possibility, why not? As long you keep your conventions clear and consistent. Both systems give you the same result. As long the translations are converted correctly. \$\endgroup\$ – Sidar Mar 11 '13 at 12:04
  • \$\begingroup\$ @Sidar: Please see the edit added to the question. I think the question was misunderstood, I know that 2 (or more) such conventions exist, and I'm fine by them, I'll keep them consistent in my world/system/code, but why/when would I come across converting, even if I'm consistent? \$\endgroup\$ – legends2k Mar 11 '13 at 13:32
  • \$\begingroup\$ Again the person picking either handedness probably just picked it because it seemed more intuitive ( or whatever excuse he had ). You hardly convert between coordinate systems unless you use a combination of frameworks/engines that don't use the same handedness. But you can also assume that most frameworks come with a function to flatten a transformation matrix. Which allows you to easily put one transformation matrix into another coordinate system. Mind you I could be wrong on this. Someone should confirm this ( the reason it's a comment and not an answer ) \$\endgroup\$ – Sidar Mar 11 '13 at 13:39
  • \$\begingroup\$ @Sidar: Aah, got it! See the matrix put in an asset depends on the handedness assumed by the designer which forces a handedness on a dev, now that's something tangible and clearly understandable! List of such things is what is wanted in the answer :) \$\endgroup\$ – legends2k Mar 11 '13 at 13:46
  • \$\begingroup\$ mindcontrol.org/~hplus/graphics/matrix-layout.html Here is some info on the two. Apparently it's a case of transposing the matrix in this case for OpenGl and DirectX. So it looks like you don't really need to convert much. \$\endgroup\$ – Sidar Mar 11 '13 at 13:54

I'm not sure about OpenGL but DirectX allows you to over write the default left-handedness therefore it wouldn't matter. As you've said, it's "nothing but" a convention, and at least DirectX allows you to work with both. Conventions do not matter by themselves, the only problem is that you need to be consistent with your choice. Mixing two such systems leads to either confusion (if you do make the conversions) or to all sorts of errors if you do not (but why would anyone do that, except for mistakes).

As to what Eric Haines refers to as "right-handed data" I bring this quote from the beginning "OK, so only for viewing you must also know the handedness of the data." and that's exactly where handedness matters, when viewing it. Does a Z-component of 1 make the object closest possible to the screen or furthest? That's why you need to know the handedness of the data, to interpret the data correctly when doing the depth test.

  • 2
    \$\begingroup\$ OpenGL allows it too. seanmiddleditch.com/journal/2012/08/… \$\endgroup\$ – legends2k Mar 11 '13 at 11:42
  • \$\begingroup\$ Yeah, I think I'm starting to see it. So when I've a unit cube where the face opposite to XY plane where z = 1 is the face of a model (as per the artist who prefers LHS), if I just use the points in a RHS viewing system (without taking into account the handedness) then my cube will be behind my camera with its face on the other side, since my camera is pointing to z = -1. If I want to animate a zoom in to the face, on a LHS viewing system I can just increase camera's z, while in RHS, I've to do something round about. \$\endgroup\$ – legends2k Mar 12 '13 at 9:22

It doesn't matter in the sense that the handedness is arbitrary; either way works fine so they just picked one. They only "force" their way on the user in the sense that they had to pick something so they went with that way.

However it does matter in that you need to be consistent about what the numbers mean; it doesn't matter what decision was made initially, but once a decision is made you need to stick with it. For example, when you say:

When we do a cross product of x and y we'd get z in both systems, again the numbers of the result are the same, it's just the interpretation of the observer.

that's not exactly true. The magnitude of the resulting vector is the same, but they point in opposite directions.

  • \$\begingroup\$ "but they point in opposite directions" - only because you're viewing both the vectors (of 2 different spaces) in a 3rd common reference space do they point in opposite direction; in their space, they point in the same direction, which is +Z direction. \$\endgroup\$ – legends2k Mar 11 '13 at 13:27
  • \$\begingroup\$ Well yeah, but... here let me try a different approach. Think about your own body and the word "left". The word "left" refers to one side of your body, but couldn't it just as easily refer to the other side? Why does it matter? The answer to those questions is the answer to this question. \$\endgroup\$ – jhocking Mar 11 '13 at 14:44

Handedness — and choice of axes, in the same way — matter because the camera has to match to get the results you want.

Suppose that you had a dataset (scene) which included not only the objects to view, but also a definition of the camera, in terms of a position and (right, up, forward) basis vectors and a winding order for face culling. In that case, then obviously once you apply the camera transformation to the data you get the same screen-space points no matter how the data is arranged in world space.

The reason that we care about the axes/handedness/ordering of 3D data is because in games, the camera is not defined in the data but added by the game engine afterward, so we choose a camera design and say that all the data has to match that. (Also, multiple 3D models are combined in one scene, and they all have to match the camera, or be transformed to match.)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.