• JigglySackles@lemmy.world
    link
    fedilink
    arrow-up
    31
    ·
    2 days ago

    Z is elevation. Any real world application, z goes up down. 3D applications SHOULD use it for elevation. I despise that many do not. It’s so fucking confusing. 2D, sure y go brrr. But once that 3rd dimension is added, y needs to take several seats and quit trying to take on dimensions it doesn’t have any right to.

    • SkunkWorkz@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      1 day ago

      Y-up sorta makes sense in games. Imagine a 2D platformer, Y is up and X is horizontal. Now add depth. Instead of flipping axis just use Z for depth.

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

          True but I think it’s also because of screen coordinates, Y is always the vertical axis in screen coordinates. So programmers translated that to 3D coordinates because in real world space the screen doesn’t lie flat but is up right. It’s probably why Y is up in OpenGL and calls the depth buffer the Z-Buffer.

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

        That’s the core of my point though. Once you add depth it’s not 2d space anymore (even though the screen is 2d, the represented field is 3D) and y becomes depth.

        • SkunkWorkz@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          1 day ago

          It all depends how you perceive the XY plane. Like if your job involves blueprints than XY plane lies flat and horizontal then it makes sense that Z axis is height. Hence why engineering software is all Z-Up. If the XY plane is upright, like screen coordinates, then Z is depth. Hence why many software that is used to create content for the screen is Y-Up. Like Maya, Houdini, Unity, OpenGL etc.

    • unphazed@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      1 day ago

      It makes more sense if you’ve ever drawn in CAD. Top view, x and y. Now side view, y and z or y and x. You look down on x and y, and if you are extruding you now create the z axis dimensions. For the people who draft on the side axis: you are true psychos (ok, unless you’re using a lathe I suppose, or if the silhouette is more defined from the side… ok maybe not psycho, just odd)

      • JigglySackles@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        1 day ago

        I do use CAD software but always have my items resting on an x/y plane with z being height. I do some 3d printing and basic cad designs, so z being elevation still makes sense there.

      • BanMe@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        1 day ago

        User look sideways at item on shelf. Designers look down on paper. Both viewpoints are needed for it to be a good object.

        Architects do both because they have all that math and something serious to prove.

  • moderatecentrist@feddit.uk
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 day ago

    For me it’s the top one. In a web browser, when using CSS and JavaScript, x is the horizontal axis, y is the vertical axis, and z is for depth. Hence the z-index CSS property which determines depth.

    I would say the bottom one only makes sense if the stick figure were to hover in the air and look downwards. Then the z axis would be depth for him.

  • khepri@lemmy.world
    link
    fedilink
    arrow-up
    12
    arrow-down
    1
    ·
    2 days ago

    Z is depth, full stop, and I have my fists raised, Queensbury-style, to anyone who contends otherwise.

    • rami@ani.social
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 day ago

      I’m came here to talk shit about y-up but now I’m mad at you instead.

  • mad_lentil@lemmy.ca
    link
    fedilink
    English
    arrow-up
    9
    ·
    2 days ago

    Above and below the page/plane is the z-axis.

    But some people “hold” the page up in front of them, or down on the table.

    • Buddahriffic@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      2 days ago

      My “page” is my monitor’s screen, a window into many virtual worlds that extend past the plane of my screen.

      Actually, my screen is a curved surface. So the 3d virtual world is projected onto a 2d plane which is then projected back onto a 3d curved screen. The math to make it look correct in the final projection is different from what makes it look correct on a flat screen, though I don’t know if any renderers actually do this correction. Not that I think the difference is huge.

  • m0darn@lemmy.ca
    link
    fedilink
    arrow-up
    7
    ·
    2 days ago

    Right handed and left handed? (Top image doesn’t follow right hand rule, Z should point towards camera)

  • Spacehooks@reddthat.com
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    2 days ago

    Weird didn’t everyone learn XY on paper on a desk first? All they did was add z axis to that original concept for elevation which gives us the bottom image.

    Top image is like if I held paper straight parallel to my face.

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

      Screens vs paper. It’s why all the engineering software uses Z-up, since they came from a paper top-down view workflow. But many of the creative software uses y-up, since they exist to create art that gets consumed on a screen. Like animation and games.

      • Spacehooks@reddthat.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 day ago

        Blender and UE4 uses z as up. Which was intuitive to me having been taught that in school but Looks like industry standard for 2d focused engines use Y up based on this comment from 2009. What a mess.

        Maya and Unity both use the lefthand axis system which has Y as world up. Max is the one of the few that uses Z as up (DOH!!)

        2022 comment:

        Maya is fully able to translate between its own (Y up) and UE4’s (Z up) on export, so you can work “upright” in both without any alterations.

    • homura1650@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      2 days ago

      When working in 2 dimensions with gravity, it is common to treat Y as up. E.g, 2d video games, physics problems, computer screens.

    • squaresinger@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      2 days ago

      That’s basically what it comes down to: Is your XY plane a piece of paper that you look at from the top, or is it the pixel coordinates of the screen you are looking through?

      That’s why X is usually not contested, because it’s the same on a piece of paper that you view top-down and on a screen that you view from the front.

      Y is then one of the two potential axies for either a top-down or a side-scrolling view, and Z is the remaining axis.

      • Spacehooks@reddthat.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 day ago

        I not educated in 2d game design so I guess Y is used for up on side strollers is what I think is happening. Least thats what is going on in gadot based on anothet commenter.

        • squaresinger@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          1 day ago

          In 2D games X is right, Y is either up or down. I haven’t seen any engine where X is inverted, but Y can be either direction. Interestingly, I haven’t seen Y as down in any 3D environment yet.

    • e0qdk@reddthat.com
      link
      fedilink
      arrow-up
      1
      ·
      1 day ago

      didn’t everyone learn XY on paper on a desk first?

      No. I was plugging in crazy combinations of r, theta, x, y, z, t, and anything else shown in the built-in demo of that old Mac 3D graphing calculator app years before my teachers got to explaining coordinate systems. I had no idea what most of it meant, but I could make cool looking animated graphics as a third grader…

      Also, I found GameMaker which introduced me to using X to the right and Y down in 2D (with the origin in the top-left corner) before algebra was taught to me in school…

    • jaupsinluggies@feddit.ukBanned
      link
      fedilink
      arrow-up
      4
      ·
      2 days ago

      Well no. First the teacher drew it on the board, hence Y pointing up at the ceiling.

      Then we switched to paper and discovered Y pointing somewhere else was somehow the same thing.

      So the right answer to the OP is probably that “they’re the same picture” meme.

                • Hadriscus@jlai.lu
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  2 days ago

                  ah ! well. I don’t use any of the programs that are left handed so I can’t say I’ve ever had to struggle with I/O shenanigans, if that’s what you’re talking about. But you’re leaving me guessing, so not sure what else I can say

            • Hadriscus@jlai.lu
              link
              fedilink
              arrow-up
              4
              ·
              3 days ago

              Personally I feel limited if I’m working in anything else than a non-euclidean coordinate system

          • dustyData@lemmy.world
            link
            fedilink
            English
            arrow-up
            10
            ·
            3 days ago

            Tradition, 3d videogames started doing it like that because of how computers worked 40 years ago, then devs got used to think about 3d space that way and it stuck. Essentially videogames think about visual depth. And yes, the physics engines for videogames usually account for that and use their own transformations of formulas because they are rarely simulating anything more complex than rigid body physics. Advanced simulations aren’t any harder for devs, all the transformations are abstracted away with libraries.

            In the end they are just reference frames and up is whatever you want it to be. As Wikipedia puts it eloquently: “Unlike most mathematical concepts, the meaning of a right-handed coordinate system cannot be expressed in terms of any mathematical axioms. Rather, the definition depends on chiral phenomena in the physical world, for example the culturally transmitted meaning of right and left hands, a majority human population with dominant right hand, or certain phenomena involving the weak force.”

              • dustyData@lemmy.world
                link
                fedilink
                English
                arrow-up
                4
                ·
                edit-2
                3 days ago

                Not really. Youtuber Acerola has a great series on shader programming and dealing with negative numbers is a non-factor. The advantage of working with computers is that it abstracts that complexity away. You program with high level concepts, a dev rarely deals with direct calculations, unless they are actually writing the fundamental apis for it, like DX or Vulkan. Much less copy-paste formulas. It gets complicated fast, but the abstraction keeps it simple for the developer, like, the math is perhaps the easiest part of programming computer graphics.

        • someguy3@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          3 days ago

          I’m not getting left handed vs right handed. Right handed means negative values go right? Why would anyone do that?

          • grue@lemmy.world
            link
            fedilink
            arrow-up
            7
            ·
            3 days ago

            Right handed means that when you curl the fingers on your right hand from +X towards +Y, your thumb points towards +Z.

          • mumblerfish@lemmy.world
            link
            fedilink
            arrow-up
            4
            arrow-down
            1
            ·
            3 days ago

            Someone else was explaining how to tell left from right handed. Buy why is it important? If you do math and physics, you almost certainly would use a right hand system. That means all formulas are derived with that in mind. If you try to use them in the left handed system, you are going to have a horrible time trying to figure out which of all terms need to have their sign flipped.

          • Pennomi@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            3 days ago

            Eh sort of? It’s all a matter of perspective. In Blender which uses a right hand system, when you view from the side, right is positive Y, up is positive Z, and towards the user is positive X.

            But looking from above, positive X is right, positive Y is up, and positive Z is towards the camera. Obviously if you rotate the camera to be viewing from the negative side of the axis some directions get flipped.

            Basically if you’re axis aligned, things work out the way you would expect.

    • saltesc@lemmy.world
      link
      fedilink
      arrow-up
      16
      ·
      edit-2
      3 days ago

      I know Z as upward. X and Y were always on the base plane representing length and width. Z comes in being all like, “Now we’re being 3D!”

      So wherever the “floor” is, represented with gridlines, boundary, canvas, etc. that’s where they live. That is Flatland where there is no up or down. It is 2D where most of my work is. If you try tell me Y is Z, I’d ask “wtf is a Z?”

      • Pennomi@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        arrow-down
        1
        ·
        3 days ago

        Only in a top-down perspective. Most screens are vertically oriented though, meaning the reference 2D plane is left-right-up-down.

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

          You’re mixing up perspective with the object’s actual coordinates system. The “left-right-up-down” are your perspective or computer screen and do not define the axes of the object itself. The object has its own.

          If I rotate a map on a table, it’s X and Y don’t suddenly flip. The coordinates belong to the object, I’m just viewing them from a different perspective now.

          In mathematics, the Z axis only exists because it’s defined as being perpendicular to an existing plane (the plane X and Y form). The gridlines represent that plane and Z’s extrusion values reference it. Your perspective or viewing angle don’t influence these coordinates at all.

          Commonly we face the XY plane down as it’s “floor”. We build things from the ground up. We draw from top down. It’s just how gravity brought the standard around. You can flip it however you want, though. But if you see a grid, that’s a plane and Z is extrusion off that.

          • Pennomi@lemmy.world
            link
            fedilink
            English
            arrow-up
            4
            arrow-down
            1
            ·
            edit-2
            3 days ago

            By your own logic there is no “up”, only x/y/z, so what’s your complaint?

            There is NO mathematical or physical reason why XY should be the floor, that is your own bias.

            • saltesc@lemmy.world
              link
              fedilink
              arrow-up
              1
              arrow-down
              3
              ·
              2 days ago

              No. That is not my logic. It’s the logic of Rene Descartes who invented the thing you are trying to talk about.

              And because gaslighting attempts online are hilarious, I’ll assume you just didn’t read so good and will repeat myself again; we tend to rest the plane on the floor, as it is in our reality with gravity it is easier to conceive. Like modelling a car, it’s wheels on the screen spend most of the time pointed down.

              You don’t have to. You can model it any direction you want, but most people find it easy in an orientation that mimics common perspective. But however you do it, you still can’t have a Z axis without a plane. That’s the point. Grid is plane and plane is needed for Z. If you have a grid on Z it’s representing an infinitely possible slice through extrusion and that’s basically a concept behind some fractals, which introduces a new vector for new XYZ points within.

              I know you really want to be right but this is very long-standing foundational and basic stuff we just do. It isn’t my logic or opinion, I’m sharing this knowledge to you, something you can very easily look up yourself right now and forget I even exist—which would be neat.

              • Pennomi@lemmy.world
                link
                fedilink
                English
                arrow-up
                1
                ·
                2 days ago

                By that logic the only non-arbitrary dimension is defined by gravity, so the primary axis (X) should be up and down.

                Math is not rigid like you are saying: 3D coordinates can be oriented in any direction because they are fundamentally arbitrary. A lot of people a damn lot smarter than you have damn good reasons for using different coordinate systems, and they are mathematically correct.

      • TheRealKuni@piefed.social
        link
        fedilink
        English
        arrow-up
        2
        ·
        3 days ago

        But what if instead of adding a third dimension by going UP, you add a third dimension by going FORWARD. Like a computer screen, X and Y coordinates are side-to-side and up-and-down. If you made a volumetric display by adding a third dimension to that, Y would be up and Z would be forward.

        I usually think of Z as up, because that’s how stuff based on the physical world usually works. But I can understand why some think of it with Y as up.

        • saltesc@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          2 days ago

          Third dimension isn’t up, it’s just not X or Y. We just say “height” or synonyms for it because we say “length and width” for X and Y, even though all axis are just length between vectors proceeding in order of being able to exist, X, Y, then Z.

          If you are plotting your perspective, it will run on entirely different coordinates to an object’s coordinates, i.e. Camera vs Object stricture. But in most arts and all math, we tend to model the object and it’s values which we create and assign to it as attributes, not with values of how it should look from various perspectives.

          I think that’s the confusion. You could get used to the Z being treated as Y, but it’s incomparable with everything else and you’d have to now confirm with other’s that length and width are X and Z and extrusions from 2D plane are Y. This doesn’t occur much anywhere else. This is the whole premise behind the meme.