• egerlach@lemmy.ca
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 day 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.

      • egerlach@lemmy.ca
        link
        fedilink
        arrow-up
        1
        ·
        2 hours 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.

    • AnarchistArtificer@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 hours 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.

    • drspod@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      13 hours 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)

        • AnarchistArtificer@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 hours 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) "

          • Philippe23@lemmy.ca
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            6 hours 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.

            • AnarchistArtificer@lemmy.world
              link
              fedilink
              English
              arrow-up
              2
              ·
              4 hours 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.

              • Philippe23@lemmy.ca
                link
                fedilink
                English
                arrow-up
                1
                ·
                edit-2
                3 hours 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.

    • Björn Tantau@swg-empire.de
      link
      fedilink
      arrow-up
      2
      ·
      14 hours 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.

      • Philippe23@lemmy.ca
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 hours 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.)

    • ulterno@programming.dev
      link
      fedilink
      English
      arrow-up
      3
      ·
      14 hours 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.

      • RightHandOfIkaros@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        8 hours 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.

    • Cricket [he/him]@lemmy.zip
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 day ago

      I haven’t used Blender in a long time, but the graph in the OP says it’s Z-up?

      Edit: never mind, I misunderstood what you wrote!

    • TheFogan@programming.dev
      link
      fedilink
      arrow-up
      12
      ·
      1 day 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)

    • IrateAnteater@sh.itjust.works
      link
      fedilink
      arrow-up
      67
      arrow-down
      1
      ·
      2 days ago

      Because a flat surface is an x-y plane. The ground is a “flat” surface, and so the z dimension is height.

      For me, that’s the only way that makes sense. But I program robots for a living, so I’m used to dealing with coordinate systems where the flat reference is the ground. Programmers seem to be using the screen as the flat reference. If I were building a game world, I’d probably use z-up convention.

      • theunknownmuncher@lemmy.world
        link
        fedilink
        arrow-up
        10
        arrow-down
        1
        ·
        edit-2
        1 day ago

        Programmers seem to be using the screen as the flat reference.

        In screen coordinates, the origin is the top left corner of the screen, and the Y-axis increases towards the bottom of the screen. So Y still isn’t “up”

        • Redex@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          10 hours ago

          His point is that’s where it comes from. In most 3D software as seen in the chart, the XY plane is paralel to the screen, just that Y is up instead of down like in 2D, cut that would be insane if it was like that.

      • popcar2@programming.dev
        link
        fedilink
        arrow-up
        7
        arrow-down
        2
        ·
        edit-2
        1 day ago

        Yeah, it depends on whether you expect the 2D view to be on the floor or on the wall. If it’s on the floor, Z is up. If it’s on the wall, Z is forwards & backwards (depth). Personally I think it being on the wall makes way more sense since we already expect from 2D view that Y is up and down, it feels weird to shift it to forwards & backwards when switching to 3D.

      • RedSnt 👓♂️🖥️@feddit.dk
        link
        fedilink
        arrow-up
        9
        arrow-down
        6
        ·
        2 days ago

        Every kid learning math has to at the very least learn X and Y coordinates for graphs. That’s the reason I think Y is the natural up, it just makes more sense to be in line with what everyone already know instead of flipping it around.

        • CookieOfFortune@lemmy.world
          link
          fedilink
          arrow-up
          5
          ·
          1 day ago

          Imagine you’re drawing a level or a city or a landscape. Wouldn’t you want to work in X and Y for this? Precisely because you’ve learned the X and Y coordinates in school. Then you add Z as the height.

          • RedSnt 👓♂️🖥️@feddit.dk
            link
            fedilink
            arrow-up
            1
            ·
            13 hours ago

            Yeah, for cases like maps it works, but most everyone that draws don’t do bird eye view drawings. I’m just saying, I think it’s more natural for people to draw scenes on 2D planes, and converting that to 3D Z as “depth” makes more sense. Although all the reasons I’ve heard for Z as height also makes sense to me now.

        • theunknownmuncher@lemmy.world
          link
          fedilink
          arrow-up
          31
          arrow-down
          1
          ·
          edit-2
          2 days ago

          You looked down at the math book on your desk that showed the X-Y graph on the page, and the Y axis extended forward, away from you. Z was “up”.

          • dormedas@lemmy.dormedas.com
            link
            fedilink
            arrow-up
            23
            arrow-down
            1
            ·
            2 days ago

            I always thought about it like this. Put your fancy page with X-Y coordinates on the ground. Add a new dimension perpendicular to the ground. This is the Z-axis, it goes up.

            • Grey Cat@lemmy.world
              link
              fedilink
              English
              arrow-up
              1
              ·
              15 hours ago

              But in those cases, isn’t positive Z going “away” from you ? I.e. Into the ground ?

              And in math classes this has always been described to me as adding “depth”.

        • moonlight@fedia.io
          link
          fedilink
          arrow-up
          13
          arrow-down
          3
          ·
          1 day ago

          I disagree – I think Z up is much more natural in this sense. X,Y is a plane, and it’s much more natural to think of a plane as being horizontal, especially in a 3D environment with a ground plane. Z is the third dimension, perpendicular to that plane. Think about it this way, doesn’t it makes way more sense to have a map with X,Y coordinates rather than X, Z coordinates?

          • offspec@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            13 hours ago

            I feel like whiteboards have gone extinct or something. All of my math lectures from grade school to uni took place on a y-up surface. I can appreciate that there are multiple ways to skin a cat, but I feel like people just argue what’s most convenient for their preference in this kind of situation.

            • Redex@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              2 hours ago

              Yeah you’d draw it on a vertical whiteboard, but in physics and math (or at least all the classes I had), you’d always draw a coordinate system with Z going up. I can understand why it would make sense for you to look at XY being a vertical plane, but I feel like it just makes more sense for XY to be the ground.

              Also, convenience wise, especially in e.g. game dev, for 90% of use cases it’s way more convenient for the first two coordinates to be the ground position and the last coordinate be the height. Whenever you’re thinking of the coordinates of something, you’d probably first think about its ground position and then its height, in which case it’s much simpler if those ground coords are at the start, instead of at the beginning and end of a vector.

          • lb_o@lemmy.world
            link
            fedilink
            arrow-up
            8
            ·
            edit-2
            1 day ago

            Fully agree with you.

            Y-up doesn’t make sense in gamedevelopment at all. All those changes, because some dinosaurs of the past decided that Z is their screen depth.

            And what should we do with all previously released games? Refactor all vectors?