Unreal Engine, Very Real Renders: Ray Tracing for Engineers
Michael Alba posted on November 15, 2019 |
Examples of the photorealism achievable with ray tracing in Unreal Engine. (Image courtesy of Epic Games.)
Examples of the photorealism achievable with ray tracing in Unreal Engine. (Image courtesy of Epic Games.)

You’re reading these words thanks to the rays of light linking your eyes and your screen. Anything you see—your car, your dog, your own face in the mirror—is the result of ping-ponging light rays, a three-dimensional game of billiards where your eyes are the pockets.

What nature can do instantaneously, computers can only replicate through intensive effort. While it’s entirely possible to simulate hundreds of thousands of light rays to render an image of a car, a dog or a mirror, it’s not easy. This is a technique called ray tracing, and it can produce incredibly photorealistic graphics—but slowly. For a long time, ray tracing was far too processor-intensive to use for most graphical applications.

Last year, graphics company NVIDIA upended this limitation with the release of its latest RTX graphics cards. In what NVIDIA CEO Jensen Huang referred to as the holy grail of the computer graphics industry, RTX graphics cards promised that ray tracing algorithms could now be completed in real-time—even for games running at 60fps.

While NVIDIA had put the hardware in place for real-time ray tracing, software developers needed to catch up to make it available to their users. Epic Games, for instance, put real-time ray tracing into beta in Unreal Engine 4 earlier this year. Unreal Engine is a game engine that’s seeing increasing use as a platform for engineers, architects and designers. With the power of ray tracing behind them, these professionals can create true-to-life 3D experiences.

Ray Tracing Versus Rasterization

Illustration of ray tracing. (Image courtesy of Wikipedia user Henrik.)

Illustration of ray tracing. (Image courtesy of Wikipedia user Henrik.)

It’s hard to appreciate the true value of ray tracing without a comparison to rasterization, a commonly used rendering technique that was previously the only way to obtain real-time results. Rasterization involves a series of calculations that provide a good approximation of physical reality, but falters in cases of shadows, reflections and other complicated visual effects. Rasterization doesn’t need to be thrown out the window, however. Unreal Engine, for example, takes a hybrid approach to rendering that uses both ray tracing and existing raster effects.

This hybrid approach to real-time ray tracing is encapsulated in what Unreal Engine calls the Ray Tracer. It uses a low number of samples per pixel in combination with a quick denoising algorithm to approximate a true ray-traced render in real-time. Here’s a comparison of the difference in a shadow with and without denoising:

(Image courtesy of Epic Games.)

Take a look at the below examples of how ray tracing improves shadows, reflections, translucency and other complex lighting effects compared to traditional rasterization.

Shadows

(Image courtesy of Epic Games.)

Reflections

(Image courtesy of Epic Games.)

Translucency

(Image courtesy of Epic Games.)

Ambient Occlusion

(Image courtesy of Epic Games.)

Global Illumination

(Image courtesy of Epic Games.)

How Engineers and Architects Can Benefit from Ray Tracing

The common theme in all the images above is the primary benefit of ray tracing: more realistic renders. For engineers building digital mock-ups and architects giving virtual tours of buildings, real-time ray tracing is a competitive advantage and a valuable tool in understanding how a design will look in the real world.

Take HKS, an international architectural design firm. HKS is currently designing a new baseball stadium in Arlington, Texas, and uses Unreal Engine to create 3D walkthroughs of the project. With room for 40,000 fans, not to mention a hotel, convention center and more, the stadium is no small undertaking. The company needs to be able to create renders efficiently.

HKS has begun using real-time ray tracing in their renders of the stadium, and has praised its ability to improve the realism of the company’s models.

“We've been waiting for ray tracing for years and years and years now, just so that we get the accuracy in the glass, the reflections,” said HKS’s Chris Roberts. “The ray-traced shadows are just looking incredible right now.”

Ray-traced rendering of HKS’s baseball stadium showcasing realistic glass reflections. (Image courtesy of Epic Games/HKS.)
Ray-traced rendering of HKS’s baseball stadium showcasing realistic glass reflections. (Image courtesy of Epic Games/HKS.)

Another engineering company taking advantage of real-time ray tracing is automaker Porsche. At SIGGRAPH 2018, in collaboration with NVIDIA and Epic Games, Porsche debuted a cinematic of the Porsche 911 Speedster Concept car rendered in real-time. It was entirely ray traced.

“When you see the quality of the cinematic, it’s remarkable to note that no baking or lightmaps were required. There is no precomputed lighting—it’s all fully dynamic for both objects and light,” said Epic Games’ Francois Antoine, the VFX supervisor on the project. “When we’re designing cars, we have to explore every option from every angle, and having the ability to review fully visualized renders in real time has completely transformed the way we ideate.”

The Porsche 911 Speedster Concept rendered with real-time ray tracing. (Image courtesy of Epic Games/Porsche.)
The Porsche 911 Speedster Concept rendered with real-time ray tracing. (Image courtesy of Epic Games/Porsche.)

Ray tracing can be even more impactful when used in conjunction with virtual reality (VR). Groupe Legendre is a construction firm that makes extensive use of VR to showcase early design concepts to their clients. VR is inarguably the best way to experience an architectural design, literally adding another dimension to the concept drawings of the past.

With the ability to ray trace in real time, Groupe Legendre and other AEC firms can obtain the highest possible fidelity for their VR walkthroughs. Windows look like real windows, shadows look like real shadows, and clients can feel as if they’re really walking through a building that has yet to be built.

“We tested some of the new ray tracing features [in Unreal Engine], and it’s pretty exciting,” said Groupe Legendre’s Antoine Guillo. “We’ll save time by not having to bake lightmaps, and we’ll be able to upgrade the fidelity of our renders through realistic material reflections and global illumination.”

Ray Tracing in Unreal Engine

If you’re a current user of Unreal Engine, it’s easy to enable ray tracing in your projects. Open the Unreal Editor and navigate to Edit->Project Settings. Under the Engine heading, click on Rendering and scroll down all the way to the bottom, where you’ll find a setting for Ray Tracing. It’s a simple check box. Click it and you’re off to the rayces.

(Image courtesy of Epic Games.)
(Image courtesy of Epic Games.)

If you’re not a user of Unreal Engine, and you’re interested in exploring what real-time ray tracing can do for your organization, you can download the software for free from Epic Games.


Epic Games has sponsored this post.  All opinions are mine.  --Michael Alba

Recommended For You