杏吧原创

Stunningly realistic video game visuals made by simulating light rays

Real-time ray tracing is creating impressively realistic video game graphics. It uses powerful chips to calculate how millions of light rays reflect in a scene
Visuals from Metro Exodus
A single frame requires calculations for up to 83 million interactions between light and visual elements
NVIDIA

鈥淥h, that looks gorgeous,鈥 drawls an onlooker in a Texas accent, as I guide my fighter through a gloomy, broken-down shack in a video game called Metro Exodus. I鈥檓 struggling in hand-to-hand combat with a zombie, so Dmitry Zhdan, who worked on the game, grabs the controls and beats my foe to death with a rifle butt.

Zhdan is keen for me to stay alive in this ramshackle structure, as the bright desert sunlight splintering through the occasional window shows off the game鈥檚 impressively realistic graphics, made possible by a technique called real-time ray tracing.

Metro Exodus started offering the feature last month. It makes use of a new generation of chips that can perform the massive calculations required for real-time ray tracing.

Ray tracing simulates how individual rays of light enter a scene and reflect off objects. The technique results in incredibly life-like visuals, but up until now was reserved for films with massive budgets and even bigger computers.

[video_player id=鈥漈tUeWDbp鈥 access_level=鈥漞veryone鈥漖

A 1000-frame section of of post-apocalyptic Las Vegas in Blade Runner 2049, for example, took 13 hours of processing on a powerful server farm. The cost of ray tracing in films is around $1 million per produced minute, says Kim Libreri, who used the technique when working on the visuals of all three Matrix films.

For video games, ray tracing simply wasn鈥檛 plausible because home computers weren鈥檛 powerful enough to create the high-quality visuals in real time as the player moves around and interacts with the world.

What has changed is聽that Nvidia, a US chip manufacturer, now makes chips that specialise in聽ray tracing and game developers have created tricks to save processing power, such as rendering scenes with a hybrid of ray tracing and older but faster techniques.

Nvidia鈥檚 specialist chips can produce of ray-traced Metro Exodus scenes every second, responding to player decisions and shifts in point of view. When rendering a scene in 4K on the highest 鈥渦ltra鈥 setting, Metro Exodus casts one ray for each of the roughly 8.3 million pixels on the screen. Zhdan estimates that the chips are required to compute up to 83 million interactions between light and visual elements in a single frame.

Ray tracing on and off
Ray tracing on and off for a scene in Metro Exodus
NVIDIA

Other video games such as Battlefield V and Shadow of the Tomb Raider have also explored real-time ray tracing.聽And recently the was made far more realistic using a similar technique.

鈥淥nce you get to a situation where lighting looks like the real world, your brain starts to understand things better than in the traditional world of real-time rendering,鈥 says Libreri. The result is that the scene has a larger emotional impact, he says.

However, even though the cost has come down, many people will be unwilling to pay the $400 to $1500 needed for a ray-tracing chip.

Additionally, even with souped-up processors, Zhdan estimates that ray tracing can impose a performance penalty, meaning fewer frames are rendered per second.

鈥淚t鈥檚 still early days,鈥 says Libreri. Ray tracing will be best suited for more story-oriented games or action titles where the interplay of light and shadow are particularly important. But he thinks the technique will eventually become the norm.

Topics: Video games