Fortnite Battle Royale has many game events that require dynamic lighting—the time of day will change, players can build and destroy structures, open doors, and so on. Lumen is fully dynamic and reacts to these changes in real time. Lumen does amortize its calculations across multiple frames to reduce cost, but with the high frame rate that Fortnite targets, temporal accumulation artifacts are minimized.
Journey to Chapter 4
As we wrapped up work on the Unreal Engine 5.0 release, our focus turned to Fortnite Battle Royale Chapter 4 and its challenges. Fortnite targets a minimum of 60 fps on consoles, which is only 16.67 milliseconds per frame, or even less with headroom for dynamic resolution and gameplay costs during heavy combat. Considering all of the rendering features that we wanted, we were only going to have four milliseconds for dynamic global illumination and reflections combined. This is an extremely small budget as—it’s common for triple-A games to spend four milliseconds on ray-traced reflections alone. We were going to have to make every optimization possible while not compromising on next-generation lighting quality.The first thing we had to decide was which ray tracing method to use for Fortnite Battle Royale Chapter 4. We had already shipped The Matrix Awakens: an Unreal Engine 5 Experience with Lumen using hardware ray tracing on consoles, having made significant optimizations, but that tech demo had a 30 fps budget. After some early tests, we determined that Lumen’s software ray tracing was required to hit the 60 fps budget due to its lower tracing costs. But the approximate nature of software ray tracing introduced several challenges—particularly around foliage quality and water reflections.
Fortnite Battle Royale Chapter 4 has forests and rolling hills covered by grass. None of the previous projects that we shipped Lumen in had significant foliage, so we hadn’t had a chance to work on it yet. One of the big problems was over-occlusion on foliage.
Lumen’s software ray tracing uses a Global Signed Distance Field to represent the scene’s surfaces. Signed Distance Fields can only represent an opaque surface, and ray marching them gives a binary result: hit or miss. This causes severe over-occlusion on foliage meshes, which are modeled as aggregates. We developed a new way to intersect Signed Distance Fields—a choice is made at each step of the ray marching whether to intersect. This made it a stochastic technique, and allowed us to more accurately model the aggregate geometry while keeping the Signed Distance Field representation that works well for the rest of the scene.
Source: Unreal Engine Blog