169
submitted 3 days ago by [email protected] to c/[email protected]
top 50 comments
sorted by: hot top new old
[-] [email protected] 11 points 1 day ago* (last edited 1 day ago)

As an engineer, Z up right handed is the only one that makes sense. All engineering follows this convention, motion sensors (example) or GPS topography will use that.

Cameras calibrations also use right hand but typically rotated such that it's X right, Y down, Z depth. That way, the projection formula give the pixels column, row and depth values.

camera coordinate system

[-] [email protected] 17 points 1 day ago

IMO there's no correct answer. It depends on the purpose.

Intuitively XY forms the plane where things are and Z is used for the "additional dimension". Since first we think of 2D, and then we move to 3D, so it's the natural way we think.

So if you make a cities skylines type 2D game, the XY plane will form the ground. Which means that when you want to make the game 3D, Z means up.

But if you're making a platformer game (like old marios), you have XY being the left-up plane, like when drawing a graph in a paper. Then if you want make your game 3D (as in, having 3D models for assets, the movement would still be the same 2D). Then the Z will be forwards.

Sometimes, even Y being down makes sense. Like with UI programming. This is specially important for window resizing. When you resize the window, you want everything to look roughly the same, but with more space. That is easier if you use (0,0) in a point that doesn't move when resizing, like the top-left corner. Since the bottom-left corner moves if you make the window taller.

[-] [email protected] 6 points 1 day ago

I think the preference for Y being the vertical axis in gaming, comes from a legacy of orienting the work around screen-space (roughly 50 years ago). It was more efficient to have a memory layout that is easier to supply data to generate a TV signal. Since a CRT raster goes from upper-left to lower-right, line-by-line, that became the standard for screen-space: inverted y. So screen memory (or however the screen is represented in RAM) starts at address/offset zero, and increments from there. All the other features like hardware sprites, used the same convention since it was faster and simpler to do (easier math).

When consumer 3D cards were relatively new, this was inherited, most notably when the hardware started to ship with "z-buffer" support. Carrying all this baggage into 3D engines just made sense, since there was never any confusion about the screen-orientation of it all. Why bother flipping axes around from world and camera space to the screen?

[-] [email protected] 6 points 1 day ago

In Physics we mostly used right-hand, but X-right, Y-up, and Z pointing towards the viewer.

But that's details. The only important choice is between left- and right-handed, as that affects the signs in the cross product (and some other formulas - generally everything that cares about which rotation is considered positive).

[-] [email protected] 5 points 1 day ago* (last edited 1 day ago)

Hah, reading this not too long after watching Freya Holmer's latest video/talk is fun. "Everybody is disagreeing, except everyone is agreeing that unreal is wrong". The image is by her (it's also used in the presentation). And she mentioned wanting to make it easier/possible to change handedness. She'd already had an 'apology' from Sweeny for the Unreal configuration. Interesting to see they're taking it further than that.

[-] [email protected] 3 points 1 day ago

Every day we stray further from God's light.

[-] [email protected] 2 points 12 hours ago

Let's call the axes g o and d.

[-] [email protected] 9 points 2 days ago

i enjoy that Minecraft is its own software suite

[-] [email protected] 27 points 2 days ago
[-] [email protected] 32 points 3 days ago

Ah yes, the standard Minecraftian coordinate system.

[-] [email protected] 9 points 1 day ago* (last edited 1 day ago)

tbh at this point most people taking a linalg class or getting into game programming are probably very familiar with the minecraft coordinate system

similarly to how minecraft has taught an entire generation basic english

[-] [email protected] 14 points 3 days ago

I sure hope Blender does this soon. Very annoying workflow using it with Y-up software.

[-] [email protected] 6 points 1 day ago* (last edited 1 day ago)

There were discussions recently about the feasability of changing Blender's coordinate systems. The answer was that it was highly unlikely to happen because there was no single place where it was defined -instead, it was assumed throughout the code that Z was up, in probably tens of thousands of lines... and the work to regularize that would be gargantuan with no clear benefit -since exporters and importers are supposed to handle these transformations anyway.

[-] [email protected] 9 points 2 days ago

In case of Blender, I'd say, it could be user choice.
But I like Z up right handed because it matches the convention used in high school physics.

Rather, why don't Y-up software change to Z-up, instead?
Were they taught to use Y-up in Kinematics-3D? I doubt that.

[-] [email protected] 3 points 1 day ago

Y up makes more sense for 2D I guess.

[-] [email protected] 1 points 1 day ago* (last edited 1 day ago)

Yes.
And that's why I once previously came up with an assumption that a game engine having Y-up as default, probably started as a 2D game engine

I remember getting downvoted for that

[-] [email protected] 5 points 2 days ago

Z-up is really only common among architectural or engineering type software. CAD and other types of software, for example.

Y-up is common among basically all other types of software. DirectX API is Y-up, for example. Which means anything that interacts with DirectX that has Z-up needs to convert the axes first before doing its calculation (a literal nothing cost microoptimization, but could be big depending on the software and platform).

It's probably fine to leave as is in the long run, but its just annoying to me that I need to convert between the axes in Blender export settings, and would be more convenient if all the software I use used the same system, which is now Y-up. Blender is literally the only one. Honestly, I agree that it should be a user setting in Preferences, but I dont know if Blender is programmed to handle this or if it would need to be entirely rewritten.

