• IrateAnteater@sh.itjust.works
      link
      fedilink
      arrow-up
      0
      ·
      2 months 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.

      • popcar2@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        2 months 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.

      • theunknownmuncher@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        2 months 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
          0
          ·
          2 months 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.

      • RedSnt 👓♂️🖥️@feddit.dk
        link
        fedilink
        arrow-up
        0
        ·
        2 months 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.

        • moonlight@fedia.io
          link
          fedilink
          arrow-up
          0
          ·
          2 months 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
            0
            ·
            2 months 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.

          • lb_o@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            edit-2
            2 months 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?

        • CookieOfFortune@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          2 months 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
            0
            ·
            2 months 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
          0
          ·
          edit-2
          2 months 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
            0
            ·
            2 months 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
              0
              ·
              2 months 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”.

              • dormedas@lemmy.dormedas.com
                link
                fedilink
                arrow-up
                0
                ·
                2 months ago

                I could see that being totally valid after thinking about it for a second!

                I imagine it as a new dimension growing “up” out of the X/Y plane (as burrowing into the ground would be going into “occupied” space, it’s forbidden). But “depth” does make that make more sense.