Ray tracing is an advanced form of computer graphics that simulates how light works in real life. It can create truly photorealistic computer graphics.
In the past, ray tracing was limited to large-scale CG projects such as Hollywood CG movies. Now it is used in PC games, and soon in next generation video game consoles.
To understand why many people are so excited about this, we need to compare ray-traced graphics with the main graphics rendering technique that has been used so far: rasterization.
Rasterize versus ray tracing
Modern real-time CGI looks amazing! It’s hard to imagine that this has anything to do with basic 3D graphics twenty or thirty years ago. In fact, consoles like the Playstation 1 and the current Playstation 4 use the same basic method of rendering 3D graphics and then displaying them on your 2D screen.
This is called rasterization . A “raster” is an image, represented as a grid of pixels, which is displayed on your screen. Rasterization is the process of converting a 3D scene to a 2D image on the screen.
This must be done because a 3D scene is, in general, 3D. It has depth, so virtual objects can move one after another and look at them from any point. During the rasterization process, the computer needs to figure out what this scene would look like if your screen were basically a window into this three-dimensional world.
In real life, a scene has texture and lighting, as well as shape, depth, and size. Since simulating light has traditionally required more computer power than any home computer, programmers have created tricks and shortcuts to create something that looks like real light, color, and texture using this rasterization process.
On the one hand, ray tracing is much easier. Instead of trying to use a long list of tricks to create the illusion of real flight, it simulates real light. Now, when the computer needs to figure out what the scene will look like when seen through the “window” of your screen, it just runs the ray tracing simulation and everything works.
In the real world, rays of light entering your eye are reflected from everything you look at before reaching the retina. Ray tracing produces the same result in a more efficient way. It does this by capturing simulated “beams” of light from the “camera” and letting them bounce off the virtual scene, gathering color and brightness information along the way. Your screen is a virtual eye, so you see a truly realistic virtual world.
Using ray tracing, a unified method creates objects, reflections, shadows, and other scene elements that look realistic. This kind of realism comes naturally from modeling, no tricks or shortcuts required!
Where to try ray tracing
If you want to see ray tracing in action, all you have to do is watch any modern CG film. If you’re watching a CG movie like Toy Story 4, everything you see is raytraced.
If you want to explore an interactive ray-traced world, there is only one game in town at the moment. Nvidia RTX GPU series, as well as video games and applications that support this technology. You can run some ray tracing applications on non-RTX hardware, but you won’t get good performance. Be sure to check out our article on the best games showcasing RTX hardware.
The problem is that RTX hardware is still quite expensive. However, the next generation of video game consoles are in the form of ray tracing support. This means that the main game world can help turn ray tracing into the next big game technology. That said, if ray tracing is so hard to do in real time, how are these new GPUs doing it?
How is real-time ray tracing achieved?
Any computer can render a 3D scene using ray tracing. The people who work with 3D rendering packages have been doing this for years. Any modern processor can do the actual computation required to track the path of light around a scene.
However, modern CPUs and GPUs cannot process these numbers fast enough to generate an image in real time. For example, the huge computer farms used to make movies like Monsters, Inc. or Toy Story take hours to render a single frame of the final product.
Modern video games, by contrast, must generate at least thirty frames of images every second to be playable, with the gold standard currently set at 60 frames per second.
So how can GPUs like the Nvidia RTX series use ray tracing at reproducible frame rates? The answer is that they don’t use ray tracing for everything. At least in modern names.
The trick is to combine traditional graphics with selective ray tracing. RTX cards have special ray tracing hardware that is installed alongside the more traditional GPU. Thus, ray tracing can be used to compensate for some of the shortcomings of traditional graphics hardware.
There are video games that can be played with an RTX card, with full ray tracing. The best example is Quake II RTX It’s a video game that’s several decades old and so simple that full real-time ray tracing is possible. However, when it comes to applying pure ray tracing to modern video games, it will be years before such equipment becomes mainstream.
Is Ray Tracing the Future?
The short answer is yes, ray tracing is the future. The longer answer is that as hardware that makes real-time ray tracing possible becomes cheaper, we will likely see it gradually replace traditional rendering. If ray-traced graphics become a normal part of the next generation of consoles, there will be no turning back.
Developers can feel free to include ray tracing features in their games, because all popular platforms will support them. With ray-traced graphics exceeding expectations, stars are really starting to get closer to the ray-traced appearance on the hardware available. This means that real photorealism can finally be here.
Another important sign that ray tracing will become the main rendering method is that it is now included in the general tools that developers use to create video games and other 3D applications. In other words, developers no longer need to invent their own ray tracing solutions.
Popular graphics engines like Unreal Engine 4 or Frostbite now include support for hardware-accelerated RTX ray tracing. This increases the likelihood that developers will include it in their games.
Should you purchase ray tracing now?
At the time of writing, we are still on the first generation of ray tracing hardware. Although prices have dropped, performance is still pretty mediocre. If you’re an avid beginner, there is a lot to love about ray tracing on PC.
If you’re not ready to spend hundreds or thousands of dollars as an early adopter, it’s best to invest in the next generation of mainstream consoles that promise to use this technology, or wait for the successor to the RTX 20-series cards. –