load more comments (1 replies)
[-] [email protected] 8 points 2 days ago

Okay, am I understanding this correctly? In Y-up right-hand, positive X is "to the left"?

I personally think that right-hand Z-up makes the most sense, but it makes sense to move to where most of the industry is going.

[-] [email protected] 4 points 1 day ago

Z is depth. Why should it ever be up? Honest question.

[-] [email protected] 5 points 1 day ago

It depends if you view the X-Y plane as the camera/viewport/screen or the ground. If X-Y is the ground, then Z is either up or down.

[-] [email protected] 1 points 21 hours ago
[-] [email protected] 1 points 1 day ago

For cameras, the convention is Z depth but right handed:

  • X rightward / pixel column from the left
  • Y downward / pixel row from the top
[-] [email protected] 2 points 1 day ago

I don't think that's correct. Here's a drawing I did when trying to get my head around this.

drawing

I find that trying to make sense of terms like "to the left" tricky when we can rotate the directional cube any way we want. For example, in my drawing for "Y-up, left handed", the red X axis is pointed leftwards. However, we could rotate the unit vector cube so that the X axis is pointed right, and the Y axis is pointing up (i.e. the orientation we're most familiar with for 2D graphs). The Z axis would then be pointing away from us, into the plane of the paper/screen.

In contrast, if we oriented the Y-up right-handed cube in the same way, then the Z axis would be oriented as if to come out of the plane of the screen/page, towards us.

These distinctions only matter when we add a third dimension, so the left or right handedness is basically a question of "when we add the third axis to a 2D square made by the other two axes, does the third axis come towards us or away from us? I apologise if this hasn't made things any clearer — I am able to make things make sense by imagining the rotations in my head, but not everyone is able to visualise them like that.

[-] [email protected] 3 points 2 days ago

Okay, am I understanding this correctly? In Y-up right-hand, positive X is “to the left”?

No, the x-axis is usually the only consistent one (it increases from left to right). With right handed coordinate systems you can have Z going into the screen (Y-down) or Z coming out of the screen (Y-up)

[-] [email protected] 1 points 1 day ago

That makes more sense. Simple explanation of my error. Thank you.

[-] [email protected] 2 points 2 days ago* (last edited 2 days ago)

You are wrong, @[email protected] was correct:

[...] we’re transitioning to the Left-Up-Forward (LUF) coordinate system.

Source: https://forums.unrealengine.com/t/we-re-moving-to-the-left-up-forward-luf-coordinate-system/2540901

[-] [email protected] 2 points 1 day ago

I don't think that's right. The post that you linked to includes this link, which includes this snippet:

"First, instead of labeling coordinate axes with X, Y and Z, we're introducing more descriptive axis names:

Left (was -Y)

Up (was Z)

Forward (was X) "

[-] [email protected] 2 points 1 day ago* (last edited 1 day ago)

I don't follow why that means I'm wrong.

"Was" here refers to their old Z-Up, left-handed coordinates, where X was forward, Y was right, and Z was up.

[-] [email protected] 2 points 1 day ago

You're right that I didn't sufficiently consider the "was" in that sentence. Perhaps there's something I'm missing though, because I haven't seen anything that would suggest X is left. When I put my right hand in the position indicated in the OP, my index finger (Y) points upwards, with my thumb (X) pointing right, making an L shape. My middle finger (z) comes out towards me.

However, most of my experience with coordinate systems is with abstract, mathsy stuff, and I don't have much experience with any of these softwares; there may be something obvious that I'm missing.

[-] [email protected] 1 points 1 day ago* (last edited 1 day ago)

You can spin your hand 180° around Y (index / up). Then Z (middle) points away from you, "forward". And X (thumb) will point left.

Thus the "Left-Up-Forward" + Right-handed.

[-] [email protected] 2 points 2 days ago

From the chart I would guess that in Y-up right-hand positive X is to the right. You look at the palm of your hand.

That way when you develop a 2d platformer you would use a standard XY coordinate system. Switching to 3d would logically add the z axis as depth and not height. A movie is usually shot that way as well.

Of course that analogy breaks down as soon as your base-game is top down. Like a city planer or so.

Anyways, with standards it's often best to just go with what most others do. So kudos to Unreal for not being stubborn.

[-] [email protected] 1 points 2 days ago

He references "Left-Up-Forward", so X is Left, Z is into the screen.

2D is not a consideration, even if it'd be logical. (That's where Left-handed Right-Up-Forward grows out of.)

[-] [email protected] 14 points 3 days ago

After all those years... I can't believe it...

[-] [email protected] 9 points 3 days ago

Someone please translate this to English. Thank you.

[-] [email protected] 13 points 3 days ago

Haven't really done much in game design, but if I'm understanding right.

In game design, lets go with 2d first. You mark position with numbers. In 2d you have X and Y. So you say to move to 5,5. then from the starting point that will be 5 right, and 5 up.

3D you have the same thing, but a bunch of different groups were working on it in different ways without working together. So you wound up multiple systems that had X, Y and Z meaning different things. In the majority of 3d systems Y represents up/down. (the other 2 directions are still kind of half and half between systems)

load more comments
view more: next ›
this post was submitted on 06 Jun 2025
169 points (98.8% liked)

Game Development

4381 readers
10 users here now

Welcome to the game development community! This is a place to talk about and post anything related to the field of game development.

Community Wiki

founded 2 years ago
MODERATORS