[FONT=Arial Black]Ultimate Guide to Global Illumination
Note: this thread is here to overview all realtime GI solutions that are currently accessible to everyone. Lightmass will not be discussed in depth, and, as of this writing, enlighten will also not be talked about, because it isn’t freely available, though it may be referenced. Same goes for SVOGI; it may be referenced because we still have footage of it, but it has been cancelled, and will not be discussed.
Since the announcement of UE4, many were excited to see the power of a fully realtime lighting engine. Unfortunately, the existing tech that was to be used didn’t scale properly and was deemed unusable in realistic gaming scenarios, causing the engine to go back to it’s powerful, though static system, known as lightmass. Lightmass does what It’s meant to do very well, but it isn’t a perfect solution. It’s poor for massive worlds, slows development time greatly, and is a general pain for those who are new to lightmapping especially. However, there are a few Realtime GI solutions that are currently available for UE4 users to use. This thread focuses on these solutions, documents what we know about them, and is meant for us to discuss Realtime GI as a whole instead of just discussing one solution out of context from others. I’ve taken to testing all of these solutions a solid amount, and would like to share what I, and several other community members, have found. I have also created remakes of the ArchVis demo from Epic showcasing each one visually. For reference, here is the scene in realtime with no GI and one directional light. (All of the scenes only use one directional light except DFGI, which I will discuss later. Also note that static lighting is completely disabled.)
No Global Illumination
There’s not much to say about this. It’s simply what direct light looks like in engine. Nothing special about it.
Light Propagation Volumes
Light propagation volumes is the first GI solution available for UE subscribers to use. It’s quick and dirty, but all the same it works. It was added into the engine for reasons involving Fable Legends, and then was heavily polished by Lionhead for their game. The version of LPV’s we have is essentially version 0.1. It’s unfinished, slow compared to other LPV solutions, and it can be difficult to set up. LPV’s have been used in games before with much success, most notably in Cryengine, and are a novel way of attacking GI. However, even a polished LPV system, such as Crytek’s, is notorious for suffering from light leaking, low accuracy, and an inability to scale well. They only support GI from a single directional light, one bounce of lighting, and in some cases allow for emission from materials and area lights. It is unknown if progress will continue on LPV’s in UE4, but most people are doubtful of this happening. Epic is already working on another solution, which has shown far better results.
Distance Field GI
DFGI is Epic’s new solution to solve GI. It piggybacks off of Distance Field Ambient Occlusion and requires a skylight to work (which is why the back of the room is lit), and for the most part has very good results. In the image above there is noticeable graininess where light is being bounced, but that is being polished, and only happens in interiors currently. Also note that this screenshot was taken using a post-effect version of DFGI that can be found in version 4.7.x of the engine with the command “r.DistanceFieldGI 1” if you have distance fields enabled. This version is already less-than accurate to how DFGI performs. In the 4.7.x version, it supports emissive materials, point lights, spotlights, and directional lights. In 4.8, it is actually 2 GI systems, Heightfield GI, which is used for terrain, and Surfel GI, which is what is currently implemented. Future versions of DFGI plan to have better interior results, multiple bounces of light, and 4x better performance than what it currently has. DFGI is slower than LPVs, and is considered a “high end” feature, but isn’t nearly as resource intensive as SVOGI or Nvidia’s new solution, VXGI.
I’ve seen a lot of negative comments about Nvidia Gameworks, so to keep everyone from inferring random **** about this I’m going to start with the cons and go straight for the facts. First off VXGI shaders currently take about 5 minutes each to compile. So for every material you see in that room, add 5, and that’s how long it took me to set it up. It is most certainly resource intensive, but is still usable in an actual game. It only works on windows due to a DX11 dependency. It’s also still in beta 0.9, and suffers some crashes. But beyond that, it’s a fantastic CARD AGNOSTIC system that runs on ANY DX11/12 CARD. Unlike the previous 2 examples, it also has full specular tracing, allowing for incredible glossy reflections. It can even be used purely to generate ambient occlusion, which produces significantly better results than either HBAO+ or SSAO, and the AO is even plausible for use on PS4 and Xbox One. If you havent used it yet, it’s worth a shot.
You can find more information here: https://forums.unrealengine.com/showthread.php?53735-NVIDIA-GameWorks-Integration
Checkout the Github page here:https://github.com/NvPhysX/UnrealEngine (note you must be signed into Github to view the page or else you will get a 404 error)
Approximate Hybrid Ratracing (AHR)
This one deserves special attention. It was developed entirely by community member RyanTorant, and supports Diffuse Tracing, Specular Tracing, and Ambient Occlusion. It’s surprisingly fast, excels at tracing reflections, and is altogether a promising solution. As for upcoming features, point light support will be added, and RyanTorant’s recent posts indicate that he may be getting close to multiple bounces, and could possibly be the first one to have a multi-bounce solution.
Checkout his forum thread here: https://forums.unrealengine.com/showthread.php?44278-Realtime-Dynamic-GI-Reflections-AO-Emissive-plugin-AHR
Have any comments or questions? Please feel free to post them! I would like to know what people think about these compared to each other, which is something that isn’t found on each solution’s respective thread.