What is ray tracing, and how will it change games?

Ray tracing is a lighting technique that brings an additional level of realism to games. It emulates the way light is reflected and refracted in the real world, providing a more believable environment than what is typically seen using static lighting in more traditional games. But what exactly is ray tracing? And more importantly, how does it work?

A good graphics card can use ray tracing to improve immersion, but not all GPUs can handle this technique. Read on to decide if ray tracing is essential to your gaming experience and justifies spending hundreds on an upgraded GPU.

Virtual photons

To understand how the revolutionary ray tracing lighting system works, we need to step back and understand how games have rendered light before, as well as what needs to be emulated for a photorealistic experience.

Games without ray tracing rely on static “baked in” lighting. Developers place light sources in an environment that emits light evenly in any view. Moreover, virtual models like NPCs and objects do not contain any information about any other model, requiring the GPU to calculate the lighting behavior during the rendering process. Surface textures can reflect light to mimic a glow, but only light emitted from a static source. Take the reflection comparison GTA V below as an example.

Comparison images showing the difference in reflection quality in GTA V between normal and ultra settings.Image used with permission of the copyright holder

Overall, GPU evolution has helped make this process more realistic in appearance over the years, but games still aren’t photorealistic in terms of real-world reflections, refractions, and general lighting. To achieve this, the GPU needs the ability to trace virtual light rays.

In the real world, visible light is a small part of the family of electromagnetic radiation perceived by the human eye. It contains photons that behave both as a particle and as a wave. Photons have no real size or shape – they can only be created or destroyed.

Nevertheless, light can be identified as a stream of photons. The more photons you have, the brighter the perceived light. Reflection occurs when photons bounce off a surface. Refraction occurs when photons – traveling in a straight line – pass through a transparent substance and the line is redirected or “bent”. The destroyed photons can be perceived as “absorbed”.

Ray tracing in games tries to mimic the way light works in the real world. It follows the path of simulated light by tracking millions of virtual photons. The brighter the light, the more virtual photons the GPU has to calculate and the more surfaces will reflect, refract and scatter.

Minecraft RTX ray tracing beta image. Ray tracing alone makes a huge difference in Minecraft. Matthew Smith / Digital Trends

The process is nothing new. CGI has used ray tracing for decades, although in the early days the process required farms of computers to generate an entire movie, with a single frame taking hours or even days to render. Now, home computers can emulate real-time ray-traced graphics, using hardware acceleration and clever lighting tricks to limit the number of rays to a manageable number.

Here’s a real eye opener: Like any movie or TV show, scenes in CGI animation are usually “filmed” from different angles. For each frame, you can move the camera to capture the action, zoom in, zoom out, or pan the entire area. And like animation, you have to manipulate everything on a frame-by-frame basis to mimic the movement. Stitch all the shots together and you get a flowing story.

In games, you control a single camera that is always moving and always changing the angle of view, especially in fast-paced games. In both CGI and ray-tracing games, the GPU not only has to calculate how light is reflected and refracted in any scene, it also has to calculate how it’s captured by the lens – your point of view. For games, that’s a huge amount of computing power for a single PC or console.

Unfortunately, we still don’t have consumer-level PCs that can truly render ray-traced graphics at high frames per second. Instead, we now have hardware that can effectively cheat.

Let’s be realistic

Ray tracing’s fundamental similarity to real life makes it an extremely realistic 3D rendering technique, even creating blocky games such as Minecraft look almost photo-realistic in the right conditions. There’s just one problem: it’s extremely difficult to simulate. Recreating the way light works in the real world is complicated and resource-intensive, requiring a ton of computing power.

Because of this, existing ray tracing options in games, such as Nvidia’s RTX-driven ray tracing, are not true. They are not true ray tracing, where every point of light is simulated. Instead, the GPU “cheats” by using a few clever approximations to deliver something close to the same visual effect, but without putting too much strain on the hardware.

Battlefield V: Ray Tracing Cinematic Compilation – GEFORCE COMMUNITY SHOWCASE

Most ray tracing games now use a combination of traditional lighting techniques, commonly called rasterization, and ray tracing on specific surfaces such as reflective puddles and metal elements. Battlefield V is a great example of that. You see the reflection of the hull in the water, the reflection of the terrain on the planes and the reflection of the explosions on the paint of the car. It is possible to render reflections in modern 3D engines, but not at the level of detail shown in games like Battlefield V when ray tracing is enabled.

Ray tracing can also be used for shadows to make them look more dynamic and realistic. You will see that it had a great effect Shadow of the Tomb Raider.

Shadow of the Tomb Raider: GeForce RTX ray-traced shadows in real time

Ray-trace lighting can create much more realistic shadows in dark and bright scenes, with softer edges and greater definition. Achieving that look without ray tracing is extremely difficult. Developers can only fake this with careful, controlled use of preset static light sources. Setting up all these “stage lights” requires a lots of time and effort — and even then the result is not quite right.

