And there was light: how Ray Tracing works in video games

After having played a fundamental role, but which we may not have even noticed, in the cinema, the ray tracing has also forcefully entered the world of video games.

But what is 'Ray Tracing' and how does it work? It is a technology for creating luci shadow e reflections within images and videos in computer graphics, and it is destined to change (for the better) the future of video games.

 Let's see how.

Ray Tracing: what it is and how it works

As distant as it may seem, the starting point for understanding how ray tracing works is the real world and the way our sight perceives it. To see anything, in fact, i photons of which the light is composed (which can come from Sun or from another source) must bounce on it before getting to our eye. The amount of light absorbed by the object during the bounce determines the color, la brightness and any reflexes.

As the name also suggests, ray tracing does nothing but emulate this physical process in a way digital. When you want render a scene (i.e. transforming the set of data regarding lights, objects and materials present in a two-dimensional image) the computer simulates the path of the rays of light arriving at the 'camera' (or our perspective). By following these rays up to the various light sources, the computer can accurately calculate the color and light intensity of each pixel in the image, also taking into account reflexes, glows or areas that are only partially in the shade.

And there was light: how Ray Tracing works in video games
Monster University (2013) is the first animated film where lights, shadows and reflections are determined using only ray tracing

The result, if a sufficiently high number of light rays are used, is a lot realistic, precisely because it faithfully emulates the physics of the real world. However, as the number of rays increases, so does the computational cost, that is the time and power needed to render every single scene. This is the main reason why ray tracing was only applied in the film industry until a few years ago special effects and for animation film. In these contexts it is in fact acceptable that the rendering of a single frame may require minutes, hours or also giorni. The same is obviously not true for video games, where the rendering has to be in real time. So what has changed in recent years, to allow the arrival of ray tracing also in the videogame panorama?

A history of compromises

Even without ray tracing, the gaming industry has been able to offer a lot of products graphically advanced e realistic. To obtain them, however, tricks have often been devised, often almost invisible to the players, capable of returning excellent results at a low computational cost, a necessary requirement to be able to produce 30, 60 or more frames per second as the player plays.

And there was light: how Ray Tracing works in video gamesAs for shadows and light, one of the most popular techniques is about it shadow mapping. With this technique, before the video game scene is rendered from the player's point of view, one goes to look at the perspective of the light sources (the number of which also depends on the graphic complexity of the game). In this way it is possible to control which points of the objects and surfaces are 'visible' to the light source and therefore Illuminated from it. The resulting image, while usually adequate, still tends to have a lot of shadows clear, and often needs further manipulations that take into account luci broadcasts e illuminations environmental.

And there was light: how Ray Tracing works in video games
To get around this, many mirrors in games are either broken or don't directly work

Also for reflective surfaces, such as water mirrorsmetal objects and especially mirrors, developers have often had to engineer. To obtain realistic reflections, in fact, it is essentially necessary render a second time the game environment, perhaps also including objects that are not directly visible (and therefore normally would not be rendered). To remedy this problem and limit the number of calculations, reflexes, if present, are often limited to fixed objects of the scene and some moving objects, such as the player.

The era of ray tracing

Despite the presence of these techniques, developers have long looked to ray tracing as the next step forward for the gaming landscape. The graphics card manufacturer opened the door to this new era NVIDIA, which in 2018 presented the series RTX equipped with architecture Turing. Among the various improvements included in this new generation was in fact also included thededicated hardware just to support ray tracing.

And there was light: how Ray Tracing works in video games
Battlefield V, where Ray Tracing is used for reflections Left: Ray Tracing Off; Right: Ray Tracing On

The version of this technology supported by NVIDIA, having to run in real time, is however not comparable to cinematic renderings. Also in this case some tricks are used to reduce the necessary computing power: first of all, the number of rays followed, and the number of bounces they can make, is limited. This reduction alone, however, creates very "noisy" shadows, with jagged edges and patches. For this it is necessary to apply also other algorithms that remove this noise and allow to obtain a realistic image.

And there was light: how Ray Tracing works in video games
Temples and Totems RTX

Furthermore, to further improve the trade-off between performance and graphics quality, many games may choose to only partially implement ray tracing. In fact, you can decide to use it only for shadows (as in Shadow of the Tomb Raider) or just for reflections (like Battlefield V), rendering the rest in a more traditional way. However, there is no shortage of games that have decided to take full advantage of this technology, such as Metro Exodus and more recently Minecraft.

The future of video games

Although two years have passed since NVIDIA's announcement, support for ray tracing is not yet widespread in a popular way, both because the RTX series is quite expensive compared to other alternatives and because supporting this technology still requires an additional investment from the developers. .

However, this does not mean that things have not changed or that they will not change: in 2019 NVIDIA has announced an update with ray tracing support also for the already released cards in the line GTX. The calculations necessary to implement this technique can in fact also be at the software level. The lack of dedicated hardware obviously involves a greater compromise in terms of performance, but there remains an enlargement of the base of people with the possibility of taking advantage of ray tracing.

The most important news, however, is yet to come: it is the support for ray tracing by both Xbox Series X that of PlayStation 5, the next generation of Microsoft e Sony. As with many news in the world of gaming, if it is true that the PC is the one that drives towards new technological and graphic frontiers, then it is the consoles that bring these innovations in a widespread way among the players. With the support of consoles, in fact, many more titles (even in their PC version) will see integrated ray tracing. It is also very likely that with the announced arrival of the technology on the AMD the cost of a computer capable of exploiting it decreases drastically.

We are ready

The future of gaming seems destined to fully embrace this novelty and we, as gamers, can only be happy and excited for the probable wave of graphically beautiful and immersive titles in which to get lost for hours and hours of play. The only thing left for us to do at the moment is to have a little more patience.

Bestseller no. 1 And there was light: how Ray Tracing works in video games NVIDIA GeForce RTX 3090 Founders Edition Graphics Card Buy on Amazon Bestseller No. 2 And there was light: how Ray Tracing works in video games Megaport PC-Gaming Intel Core i7-10700K • nvidia GeForce...
  • With this gaming PC, fun for real gamers is guaranteed! Thanks to the Intel Core i7-10700K processor with 8 x3.80 ...
  • Furthermore, the 16 GB DDR4 3000 MHz random access memory allows quick access times to open programs. For...
  • Equipped with all the latest technologies on the market, your nvidia GeForce RTX3080 with 10GB of GDDR6 memory ...
2.729,00 EUR Acquista su Amazon TagsBattlefield V Minecraft NVIDIA ray tracing And there was light: how Ray Tracing works in video games
add a comment of And there was light: how Ray Tracing works in video games
Comment sent successfully! We will review it in the next few hours.