Ray Tracing Explained

Ray Tracing Explained
3 0
Read Time:4 Minute, 0 Second

If you’ve been paying attention to modern video gaming over the past few years, you’ve likely heard the term “ray tracing” thrown around. Is it just a buzzword or something that gamers should genuinely be excited about? We’ll dive in and give a quick rundown of how this technology is taking graphics to new levels of realism.

Ray tracing as seen in Forza Horizon 5 running on Xbox Series X
Image source: Justin Casey / Timeless Gamer
http://www.timelessgamer.net

I want to start by making one thing clear – ray tracing in computer graphics is not a new concept, far from it actually. Big-budget animation studios such as Pixar have been utilizing the technique for several years in CGI films, and it had been theorized for decades prior. The real breakthrough is that modern computers coupled with clever engineering have finally reached a point where ray tracing can be done in real time. When making a CGI film, animators have the luxury of time on their side. They’re able to render each frame individually, typically spending several hours per image. On the other hand, a working video game must render the image instantly – each frame as quickly as the player gives a command.

But let’s back up a bit. In order to understand what ray tracing technology accomplishes, it’s important to have a basic understanding how light rays behave in the real world. Light begins at a source, such as the sun, a lamp, etc., casting rays of light outwardly in varying directions. If followed, a single ray is likely to bounce off several different surfaces before it reaches the viewer’s eye. Some of these surfaces are highly reflective, while others diffuse light. The final image perceived is a result of all factors combined. Colors will vary depending on the lighting and surroundings, and details such as shadows and subtle reflections are abundant. In the world of 3D graphics, “ray tracing” refers to an attempt to digitally simulate these nuances, representing them as accurately as possible in the form of pixels on a screen.

Computer generated image rendered using ray tracing
Image source: Wikipedia
http://en.wikipedia.org

Previously, all lighting and shadows in game graphics were artist approximations. Designers would do their best at guessing what the colors of a particular environment would be, often with convincing results. Basic reflections could be achieved by adding more “cameras” into the code and distorting the image to mimic how light might interact with objects. Nonetheless, the process ultimately falls short of what ray tracing is capable of in terms of recreating real-life environments. When properly applied, ray tracing brings a tremendous sense of photorealism that simply can’t be matched using other techniques.

Computer generated image rendered using ray tracing
Image source: Wikipedia
http://en.wikipedia.org

As impressive as this emerging technology is, the algorithms involved take a hefty toll on a computer’s processor. It’s only been in very recent years that PCs and gaming consoles are able to keep up with the demand, and even then, it’s only possible with a little trickery. For instance, a real light source will emit countless rays that would be impossible by today’s computing standards to recreate. Instead, developers use far fewer rays than in real world situations, and the other pixels are filled in with algorithmic coding to best approximate which colors might be in between those rays. Perhaps more crucial to the process, however, is the strategic choice to reverse light rays. Rather than traveling from light source to the eye (as in real life), developers begin rays from the game camera going toward the source. This frees up the processor significantly since all off-screen rays are disregarded entirely, allowing the computing power to focus its efforts on only what’s visible.

Illustration of the directional difference between real-life light rays and in-game ray tracing
Image by Justin Casey / Timeless Gamer
http://www.timelessgamer.net

So, what does this breakthrough mean for the current game generation and those to come? Well, to those who truly don’t care about cutting-edge graphics, it means nothing. It won’t have any direct effect on gameplay, and it won’t magically make sub-par games more fun. That said, many people do appreciate state-of-the-art visuals, which perhaps allows them to become immersed in the game. Yes, we all know the main point of a video game is to play it, but there’s nothing wrong with enjoying how one looks.

Many have been looking forward to this technological leap, making it a particularly exciting time for game developers and fans alike. It’s only fair to assume that more releases will take advantage of ray tracing as it becomes more sophisticated and easier to achieve. I, for one, am excited to see the technique become more adopted in coming years.

About Post Author

Justin Casey

A North Texas native, I was born in '80s and grew up '90s playing a hefty amount of NES, Sega Genesis, and SNES. Some early favorites include Mike Tyson's Punch-Out!!, Road Rash II, and Super Mario World. As the 3D revolution took hold in the late 1990s, my interest in video games waned while my interest in music grew. Then around 2007, I started recollecting some old favorites which led to discovering classics I missed out on. The casual hobby snowballed into a full-blown obsession, and it became my mission to make up for years of lost gaming.
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %
Author: Justin Casey
A North Texas native, I was born in '80s and grew up '90s playing a hefty amount of NES, Sega Genesis, and SNES. Some early favorites include Mike Tyson's Punch-Out!!, Road Rash II, and Super Mario World. As the 3D revolution took hold in the late 1990s, my interest in video games waned while my interest in music grew. Then around 2007, I started recollecting some old favorites which led to discovering classics I missed out on. The casual hobby snowballed into a full-blown obsession, and it became my mission to make up for years of lost gaming.