Real-time ray tracing is on the horizon and the possibilities are endless

Ready Player One is a 2018 sci-fi movie that plays in 2045. The world is on brink of chaos and collapse but the people have found salvation in the OASIS, an expansive virtual reality universe.

Siggraph is here and once again we’re in for a bunch of cool and game-changing features (pun intended) in the fields of computer graphics and interactive techniques. 

This time the annually Special Interest Group on Computer GRAPHics and Interactive Techniques conference is held in Vancouver, Canada, and like the past 45 years since 1973 when it was first held in Boulder, Colorado, companies large and small line up to present their latest discoveries and achievements to tens of thousands of attendants who gather from around the world.

Same old at SIGGRAPH or what?

New shading techniques, updated render engines, cutting edge graphics cards and hardware, advancements in virtual and augmented reality, innovative research and ideas, and eye-catching animations and art that makes your mind fly without getting under the influence. 

And much more. But basically, while these are things you shouldn’t miss, more often than not they aren’t groundbreaking technologies; just the steady advancement in sync with the overall progress in computer science. 

But this year’s announcement of real-time ray tracing graphics cards by Nvidia coupled with previous announcement of Microsoft’s DirectX Ray Tracing API sent my mind racing.

Take a minute and watch the following video that is rendered in real-time on Nvidia’s new Turing GPUs:

The quality is what we’ve seen for years in the movies and some AAA game cinematics. Blurry reflections, refractions, ambient occlusion, global illumination with nice and even shadows… nothing new except for this has been rendered in REALTIME on a new Nvidia Quadro RTX family graphics card (RT stands for ray tracing). 

For those of us who aren’t much into the technicalities of computer graphics, think of real-time ray tracing as one of the cornerstones for creating OASIS in Ready Player One, the virtual reality world everybody is eager to enter to escape the bleak reality of their lives. 

Now if this doesn’t ring a bell let’s say that traditionally, real-time has been anathema to ray tracing simply because of the insane amount of computational power ray tracing requires.

A short history of ray tracing in computer graphics?

Ray tracing per se is nothing new and has been used in physics even before computers were created. The technique is used to trace the path of waves or particles through a system and accurately predict and calculate their fate based on varying properties of the system like reflecting, propagation velocity and absorption characteristics. Sounds very much like how light works in the real world, doesn’t it? 

Before entering the field of computer graphics, ray tracing was successfully used in fields like radio signals, ocean acoustics, optical design, seismology, plasma physics and even general relativity. 

In fact, when J. Turner Whitted, one of the pioneers of today’s raytraced rendering, was contemplating on ways to improve on Henri Gouraud, Bui Tuong Phong and Jim Blinn’s different shader models, he stumbled upon the idea of using similar mathematics and concepts he had earlier learned when working on sonar systems. 

“In my own early career, I had been involved with ocean acoustics and remembered a diagram of ray-traced sound being refracted through varying depths of the ocean and reflected from the surface. Eventually a memory of that diagram popped into my head and it then became clear to me how to improve upon the global illumination method that Blinn and Newell had initiated”, writes Whitted, back then a researcher at Bell Labs and now with Nvidia Research. 

When Whitted later presented his paper to SIGGRAPH, back in 1979 and 1980, it wasn’t met with much interest. A single 640×480 frame on a VAX-11/780 mainframe, which by the way cost a mere $500,000 in 1979, took 74 minutes to render. No wonder the apathy. 

What is the difference between biased and unbiased render methods?

Generally speaking photorealistic 3D computer graphics render engines are based on two extreme tenets: biased and unbiased renderers where the biased version involves a more artistic workflow to produce visually similar renders compared to the physically correct way that unbiased systems work. 

Biased renderers involve a lot of heuristics, trying to find a mathematically simple way to create an image that is compelling without following complex physical laws of light. This makes them ideal for real-time applications like games. 

While unbiased renderers have evolved and improved a lot, and the quality they produce speaks for itself, there are drawbacks and it’s not just in terms of the image quality; e.g. problems in rendering double and above reflections, wrong shadows, etc. The process of setting up and preparing a scene for unbiased rendering is more involved and less intuitive because it isn’t how it works in the real world. 

Even physically correct unbiased renderers—please note that this description isn’t totally correct because there doesn’t exist such a thing as unbiased rendering in the purest meaning of the word—take shortcuts to speed up things. In contrast to biased renderers, they let creators build on the experience and knowledge they bring from the real world. For instance, photographers and directors will easily understand the settings of a camera and how it reacts because it’s just like their real-world camera. But that comes at the price of insanely high render times. That’s why physically correct rendering has been the realm of animation studios. 

How does ray tracing work?

Ray tracing, one of the unbiased techniques, tries to simulate how light behaves in the real world. It starts through your camera (the window you’re looking through) and shoots rays in all directions and traces where these rays bounce on and off, diffusing, refracting, reflecting, until it eventually reaches a source of light.

But now, Nvidia aims to change all of this with its new Turing architecture. In the Santa Clara-based company’s owned words, the new technology is “the greatest leap since the invention of the CUDA GPU in 2006.” The new RT cores (RT for ray tracing) will accelerate ray tracing to produce real-time renders while the in-card Tensor cores for AI inferencing will denoise the rendering images on the fly (That’s why we can’t call the system purely unbiased). 

Coupled with Microsoft’s DirectX Ray Tracing API, and partnerships with big names like Chaos Group (the creators of V-Ray), Epic Games (The creators of Unreal Engine and Fortnite),  Autodesk’s Arnold renderer, Redshift renderer, Otoy’s OctaneRender, and many more, the game-changing effects of a streamlined process from 3D content creation to a final product needs apprehension.

Increasing photo realism with DirectX ray tracing. Image credit: UL Benchmarks

