Ray Tracing Explained: What It Is, And How It Works

Ray Tracing Explained: What It Is, And How It Works
Written by Techbot
digital art light

Alwyncooper/Getty Images

Unless you’re a physicist, you probably don’t pay too much mind to the function of light in your daily life. Light is light, right? When there is light, we see, and when there isn’t, we don’t. But light is one of the most complicated forms of energy in our world, illuminating all that we see in ways both obvious and subtle, from the colors of the trees outside your window to the shadows in the corner of your closet.

Now, imagine trying to simulate such an overwhelming natural force, not just superficially, but as it truly is. It sounds incredibly daunting, doesn’t it? Once upon a time, such a thing may have been completely incomprehensible, but thanks to advances in modern rendering technology, it’s quite possible and downright achievable. It’s all thanks to a powerful function of modern graphical devices that we know as ray tracing. So, what exactly is ray tracing, and how does it make digital graphics more realistic?

Simulated streams of light

light rays


In real life, light is actually made up of millions of little beams emanating from a source like a lightbulb or the sun. These little beams either bounce off of or are absorbed by stationary objects like people, plants, buildings, or whatever else. The light that bounces off is captured by our retinas, creating the appearance of color and shadow. Obviously, it’s a lot more complicated than that, but that’s the short version.

Ray tracing, in a nutshell, is the process of simulating rays of light emanating from a source and bouncing off of objects, just like in real life. The name says it all — it’s “tracing” the “rays” coming from a light source and rendering their responses in real-time. Because the activity of light makes up the lion’s share of how we experience the world around us, digital graphics empowered by ray tracing look much more realistic- it’s working the same way that it does in real life.

Tracing the world isn’t easy

light switch


Technically speaking, the concept of ray tracing has existed for as long as digital 3D art has. Of course, rendering realistic light and shadow in a static image is a completely different matter from rendering it in real-time. It was only in the last few years or so that computer graphics cards became advanced enough to make ray tracing work with moving objects.

Consider this- when you walk in front of a lamp, your shadow walks along with you, changing in focus depending on how close to the light you are. To make something like that happen realistically in a digital landscape, a computer effectively has to redraw an entire image millions of times in a second with subtle alterations to coloration and shadow to account for changes in lighting.

This process is incredibly strenuous for a computer, which is why only high-end graphics cards can make it happen with the help of a powerful processor. That’s why you usually only see ray tracing in triple-A video game releases- smaller studios can’t afford the hardware necessary to render environments like this.

Ray tracing in gaming and animation

GeForce RTX graphics card

Peter Gudella/Shutterstock

Odds are good that you haven’t heard of ray tracing unless you’re in the modern gaming scene, where it’s become a prominent selling point for graphics card manufacturers like NVIDIA. That’s what the “RT” in “RTX” stands for.

Indeed, with the power of a high-end graphics card, you can experience your games with both the highest possible frame rate and ray tracing enabled, creating quite possibly the most true-to-life visual experience currently available. Of course, not all rigs can handle that kind of strenuous load- if you’ve noticed distinctive slowdown and frame-dropping while ray tracing is enabled on your games, it’s because your computer isn’t powerful enough to handle the necessary calculations and rendering.

Ray tracing has also become a standard in the theatrical animation industry. If recent 3D animated films have appeared more vibrant and expressive, that’s thanks to ray tracing. Even if the characters look cartoony, the world around them can still look similar to our own, thanks to the simulated behavior of light.

Ray tracing-enabled hardware is still on the pricey side, but as graphics card manufacturers continue to refine the process of simulating light, expediting it with algorithms and rendering tricks, it could become more affordable. As ray tracing proliferates, we’ll only become closer to our digital worlds.

Original Article:

About the author