Course contentsShow
← Unreal Engine Game Development
Lesson 501 of 8807. Visual Fidelity and RenderingFree lesson

Implementing Sky Light for Ambient Occlusion

Integrate a Sky Light to provide foundational ambient illumination and soft shadows that interact dynamically with Lumen's indirect lighting.

In this lesson, you will learn how to configure the Sky Light to serve as the foundational ambient light source that drives soft, contact-shadowing Ambient Occlusion within a Lumen-powered scene.

The Role of Sky Light in Ambient Occlusion

While Lumen provides high-quality Global Illumination by bouncing light off surfaces, it requires a base "ambient" term to fill in the dark crevices where light cannot easily reach. The Sky Light actor acts as this bridge. By capturing the scene’s environment (via a Sky Atmosphere or HDRI), it provides a baseline level of illumination that affects every pixel in your scene.

When you enable "Lower Hemisphere is Solid Color" or use a cubemap, the Sky Light contributes to the ambient light, but it also triggers Distance Field Ambient Occlusion (DFAO) and works in tandem with Lumen’s screen-space probes to darken recessed areas.

Implementation Best Practices

To ensure your Sky Light provides accurate Ambient Occlusion, follow these steps:

  1. Capture Settings: Set your Sky Light to Source Type: SLS Captured Scene. This ensures the ambient light color matches your sky, preventing "flat" lighting.
  2. Affecting Occlusion: Ensure Cast Raytraced Shadows is enabled if you are using Hardware Ray Tracing, or rely on Distance Field Ambient Occlusion within the Sky Light properties to generate soft shadows in areas where geometry is close together.
  3. Lumen Integration: Lumen treats the Sky Light as an infinite source of distant radiance. Because Lumen uses the Surface Cache, it samples the sky light’s contribution to light the interior of your meshes, effectively "plugging the holes" in your indirect lighting.

To see the impact of your settings, use the console command r.Lumen.Visualize.SceneData or navigate to View Mode > Lumen > Scene. Look for the "Darkness" in corners; if it looks too bright, increase the Occlusion Contrast or decrease Occlusion Exponent in the Sky Light component details to sharpen the contact shadows.

Key Takeaway: The Sky Light serves as the foundational ambient fill that allows Lumen to calculate high-fidelity contact shadows and prevent "floating" geometry by grounding objects in a physically plausible, occluded light environment.