A telling comparison with the evolution of programming languages

Back in the days of Commodore 64 and Amiga, the vast majority of games were written in Assembly, although compilers for high level programming languages like C were available for both systems. I don’t contest that those compilers weren’t nearly as optimized as recent ones, but the main barrier for adopting high-level languages was the scarcity of computing power and memory. In order to create decent games, developers needed to exploit every single CPU cycle and bit of memory. Failing to do so would clearly show itself in the results.

Among programming languages, Assembly is hardcore as it gets, both in the good way and bad. The barrier to entry for skilled Assembly programmers is high. It takes years, and some genius, to master the language. Compared to today’s standards, productivity ratio were subzero (I’m exaggerating a little bit to make my point), but just imagine to make a huge game like The Witcher 3 in Assembly. Good luck! And as if that wasn’t enough, every processor had its own set of CPU instructions, so you would have to target each processor individually. The list goes on. The only major benefit was speed. 

With Moore’s law and the increase of computer memory and power, the decrease in speed margin that high level languages created became negligible. More people were able to enter the industry, productivity ratios rose and a whole galaxy of prospects for creative work was made possible. Then came the managed languages like (Java and C#) lowering the barrier even more. The feedback loop of bigger revenue through a growing market of consumers and more innovation was created. 

Or take the early PC games written for DOS. Without an abstraction layer (programming languages are in a sense just abstraction layers to machine code, the higher the more abstract), developers had to write their games for every possible graphics card available to gamers. Announcements like “game blah is now available on card blah” were common back then (do I hear a sigh of nostalgia there? Well we’re getting old). Games needed to address different cards’ instruction sets. With the advent of DirectX APIs, card producers just had to write drivers for Microsoft’s rendering and graphics APIs, and game and software developers would call those APIs in their applications. 

Then came pre-made render engines like Epic’s Unreal or Unity adding another layer of abstraction to the whole. The produced software are slower and take up more memory but compared to the benefits and considering today’s hardware, it’s more than enough.

How real-time ray tracing will change the industry

There is a clear line of trend to be seen. Content creation is made easier every day and the burden is increasingly placed on the shoulders of better computers. 

Making real-time ray tracing possible for the masses may have similar consequences, especially when the right ecosystem is built around it. 

By moving much of the burden of creating realistic renders to the software and hardware layer, rather the artists themselves, render engines will be simplified from a creator/developer point of view. They only have to follow real-world physics laws and properties and let the engine do the rest. Overly complicated settings that help artists to optimize their scenes for better render times will gradually simplify as the cost to benefit ratio and speed up margins start to change in favor of automatic optimizations due to better hardware and software. Artists and developers don’t need to come up with different solutions for every effect they want to incorporate into their scenes (e.g. special shaders, different engines, complex rendering pipelines)—realistic renderers will take care of that. Gradually, different renderers will start to look and work increasingly similar since they follow the unbending laws of physics. This in turn will make it easier for studios to change their software packages when need be. 

The effect is a proliferation of realistic imagery, more creativity and an ensuing feedback loop that amplifies itself.

Nvidia has embedded its RTX technology with the Turing GPU into its Quadro high-end graphics cards aimed for CG professionals. Starting with an estimated street price of $2,300 for the lower-end Quadro RTX 5000 model with 16GB memory up to the Quadro RTX 8000 with 48GB memory costing $10,000. 

Let’s have a look at the specifications: 

GPU  Memory  Memory with NVLink  Ray Tracing  CUDA Cores  Tensor Cores 
Quadro RTX 8000  48GB  96GB  10 GigaRays/sec  4,608  576 
Quadro RTX 6000  24GB  48GB  10 GigaRays/sec  4,608  576 
Quadro RTX 5000  16GB  32GB  6 GigaRays/sec  3,072  384 

Nvidia’s RTX technology is an easy choice for CG studios

While these cards aren’t an option for gamers, they easily fit in CG studios’ budgets and improve their workflow and return on investment (ROI). Currently, artists have to render low fidelity images of their work when creating high quality 3D scenes and then send them to render farms and wait minutes or even hours to check the end result to continue tweaking. The workflow is cumbersome at best. Instant feedback with production quality is a much-appreciated feature. In addition, since many of these studios already use unbiased renderers for their offline renders, they don’t need to change a lot in terms of workflow. And economically, their investment will pay off due to optimized hardware that uses less electricity for the same results.

In a few days, Nvidia will present its new line of gaming graphics cards in a special event in Cologne, Germany, right before Gamescom 2018. Rumors are that GeForce RTX are up for the taking, don’t cost a fortune, and aren’t actually that much less impressive than their sister Quadros.

It may take more time for Nvidia’s RTX technology to enter gaming

As for game studios, it’s another matter altogether. Game studios currently have totally different workflows for their real-time renderings in comparison to CG studios. They primarily rely on the artistic methods of the biased tenet, so the integration of ray-tracing would require a complete overhaul of their pipeline and workflow. In addition, their success heavily depends on graphics card adoption since they need to reach as wide an audience as possible. Since the RTX technology is the biggest leap for Nvidia technology since 2006, content created for previous technology wouldn’t make sense for RTX and vice versa, creating a dilemma. Gamers won’t purchase an expensive card unless there is enough quality content for it. Developers won’t make the expensive content unless there is a great enough market.

But further rumors suggest that Nvidia aims to change the game by offering an extreme increase in price to performance ratio. By keeping prices at the GeForce GTX levels and increasing performance above what the Titan T had under the hood, gamers and developer studios may be more than inclined to make the necessary investment.

Meanwhile, Adshir, an Israeli startup claims to have enabled real time ray tracing on mobile devices. 

So, Ready Player One, it may just take a few more years. 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.