Page 1 of 1

Dynamic Global Illumination in Fable Legends

Posted: Thu Apr 17, 2014 10:20 am
by Lionhead Studios
Dynamic Global Illumination in Fable Legends

(Click to enlarge) Since Epic released the full Unreal Engine 4 source to subscribers, we've had a number of questions about our dynamic global illumination tech, which Epic recently integrated into UE4. We wanted to take the opportunity to talk about why we developed this technology and how we're using it to make Fable Legends look amazing. We made a decision early on to have fully dynamic lighting in our game. We think this is important for a number of reasons: It allows dynamic time of day, which adds variation to our world; it massively improves iteration times for artists; and it supports dynamic objects both reflecting and receiving light. Dynamic GI can also give higher quality results than baked lighting in some cases, for example, reflections, where lighting needs to take into account the view position.  Dynamic direct lighting has been around in games for a number of years, but dynamic indirect lighting (i.e bounce lighting or global illumination) – i.e. light bouncing off objects in the scene onto other objects - is a much harder problem to solve, so generally it either isn't computed dynamically, or a very simple representation is used (e.g. a single hemispherical light for the sky). Unreal Engine 4 has an excellent deferred renderer, which supports physically-based materials and can support large numbers of lights efficiently. We did some work optimising UE4’s cascaded shadow maps (which Epic also integrated into Unreal), but the missing piece of the puzzle for us was dynamic indirect lighting. Epic has previously researched a real-time GI method called SVOGI with promising results, but it was never quite fast enough. Of all the papers on the subject, Crytek's Light Propagation Volumes seemed like the best solution for our game. It was fast, scalable and could also support reflections and secondary occlusion. However, this method was a DirectX 9 implementation, and we felt we could do even better with modern DirectX 11-class hardware and the power of compute shaders. We developed an implementation of Light Propagation Volumes, specifically targeted at modern GPUs (such as the one in Xbox One). Our method supports 2nd-Order Spherical Harmonics, which gives better directionality than the original method. We use compute shaders to generate a high quality voxel representation of the scene's geometry, which we use to provide secondary occlusion and multiple light bounces. The comparison below shows the difference dynamic GI makes in our game. Fable Legends Scene with: No GI (Top), Our dynamic GI (Bottom) Note: we used an ambient cubemap to approximate sky lighting in the top image – without that, the shadows would be completely black.  Let’s break down how the lighting in the final image is composed: We start with direct lighting only (note the black shadows) Add indirect lighting from the sky (injected into the LPV with directional occlusion – occluded areas are darker) Add indirect lighting from lights to get the final image. (Note the indirect specular on the leaves) Our GI solution isn't just for diffuse lighting. We also use the LPV for indirect specular (reflections), hooking into the material’s roughness parameter to determine the sharpness. We combine that with Epic's Screen-space Reflections, to provide even better results than with LPV alone.  Warning: programmer art follows! LPV Reflections on Metallic Spheres, Roughness from 0 to 1 (left to right)     Metallic and non-metallic reflections, with Roughness 0.3 and 0.5 respectively We also support injecting emissive materials directly into the indirect lighting, which works well for area light sources and effects. Since the lighting is dynamic, even animated materials are supported.    Emissive material light injection (no light required!). Note: Epic’s SSR is also enabled In the latest incarnation (not yet released), we support injecting light directly from the sky into the light volume with directional occlusion, which gives great results in shadowed areas and even for overcast scenes.  Sky Light Injection with Directional Occlusion Hopefully we’ll be able to share some details of other work we’ve done in the coming months. Big thanks to our amazing artists for making Legends look beautiful and for helping to drive this tech forwards. A word of thanks also to Epic for their work integrating this into UE4. One of the great things about Unreal is its flexibility. With full source code access, it’s been possible to really tailor the engine to our game’s requirements. One final note: We’re currently looking to hire a senior graphics programmer. If you think you have what it takes, please send us your CV.  Ben Woodhouse Lead Graphics Programmer   Discuss this blog on our forums!

[sfnc_item_comments]
http://www.lionhead.com/blog/rss/blog/2 ... e-legends/