What actually is Ray Tracing?

This is a question you might have asked yourself when shopping for a new graphics card. Nvidia is heavily using this term for marketing but what does it actually mean? Here you will learn.

What does it do?

RayTracing in the game PortalRTX (source: NVIDIA)

To start with, Ray tracing in gaming is a rendering technique that can realistically simulate the lighting of a scene and its objects by tracing the path of light and how it interacts with different surfaces. Ray tracing can produce stunning effects such as reflections, shadows, global illumination, and ambient occlusion. However, ray tracing is also very computationally intensive and requires powerful hardware to run smoothly which Nvidia uses as a selling point for their high end RTX graphic cards.

How does it work?

Contrary to the concept of light in the real world, the light rays in ray tracing algorithms are calculated from the view point or anatomically speaking, the eye, to the light source instead of the other way around. As you can imagine, the field of view of the camera will always be smaller than ALL the possibilities of light rays that bounce off an object which is why this way is much easier on the needed computational power.

RayTracing works contrary to the concept of light in reality

“camera rays”

As an example, you can think of a globe that’s lighted from the top where the camera is placed in front of it. The light rays that would naturally bounce of the back of the globe but are no captured by the camera/viewpoint and would therefore be an unnecessary calculation for the computer.

Now on its way through the three dimensional simulated scene the light ray will not only go straight to the next light source but the path will also be affected by the objects that are in the way of the light. Depending on the characteristics of the object and the light, the point or pixel that was hit will be displayed bright and lit. Apart from the capability of the object to get illuminated by the ray it is also possible for the ray to change its wavelength better known as the color of the light itself when it hits a colored object for example.

recursive rays

recursive rays bouncing from one object to another

With the help of a huge amount of characteristic variables for both the objects as well as the light you can create realistic looking 3D rendered scenes with incredible lighting detail. In most modern ray tracing algorithms the rays are also recursive meaning that once they hit an object the place that they illuminated emits more rays that then can reflect on even more surfaces.

Usage of Ray Tracing

As already mentioned the algorithms needed to process these rays that are calculated as vectors are extremely power hungry. So hungry in fact that a decade ago animation film studios that first started using the technic needed multiple hours to render a single frame. In recent years though thanks to huge steps in the processing power of GPUs and the more efficient algorithms it now is possible to render these complicated computations (at least simplified) in real time with over 60 fps per second.

Summary

Ray Tracing is an innovative method of rendering that allows for stunning real time rendered visual effects by calculating vectors that go from the camera to the objects. The technique can be used in animation movies but also in increasingly more video games as consumer GPUs get increasingly powerful.

Get a game that uses Ray Tracing:

Leave a Reply