Some games go all the way and use ray tracing for global lighting, effectively tracing the entire scene. But it is the most computationally expensive option and requires the most powerful of modern graphics cards to work efficiently. Metro Exodus uses this technique, although the implementation is not perfect.

Metro Exodus: GeForce RTX Real-Time Ray Traced Global Illumination Demo #2

This is why radii such as just ray tracing shadows or reflective surfaces are popular. Other games use Nvidia technologies such as denoising and Deep Learning Super Sampling to improve performance and mask some visual flaws that occur when rendering less rays than would be necessary to create a truly ray-traced scene. These are still reserved for pre-rendered screenshots and movies, where high-powered servers can spend days rendering individual frames.

Hardware behind the air

A person standing on a dark stage in front of a presentation slide on which he is writing "RTX hybrid rendering."Image used with permission of the copyright holder

To handle even these relatively modest implementations of ray tracing, Nvidia’s RTX 20 series graphics cards introduced hardware specifically built for ray tracing.

All RTX cards now support ray tracing, and the latest RTX 40 series GPUs have yet another way to cheat performance. SER or Shader Execution Reordering is available on the RTX 4090 and RTX 4080, and Nvidia says it can boost performance by 25% in ray-tracing games. It works by reordering when ray tracing instructions are processed by the GPU, optimizing the task for available computing power.

Although the early days of ray tracing were difficult, Nvidia’s recent cards have been much better. With SER in the next generation, along with DLSS 3, we could see ray tracing that won’t drop your framerate. Nvidia’s new DLSS 3.5 also promises to improve ray tracing via ray reconstruction.

NEON NOIR: Ray-traced reflections in real time – achieved with CRYENGINE

But Nvidia’s ray tracing method isn’t the only option available. There are also Reshade “pathfinding” post-processing effects that give comparable visual effects without any of the same results.

Skyrim SE 2019 – RAY TRACING – Marty McFly’s RT Shader – Ultra Modded – 4k

AMD now also has options for ray tracing, which we’ll talk about next.

You’ll still want a powerful graphics card for ray tracing regardless of implementation, but as this technique takes off among game developers, we may see a wider range of supporting hardware at much more affordable prices.

Although ray tracing is mostly focused on computers, it is starting to make its way into other devices as well. Apple recently announced that the iPhone 15’s A17 Bionic chip is capable of hardware-accelerated ray tracing, including in games.

What about AMD?

A closer look at the AMD Radeon RX 6000.Image used with permission of the copyright holder

AMD has struggled to deliver hardware-accelerated ray tracing for the past few years, but that changed with the launch of the RX 6800, 6800 XT and 6900 XT. These new cards have DirectX 12 ray tracing support and deliver excellent performance, even if AMD isn’t quite up to Nvidia’s level in the ray tracing department (read our RX 6800 XT vs RTX 3080 and RX 6900 XT vs RTX 3090 comparisons for more).

That’s no surprise, given that the Big Navi architecture that powers AMD’s RX 6000 cards is actually the first generation of ray tracing acceleration. It’s the same architecture that powers the visuals in the PlayStation 5 and Xbox Series X, delivering an overall lower level of performance than Nvidia’s flagship cards. However, since ray tracing is an outstanding feature on next-gen consoles, we expect better support and optimizations in the future. In the near future we will see the debut of AMD FidelityFX Super Resolution (FSR) for gaming PCs and also the latest versions of Microsoft Xbox.

How can you see air tracking at home?

Battlefield V game image. Image used with permission of the copyright holder

You’ll need a newer — and expensive — graphics card to see ray tracing at home. Hardware-accelerated ray tracing is only available on Nvidia RTX GPUs or AMD’s RX 6000 series GPUs. GTX 10 series and 16 series cards support ray tracing, but lack RT cores for smooth gaming.

If you expect to game at resolutions above 1080p and frame rates of 60 fps or higher, it’s best to splurge for a high-end graphics card. At 4K, the RTX 3080 and RX 6800 XT are the cards that stand out, but you can get by with the RTX 3070 or RX 6800 if you’re willing to go 1440p in certain titles.

There is a limited selection of games with ray tracing enabled, but the number is growing. The best examples of ray tracing include early RTX demos, such as Battlefield V, Shadow of the Tomb Raider, and Metro Exodus. More recent games like Control and MechWarrior 5: Mercenaries also look convincing. Stay in the Light is an indie horror game built using ray-traced shadows and reflections. Remastered Quake II with RTX ray tracing is another fantastic example.

There are fewer air-tracing games on the market, but the industry is growing. As the PlayStation 5 and Xbox Series X begin touting ray tracing, competitors will soon follow suit. The cross-platform game Watch Dogs 2 differs from the new game Watch Dogs: Legion because the new game introduced ray tracing to work on consoles and PC.

Try using UL Benchmark’s Port Royal air tracer to determine if your computer will work with air tracer.

Editor’s recommendations

Categories: GAMING
Source: newstars.edu.vn

Leave a Comment