CD Projekt RED: Adding Ray Tracing to Cyberpunk 2077 Proved Quite Challenging; Game Will Run on DirectX 12 Only
CD Projekt RED Lighting & FX Art Director Jakub Knapik and Lead Graphics Programmer Marcin Gollent were recently interviewed by German website PC Games Hardware to discuss some technical aspects of Cyberpunk 2077.
As expected, the centerpiece of the conversation was ray tracing, with Knapik explaining the game's usage while adding that the implementation proved to be quite a challenge in the context of a massive open world game like that featured in Cyberpunk 2077.
In its native mode, so with DXR features disabled, our engine is equipped with global illumination, hence it supports bounced lighting in a platform-agnostic way. Our goal was to create a rendering platform that would use PBR (physically-based rendering) rules and a realistic approach to lighting on all platforms. That paradigm made ray tracing a natural extension of the idea, the next step in its evolution. We worked on a hybrid solution that is added on top of our already existing setup, replacing some of our lighting subsystems with ray-traced equivalents. That gave us basic parity, meaning we don't have to make a separate lighting variant, and at the same time — a huge quality boost in some areas we found the most useful for Cyberpunk 2077, ones we can further tweak to our needs.
Currently, we use sun soft shadows, a solution that gives us incredibly detailed results, capable of picking up any objects visible to the eye and simulating the natural phenomenon of softening shadows based on distance. We use a ray-traced skylight that works with our proprietary global illumination system, producing a super realistic ambiance coming from the sky and clouds. We also use emissive surfaces like screens, neons to emit realistic soft lighting with perfect shadows during the night. Additionally, and also quite obviously, we take advantage of all the benefits of ray-traced ambient occlusion and we are currently working on ray-traced reflections. As for the biggest benefits, I think they chiefly come from the precision of 3D space ray tracing versus more traditional screen space solutions.
Overall, the implementation of ray tracing into the game engine on a practical level, with all the needed parity and care for our in-engine systems, proved to be quite a challenge. That said, I think the difficulty is something that's very case-dependent. Every engine is molded to serve specific needs. Our own was set up to enable us to depict the incredible complexity of Night City, with its vast verticality and enormous amounts of assets across the city. All that with dynamic global illumination working in real-time with all local lights, a dynamic day and night cycle, as well as changing weather states.
The Cyberpunk 2077 preview build reportedly had to stick to 1080p resolution with NVIDIA's DLSS 2.0 enabled on a PC equipped with the RTX 2080Ti graphics card with three ray tracing effects enabled. We're definitely hoping to see a much more optimized game when it's released in about four months and a half from now.
Later in the interview, Marcin Gollent stated that Cyberpunk 2077 will run on DirectX 12 only. This basically means it won't support Windows 8, leaving Windows 7 and Windows 10 as the only options for those looking to play the game.
Thanks to the introduction of DX12 support for Windows 7 SP1 that Microsoft introduced last year, the game will run on this system. We do and will continue to test Cyberpunk 2077 on Windows 7 in an attempt to iron out any edge-cases that might arise. Unfortunately, Windows 8 didn't receive its variant of DX12 libraries.
Regarding DX12 Ultimate, Cyberpunk 2077 will work absolutely fine with all DX12-compatible GPUs. What the "Ultimate" feature set does is it allows us to do more if the hardware allows for it. We opted to go with DX12 for two main reasons. Firstly, it is the standard API for the Xbox platforms, and with the game also coming to Xbox One, we naturally wanted to have it implemented as soon as possible. Secondly, it is the birthplace of DXR and given we had plans to invest in DXR very early on, that made the choice to go with DX12 a pretty straightforward one.
Cyberpunk 2077 is now scheduled to launch on PC, PlayStation 4 and Xbox One on November 19th after the most recent delay.
Products mentioned in this post
The links above are affiliate links. As an Amazon Associate, Wccftech.com may earn from qualifying purchases.