So I already shared a bit about my reflection experiments in the general Lumen thread, but I didn’t want to keep cluttering it. Thanks to some community suggestions I wanted to post some improvements.
Original Comment:
Thanks to this thread I was able to get Lumen representations in Scene Captures. This addresses one of my main quality concerns. Hopefully we see this in an official update in the future.
A Without Lumen Enabled in capture:
B With Lumen Enabled in capture:
C Pathtracer:
My notes:
As in my last post, the RT feature switch in the shader is enabling falling back to a cubemap for missed screen traces. This allows for convincing metallic objects - even mirror objects - to appear in reflections instead of the matte surface cache or black hit lighting result.
Enabling Lumen for captures further enhances the result in several ways. First, we can observe GI in the fake second bounce. Look closely at the reflection of the sphere within the cube and you’ll see that in Image A the roof overhang is too heavily shadowed. This is easily observed by comparing it to the real-time reflection in the sphere itself right next to it. In Image B, the GI in the capture allows the lighting to match the real-time reflection much better, making the reflected object appear much more integrated into the scene.
You will also see that there is even a fake 3rd bounce, but only for objects that are included in the reflection capture. In this example, the ‘Unreal Material Sphere’ is included and appears to have a 3rd fake bounce. The standard sphere and cube are excluded from the cubemap to represent dynamic objects, so we cannot observe a 3rd+ bounce as we would in the path tracer.
The inclusion of Lumen in the cubemap has allowed the ‘Unreal Material Sphere’ to retain its metallic look even in the fake 3rd bounce, whereas metallic objects in the standard capture appear to only reflect the skybox.
Since it relies partially on cube mapping, of course the result will depend upon the quality and accuracy of the cubemap. This is seen in the slightly mispositioned 3rd bounce due to differences between the capture position and object.
Perhaps the most noticeably absent element to my eye is the reflection of the shadow. Since the shadow is absent in the cubemap, it is absent on the sphere using it as a fallback. A fake shadow could be composited into the cubemap trivially, and in fact I already do apply some subtle masking towards the bottom to fake ambient occlusion.
There are a few other drawbacks of the technique. Obviously it requires authoring cubemaps, but mostly only for areas with high concentrations of metallic objects. Generic cubemaps will probably be good enough for the vast majority of real-time scenes. Cubemap resolution can be shockingly low in most cases. This scene was captured using 128x width.
Because the technique once again relies on emissive, the strength of the effect needs to be tuned for lighting conditions to prevent the metal from appearing to glow in reflections. If lighting conditions can change for a given scene, you may need multiple cubemaps, or at the very least reducing the emissive level to match ambient levels.
Rough metallic objects need more effort to achieve a convincing result, but perhaps a naïve approach would be to simply force lower quality mips to make the reflection appear blurrier. Cubemaps also seem to really struggle with volumetric clouds, but it looks passable enough.
Added shader complexity is quite low, but we do have to include an extra texture sample for the cubemap.
There is still room for improvement, but I hope this helps anyone struggling with metallic objects and encourages Epic to optionally enable Lumen for all captures in a future release.