What is Ray Tracing technology and how does it play out in video games

Ray tracing capabilities showcased in Cyberpunk 2077

Ray tracing is a technology used in computer graphics that simulates the way light behaves in the real world. It is used to create highly realistic images and lighting effects in video games and other 3D applications.

The technical explanation of Ray-Tracing

ray tracing visual representation
Visual representation of the global illumination system with ray-tracing, source: nvidia.com

Traditionally, computer graphics have been created using rasterization, a technique that converts 3D models into 2D images. Rasterization works by breaking down a 3D scene into a series of 2D triangles, called “fragments,” and then determining each fragment’s colour based on the scene’s lighting and shading. This method is fast and efficient, but it can produce unrealistic lighting and shadows, especially in scenes with complex geometries or transparent objects.

Ray tracing, on the other hand, simulates the way light interacts with the objects in a scene by tracing the path of light rays as they travel through the scene. For each pixel in an image, the algorithm traces a ray from the camera, through the pixel, and into the scene. The ray is then tested for intersection with any objects in the scene, and the pixel’s colour is determined based on the properties of the object, such as its material and texture, as well as the lighting conditions in the scene. This process is repeated for every pixel in the image, resulting in a highly realistic and detailed image.

Lightning, reflection, and transparency effects that resemble reality

battlefield 5 with ray tracing reflection effect
Battlefield V – Reflective ray-tracing effect in a puddle, source: nvidia.com

One of the main advantages of ray tracing is that it can produce highly realistic lighting and reflections. With rasterization, lighting is calculated at the vertices of the triangles and then interpolated across the surface of the triangle. Ray tracing, on the other hand, calculates lighting at each point on the surface, resulting in much more accurate and realistic lighting. Ray tracing can also simulate the reflections of objects, which can be challenging to achieve with rasterization.

Another advantage of ray tracing is that it can be used to create realistic transparency and refraction effects, such as the way light bends as it passes through glass or water. This is challenging to achieve with rasterization because it requires multiple levels of transparency and refraction, which can be computationally expensive.

What happens behind the scenes

ray tracing dxr visualization
DXR visual explanation, source: nvidia.com

Ray tracing is more computationally expensive than rasterization because it requires more calculations to be made per pixel. This makes it less suitable for real-time rendering, which is why it is mostly used in offline rendering and pre-rendered cutscenes. However, with the advancements in hardware and software, more games are starting to incorporate ray tracing in real time.

In conclusion, ray-tracing technology is a method of simulating the behaviour of light in the real world, which allows for more realistic lighting, reflections, transparency and refraction. It is a more computationally expensive method than rasterization, but it can produce much more detailed and realistic images. With the advancements in hardware and software, ray tracing is becoming more accessible for real-time applications like video games.

Some of the best ray tracing games out there

portal rtx screen
Portal – Reflective and lightning effects, source: nvidia.com

As ray-tracing graphics cards are more and more available due to the crypto mining crash of last year, we are seeing an increase in video game companies developing titles that use ray-tracing technology for realistic reflections and lightning.

It’s worth mentioning that games running in Unreal Engine 5 are praised for being better than others as Epic has really focused on delivering the best ray-tracing technology to their state-of-the-art game engine. Furthermore, The Unreal Engine 5.1 update brings even more realism to the table.

Here are the most well-known games with ray-tracing capabilities:

  • Cyberpunk 2077
  • Fortnite
  • Minecraft
  • Marvel’s Spider-Man Remastered
  • Marvel’s Spider-Man: Miles Morales
  • Dying Light 2
  • Forza Horizon 5
  • Far Cry 6
  • Resident Evil Village
  • Portal with RTX
  • Watch Dogs Legion
  • Metro Exodus / Metro Exodus Enhanced Edition
  • Hitman 3
  • F1 22
  • Doom Eternal
  • Control
  • Call Of Duty: Black Ops Cold War
  • Crysis Remastered Trilogy
  • Deathloop
  • Ghostwire: Tokyo
  • Marvel’s Guardians of the Galaxy
  • Ring Of Elysium
  • Sackboy: A Big Adventure
  • Saints Row
  • Battlefield 2042
  • World Of Warcraft: Shadowlands
  • Wolfenstein: Youngblood
  • Warhammer 40,000: Darktide
  • A Plague Tale: Requiem
  • The Witcher III: Wild Hunt – Game of the Year Edition
  • Shadow of the Tomb Raider

And a bunch more, these ones less known or different titles of the mentioned franchises above:

  • Amid Evil
  • Battlefield V
  • Bright Memory
  • Bright Memory: Infinite
  • Call of Duty: Modern Warfare (2019)
  • Chernobylite
  • Chorus
  • Crysis Remastered
  • Deliver Us The Moon
  • Dirt 5
  • Everspace 2
  • F1 2021
  • FIST: Forged In Shadow Torch
  • Five Nights At Freddy’s: Security Breach
  • Ghostrunner
  • Gotham Knights
  • Godfall
  • Hell Pie
  • Industria
  • Icarus
  • JX Online 3
  • Justice
  • Jurassic World Evolution 2
  • Lego: Builder’s Journey
  • Loopmancer
  • Martha is Dead
  • Mechwarrior V: Mercenaries
  • Moonlight Blade
  • Mortal Shell
  • Myst
  • Observer: System Redux
  • Paradise Killer
  • Pumpkin Jack
  • Quake II RTX
  • Raji: An Ancient Epic
  • Resident Evil 2
  • Resident Evil 3
  • Resident Evil 7
  • Severed Steel
  • Stay in the Light
  • Steelrising
  • Sword and Fairy 7
  • The Ascent
  • The Fabled Woods
  • The Medium
  • The Persistence
  • The Riftbreaker
  • Turbo Sloths
  • Wrench
  • Xuan-Yuan Sword VII

Out of all of them, probably Portal RTX does the best job of showcasing the effect in the most dramatic way. This is due to the original game’s dark hallways and rooms with lightning balls travelling around. Oh and portals that have two distinct colors.

For more details about ray tracing, make sure to read Nvidia’s blog. You’ll get more details about this technology than you’ll probably ever need.