How do reflexes work in the game?

In the real world, mirrors and shiny surfaces reflect the world around us, but in video games, things work a little differently. Developers need to constantly think about how to implement reflection to benefit virtual worlds. The portal hotwogeek.com told us the tricks that game creators use to give realistic reflections.

How do reflexes work in the game?

Before the rise of 3D rendering, older 2D games used all sorts of tricks to create the illusion of reflection. For example, if a character is running through water, developers can flip their sprite and superimpose it on the water using a filter. And if a character suddenly stands in front of a mirror, then all you need to do is flip his character image horizontally.

When 3D games appeared on the market, reflexes began to require a different approach. A fairly common trick is “portal” – copies of mirrored rooms. So, in Duke Nukem 3D, each mirror is, in fact, a window into another room, where the character's copy moves in sync with the player.

Another popular technique is planar reflection: showing a scene from the perspective of a reflective surface such as a mirror or water. This method is quite effective but expensive in terms of computer resources. At least at first it was expensive. Planar reflections are still used in games today, just combined with other tricks to achieve the right combination of performance and graphics. For example, they are commonly found in Half-Life 2.

Another popular method for creating fake reflections is block mapping. Six images of the environment are placed on six faces of the virtual cube and then blurred. This is a great trick for shiny objects like cars or windshields, which is why it's often used by racing game developers. Despite their venerable age, block maps are still used in the industry.

But perhaps the most popular modern reflective display method can be called SSR – Screen Space Reflection, or Spatial Reflection. SSR does not require additional rendering: instead, dynamic reflections are generated from scene information, saving computational resources.

However, because SSR can only create reflections for objects on the screen, this technique also creates various graphical artifacts. Spatial reflections on shiny floors or water are cut off at the edges of the screen because there are no visible objects there. Additionally, objects in the reflection will periodically disappear and reappear when they leave the player's field of vision.

SSR also doesn't work on actual mirrors. This is why mirrors in games that use this method are often blurry, dirty, or look like polished metal. The problem is that the mirror reflects everything behind the player… But for the reflection to appear, objects must be in view. And if the game is in first person, then the player cannot be reflected in the mirror because he is not visible on the screen.

Get the amazing news right in your inbox

Leave a Reply