• JigglySackles@lemmy.world
    link
    fedilink
    arrow-up
    32
    ·
    6 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
      ·
      5 days 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
          ·
          5 days 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
        ·
        5 days 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
          ·
          5 days 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
      5
      ·
      5 days 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)

      • BanMe@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        5 days 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.

      • JigglySackles@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        5 days 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.

    • rami@ani.social
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 days ago

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

  • etuomaala@sopuli.xyz
    link
    fedilink
    arrow-up
    39
    arrow-down
    2
    ·
    7 days ago

    I legit had no idea anybody actually used the upper system until now. I had to read the comments just to see whether the upper system was just some sort of joke. I am horrified.

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

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

  • KSP Atlas@sopuli.xyz
    link
    fedilink
    arrow-up
    18
    arrow-down
    3
    ·
    6 days ago

    y-up ftw

    It’s easier when writing 3d renderers cause the x and y coordinates of the 3d points eventually become the x and y coordinates of the 2d points on screen and it’s easier to keep track of

    • dev_null@lemmy.ml
      link
      fedilink
      arrow-up
      5
      ·
      6 days ago

      Except when you are working on top-down game/3D environment. In which case you are constantly changing between Z and Y…

    • Victor@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      6 days ago

      Indeed, depth buffers etc are from the z coordinate.

      Also on the web, the “z-index” is the depth of elements in the world of CSS.

      I wonder in which contexts y would make more sense as the depth.

    • driving_crooner@lemmy.eco.br
      link
      fedilink
      arrow-up
      16
      ·
      7 days ago

      If 2d, Y up, if 3d Z up.

      I always tough as inputs down, answer up. And usually, x is the variable y the result, or xy the variables and z the result

  • mad_lentil@lemmy.ca
    link
    fedilink
    English
    arrow-up
    9
    ·
    6 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
      ·
      6 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.

  • Caveman@lemmy.world
    link
    fedilink
    arrow-up
    18
    ·
    7 days ago

    In a 2D game Y is up. Going from 2D to 3D would make sense to add another dimension forward to account for depth.

    However if you start with a map of a 3D surface then North is Y and East is X you’d add Z to account for elevation like everybody making maps would.

    I guess it depends on how you look at it.

  • L0rdMathias@sh.itjust.works
    link
    fedilink
    arrow-up
    20
    arrow-down
    1
    ·
    7 days ago

    Z is always depth. Both are correct but define different perspectives. Top is looking across the landscape from an arbitrary floating perspective, bottom is looking down with anchored mapping to the surface.

    • juliebean@lemmy.zip
      link
      fedilink
      arrow-up
      5
      ·
      7 days ago

      yep. in 2 dimensions, nobody really debates on whether x or y should point up, so i kinda think the debate about z stems from whether one thinks we should put the xy plane horizontally (like a sheet of paper on a desk), or vertically (like a chalkboard).

      does any software default to making x be the vertical axis?

    • moderatecentrist@feddit.uk
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 days ago

      Good answer. Many posts are people saying “my approach is the right one, other people are irredeemable morons who should burn in hell”, but you’re right, it depends on your perspective.

    • isar@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      7 days ago

      Smh I was fine with both. The upper one reminded me of the X Y axis we use to represent functions in maths. While the lower one represents altitude on a 3D map.

      • Smoogs@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 days ago

        Spent most my life working in a 3d environment… need to reverse that thing for a controller every single time