In the world of visual technology, a revolution has quietly taken place over the past few decades. This transformation, driven by the exponential growth in computing power, has given rise to a groundbreaking technique known as path tracing. What is path tracing though? It’s quite a huge buzzword right now for Cyberpunk 2077– a new graphical option for lighting.
While it might sound like a niche term from the realm of computer graphics, path tracing has far-reaching implications, touching everything from Hollywood blockbusters to the immersive worlds of video games. Let’s all dive deep into the world of path tracing, exploring its roots, how it differs from traditional techniques like rasterization and ray tracing, and its potential to reshape the future of interactive graphics.
The Path to Path Tracing
Path tracing, in layman’s terms, is a lighting technique or algorithm for computer graphics that simulates the behavior of light. Video games and CGI in movies notably use it in order to produce realistic images that follow the laws of physics (for light) as much as possible.
Before we delve into the intricacies of path tracing, let’s set the stage by briefly understanding its predecessors, namely rasterization and ray tracing.
Rasterization: Path Tracing’s Aging Progenitor
Rasterization is a technique that has been at the heart of modern GPUs (Graphics Processing Units) since their inception.
It involves generating an image from a single viewpoint, making it ideal for real-time graphics like video games. Modern GPUs, such as NVIDIA‘s, can churn out over 100 billion rasterized pixels per second, providing the horsepower needed for immersive gaming experiences.
As impressive as it sounds, rasterization isn’t exactly an “accurate” simulation of light behavior and physics since its light sources are fake and it only shades each polygon without taking into account its interaction with other polygons and light sources.
Ray Tracing: A Leap Toward Realism
Ray tracing, on the other hand, is a more advanced technique that allows for the simulation of light in a more realistic manner.
Unlike rasterization, which focuses on visibility from a single point, ray tracing traces the paths of light rays from multiple viewpoints and directions.
This method enables the accurate, lifelike simulation of how light interacts with surfaces, leading to lifelike reflections, shadows, and refractions. With dedicated hardware like NVIDIA’s RTX technology, a single GPU can trace billions of rays per second.
It’s hard to paint this kind of simulated physics with words, so here’s a photo instead, detailing the huge differences between ray tracing and traditional rasterization.
The image to the right is with all the game’s lighting replaced with ray tracing, making the light bounce off different sources and behave as it would in real life. Rasterization simply cannot simulate this kind of light physics since it only shades polygons.
The game is Metro Exodus: Enhanced Edition, by the way, something we consider the best implementation of ray tracing since the developers overhauled all the rasterized light sources and objects and replaced them with ray-traced light.
Introducing Path Tracing
In the evolution of computer graphics, path tracing emerged as a significant development. It was introduced by James Kajiya, a CalTech professor, in 1986.
Kajiya drew inspiration from the study of radiative heat transfer, which explores how heat spreads in an environment. By applying ideas from this field, he introduced the rendering equation, a concise but challenging equation that describes how light scatters and interacts with surfaces and the air.
Path Tracing’s Journey
In its early days, path tracing was seen as an elegant but impractical technique. Kajiya’s original path-traced images, with a resolution of just 256 by 256 pixels, required over 7 hours to render on a powerful mini-computer. However, the landscape changed dramatically with the relentless increase in computing power, driven by Moore’s law.
Movies like A Bug’s Life in 1998 and Monster House in 2006 demonstrated the potential of ray tracing and path tracing in filmmaking. Monster House was particularly groundbreaking as it became the first entirely path-traced movie, showcasing what the new generation of computer animation could achieve.
However, it was still a time-consuming process, relying on render farms (lots of computers) to produce complete movies.
This kind of physics-based calculation required a lot of computing power, meaning path tracing initially was too expensive to be used in video games, so its applications were mostly limited to CGI in films or other non-interactive media.
However, with recent developments from Nvidia, particularly with Cyberpunk 2077 as its demo and staging field, path tracing is starting to become available for interactive simulated worlds or video games. It was made possible with powerful processing cores from today’s modern graphics processing units (GPUs).
Path Tracing vs. Ray Tracing vs. Rasterization (No Ray Tracing)
With Cyberpunk 2077 as an example, here’s how path tracing differs from ray tracing. The images below were direct comparisons and we’ll even link some videos to show you the technology in motion.
The image above is one of the more subtle comparisons of the differences between path tracing and ray tracing. In certain scenes, path tracing can improve the atmosphere, especially in a neon-lit dystopia like Cyberpunk 2077‘s Night City. Here’s the difference in motion courtesy of MxBenchmarkPC:
As for the difference between rasterization and path tracing, here’s an image comparison below:
Shadows and light intensity behave according to the light sources and even the smoke can absorb or refract some of the light. In rasterization (no ray tracing), the polygons can look flatter with fainter shadows because the lighting is fake.
Path tracing’s lighting also takes into account how light or the lack thereof can change the color and hue of objects depending on their capacity for reflection, something rasterization fails at.
Overall, the effects of path tracing are more pronounced and more noticeable in certain scenes though they no doubt make a moving 3D image look lifelike and almost real.
The Path to Real-Time Path Tracing in Gaming
The idea of real-time path tracing in video games once seemed like an impossible dream. GPUs were far from capable of handling the computational demands of path tracing. However, as GPUs continued to evolve and the availability of RTX hardware from Nvidia became widespread, real-time path tracing started to become a reality.
Gaming made a gradual transition, initially incorporating ray tracing techniques before embracing path tracing. Many modern games now combine traditional rasterization-based rendering with ray tracing effects.
In this context, path tracing can involve a mix of techniques. For instance, game developers might use rasterization for primary rays and path tracing for lighting within the scene.
In path tracing, all lights in a scene are sampled stochastically, both for direct illumination and global illumination. This means that rays are traced over multiple bounces, similar to what Kajiya outlined in his pioneering work.
Some games, like Microsoft’s Minecraft and the classic shooter Quake II, have already implemented full path tracing, resulting in stunning visual experiences, though at a huge performance cost.
The Future of Path Tracing
As GPUs continue to evolve, the adoption of path tracing is the logical next step. Cyberpunk 2077 became the ideal preview for path tracing and the results were stellar already even though it’s just a preview of the tech.
With real-time path tracing becoming increasingly feasible, digital experiences across various domains, from games to virtual worlds and online collaboration tools, are poised to evolve more cinematic qualities previously reserved for Hollywood blockbusters.
It’s still too early to fully adopt it and the hardware limitations are still present. It’s important to note that hardware for path tracing is still too expensive these days (mostly requiring an RTX 4090 which is a $1,600 GPU). However, like ray tracing, you can expect it to gradually become more available and accessible for the typical gamer.
Let’s give it a few years (likely not more than a decade) before path tracing can finally simulate the most realistic-looking video game worlds so far. We hope that explained what is path tracing to you and how it can signify an exciting future for gaming.
Leave a Reply
You must be logged in to post a comment.