Language:
Page Info
Skill Level:
Engine Version:

2. Atmospheric and Directional Lighting

With our basic apartment setup created in the previous step, we will now add the overall level lighting.

  1. First (if you've enabled it), let's disable Wireframe mode and return to Lit mode (press Alt+4).

    step2_1.png

  2. Inside the Modes menu under Visual Effects, drag an Atmospheric Fog into the level viewport.

    step2_2.png

    After doing so, your level should have a simple skybox and sunset lighting.

  3. Inside the Modes menu under Lights, drag a Directional Light into the level viewport.

    step2_3.png

    After adding the light, you will notice that the text Preview appears inside our room.

    step2_4.png

    This indicates that you are seeing a preview of the actual lighting that will appear in-game once we Build and run the game.

  4. In the Details panel for the Directional Light, set its Transform as shown below and check the Atmosphere Sun Light checkbox.

    newDirectionalLight.png

    With Atmosphere Sun Light checked, we can control the location of the sun using Rotation mode (E) and rotating our light.

    The lighting in our level changes based on the location of the sun allowing us to easily switch between various times of day.

Currently our default lighting looks like this:

step2_9.png

Let's change some settings on our Directional Light to create a warmer sunset feel.

  1. In the Details panel for the Directional Light, click the Light Color bar and a Color Picker will appear.

    LightingColorPicker.png

    You can also instead, manually enter RGB values by clicking the expand icon.

    step2_11.png

    Set the RGB as shown above.

Let's Build the game so that we get a better representation of what our light will look like in the game.

  1. From the Main Toolbar, click the Build icon.

    step2_12.png

    In the bottom-right corner of the Editor, you will see that the Build process has begun.

    step2_13.png

    Wait until it says that it has completed.

    step2_14.png

    Our lighting has been built and the preview text disappears.

    BuiltLighting.png

    Anytime you add/move your lights or geometry in the level you will need to rebuild the lighting to get an accurate representation.

See Directional Lights for more information on the various Directional Light settings.

With our atmospheric lighting set up, in the Next Step we'll add some lights inside our apartment to light up the dark areas.