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

Configuring Global Sky Atmosphere Components

Learn to set up the physical atmosphere model to define realistic sky color, sun position, and planetary curvature for your scene.

In this lesson, you will learn how to leverage the Sky Atmosphere component to establish a physically accurate simulation of light scattering, planetary curvature, and sun positioning for your game world.

Understanding the Physical Atmosphere Model

Unlike older, static "skybox" textures, the Sky Atmosphere component uses a mathematical model based on Rayleigh and Mie scattering. This simulates how sunlight interacts with the particles in your atmosphere, effectively creating the blue hues of day and the deep oranges of sunset based on the sun's actual angle relative to your world origin.

Setting Up the Environment

To begin, add a Sky Atmosphere actor to your scene. You will notice that it immediately interacts with your Directional Light. For the lighting to calculate correctly, ensure your Directional Light has the Atmosphere/Fog Sun Light checkbox enabled.

The core of the simulation is controlled via the Planet settings in the component:

  • Bottom Radius: Defines the curvature of your world.
  • Atmosphere Height: Determines the altitude at which the atmosphere fades to black.

The scattering properties are controlled in the Planet Atmosphere section. You can manipulate the Rayleigh Scattering and Mie Scattering coefficients to adjust the density of air molecules and aerosols, respectively. If you want to change the color of the sky at different times, you modify these coefficients:

// Conceptually, you are adjusting the scattering scale 
// to influence the light spectrum transmission:
RayleighScatteringScale = 0.035; 
MieScatteringScale = 0.005;

Linking Lighting to Geometry

The Sky Atmosphere works in tandem with Volumetric Fog. When you enable Volumetric Fog in your Exponential Height Fog component, the atmosphere’s scattering data is automatically injected into the fog, allowing light shafts to correctly take on the color of your sky model. As you rotate your Directional Light toward the horizon, you will see the light scattering transition from bright white to the deep reds and purples defined by your scattering coefficients, providing a dynamic, physically consistent horizon.

Key Takeaway: By using the Sky Atmosphere component, you move beyond static backgrounds to a dynamic, light-reactive environment that automatically calculates the correct spectral scattering based on your sun’s position and planetary scale.