If you play video games regularly, or if you have watched any of Pixar’s or Disney’s animated movies from the last couple of years, you’ve already seen ray tracing in action without realizing.

The term has created significant buzz in the gaming industry in the past two years or so, and it is touted as the future of graphics in gaming. So what is ray tracing, how does it work, and why is it so important?

What Is Ray Tracing?

Ray tracing is a graphics rendering method that uses algorithms to calculate where light and shadows are supposed to be in video games.

Here is where elementary school science comes in handy: look at a mug. When you look at the mug, light bounces off the mug directly into your eye, and your brain understands the object sitting in front of you is a mug. Now, from the mug, move your eyes to find the light source in your room. That is ray tracing.

In 3D video games that we have now, the ray tracing algorithm starts with the player’s point of view and sets out to 'trace,' identify, and map out the light, colors, and shadows of multiple objects on a screen.

As a result, graphics produced via ray tracing are smoother around the edges and more realistic.

Before Ray Tracing

intel ray tracing differences
Image Credit: Intel

If you want to know what moving images looked like before ray tracing, just take a look at video games made in the early 2000s, and compare them with AAA video game titles on the market right now.

Traditional computer graphics use a method called rasterization, where the concept and plotting of 3D light sources are converted onto a 2D surface. 3D polygons are translated into 2D pixels, and this does not always go well because you are essentially forcing a complex object with many surfaces onto a flat surface.

On top of that, traditional computers were just not fast enough to keep up with video games' intensity. Although many improvements have been made on rasterization, when it comes to presenting an intense first-person shooter game, for instance, it falls short compared to ray tracing.

How Ray Tracing Works

diagram illustrating how ray tracing works
Image Credit: timrb/Wikimedia

Ray tracing sounds simple and exciting as a concept, but it is not an easy technique. So, how does ray tracing work?

Ray tracing performs a process called “denoising,” where its algorithm, beginning from the camera—your point of view—traces and pinpoints the most important shades of light and shadows. Using machine learning, it ‘fills in the gaps’ to form a photorealistic image.

So, the brighter the scene in a video game, the higher the graphics quality, and the higher the quality, the more expensive it is. This brings us to the reason behind ray tracing’s late arrival to the video game industry.

Why Was Ray Tracing Avoided For So Long?

You should know that ray tracing is not a new technique either. Hollywood has been using ray tracing long before the technology made its way into the video game industry. Pixar’s 2013 movie, Monsters University, was actually the first animated movie to use ray tracing technology for all lighting and shading. So why did ray tracing make it into video games so late?

First, in terms of mechanics, ray tracing itself is computationally demanding. Applying ray tracing technology on a standard 90-minute action film with 24 frames per second is already extremely time-consuming. Animators can spend days or weeks on just one scene, so just imagine how much more intense it is for ray tracing to be done on a standard video game that 60 runs on frames per second. It was simply impractical.

Next, as mentioned above, ray tracing is costly. Besides the fact that it is time-consuming, the expensive budget is why it has always only been mega film production companies in Hollywood that could afford ray tracing. Pixar’s Monsters University cost $200 million to make, as did Toy Story 4, which was released in 2019.

Whereas modern graphics cards with support for real-time ray tracing range from $400 up to $3,000.

When Ray Tracing Is Used

ray traced architecture concept model
Image Credit: nVIDIA/NVIDIA Blog

Ray tracing is used pretty much everywhere in a video game, but particularly in cut scenes. Have you ever noticed why your character looks more lifelike and sophisticated during video game cut scenes? That is ray tracing in action. 2019 hit AAA title Control is the best example of successful ray tracing in a video game.

Outside of video games, ray tracing is also used in many industries. In architecture, ray tracing is embedded in software applications for the 3D modeling of a building. This makes an architect’s imagining of a building design more realistic than hand-drawn concept sketches, and the modeling light is more accurate. In engineering, ray tracing is also used for a similar purpose.

Game Developers and Ray Tracing

nvidia geforce rtx ray tracing gpu

After acquiring ray tracing company RayScale in 2008, Nvidia became the first in the industry to launch ray tracing commercially. In 2018, it introduced its GeForce RTX series graphics cards to consumers. Since then, big-name game developers have joined the ray tracing game, one by one.

In 2019, Epic Games and Utility Technologies announced that their signature hardware engines now offer native support for ray tracing. In 2018, Microsoft integrated ray tracing into DirectX 12, its key multimedia and game programming software for Xbox One. Early in 2020, the tech titan unveiled DirectX 12 Ultimate, an upgrade to DirectX 12.

If you want to learn more about ray tracing, check out our comparison of Nvidia’s latest GeForce RTX products. If you're a Linux user, check out how the different GPUs from Nvidia and AMD stack up on Linux.

Ray Tracing Will Shape The Future of Gaming

In essence, what ray tracing promises is a high-quality visual experience for maximum enjoyment. Ray tracing in video games is still very much at its early stages, but its entrance to the market marks a promising future for the billion-dollar industry.