If it did, all you’d see was a smudgy stick figure in most cases

  • @[email protected]
    link
    fedilink
    5110 days ago

    When I saw the mirrors in Duke3D for the first time I wondered how they pulled that off. I had made a couple of Wolfenstein like tech demos at the time, going off the published stuff about the algorithms and techniques used by Carmack and Romero at the time (groundbreaking stuff). So I delved into it at the time and the way they did it was to have an identical but mirrored room behind the mirror. The mirror was just a transparent wall. And they had a sprite spawn in that looked like Duke and was controlled by the player.

    Mirrors in games are hard.

    • Oxysis/Oxy
      link
      fedilink
      English
      2710 days ago

      Another trick that you can do is to render the scene from the mirror’s perspective. That way everything that needs to be seen in a reflection is there but also not taking up an entire extra room.

      In Valve’s Source engine that is how the water reflections work. They can look absolutely perfect so long as you set props to reflect in the water.

      • @[email protected]
        link
        fedilink
        English
        2010 days ago

        That is called a render target and basically adds an entire full pass of frame computing (from this pov) which is why mirrors using this tech usually have an abysmal resolution. And generally some blur to hide it a little

        • @[email protected]
          link
          fedilink
          3
          edit-2
          9 days ago

          This has been very interesting, thank you internet strangers!

          :waves hands: cmon everybody what do we say

        • @[email protected]
          link
          fedilink
          29 days ago

          It’s been a while but there was something in the doom 3 engine that made it pretty good at render target efficiency right? I seem to remember they were able to do mirrors well, and it was also a gimick they liked to do a lot with the computer terminals you could interact with.

          They took this tech a step further with Prey (2006), which used the doom 3 engine, to make portals you could see and shoot through. I can’t remember if the portals were dynamic though.

  • Pennomi
    link
    fedilink
    English
    810 days ago

    You’d generally see two disembodied hands and some legs if it showed a real reflection. Most games don’t render the whole player.