logo80lv
Articlesclick_arrow
Research
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_loginLogIn

How To Set Up Lighting for Games in Unreal Engine: Part 1

Senior Lighting Artist Yuri Vorobiev shared an enormous 2-part breakdown on setting up appealing lighting for games in Unreal Engine.

Introduction

Hi, my name is Yuri Vorobiev and I work for Sperasoft, a Keywords Studio as a Senior Lighting Artist. During my time in Sperasoft, I got to contribute to several name brand projects, like Overkill's The Walking Dead, Saint's Row The Third Remastered, and "Halo Infinite. I also have a background in lighting for cinematic, multiplayer, and single-player maps.

In this article, I would like to showcase my approach to lighting game levels and go through the most common lighting mistakes. Beware, this is a one-man opinion and you need to consider if it complies with your project’s art direction, technical limitations, etc.

First Steps

For this relight case study I chose Underground Facility by Volodymyr Stepaniuk. First of all, you need to pick references, make a mood board, and decide on your lighting conditions. I wanted to make lighting with a turquoise color, so I chose a few palettes which suit my idea best.

Also, I chose several concepts for caves, tunnels, and laboratory rooms.

I always try to pick concepts with "interesting" lighting rather than flat, dark, and boring light.

At this stage, it is also important to take into consideration the lighting conditions. Whether it will be multiplayer (MP) or single-player (SP) level. You can't afford to be too dramatic in an MP map. Everything must be visible and readable. Tech limitations of MP must be taken into consideration from the beginning. SP maps are less demanding, so you can consider a moodier and darker feel as it has more lighting performance compared to MP. Define what type of lighting shall be used: Movable, Static, or Stationary. You can find more information about lighting types in paragraph 3. The scene I chose is an SP with Stationary lighting.

Technical Setup

I usually begin with the creation of a separate level just for lighting. This way I won't accidentally break or move any environmental elements.

Then I place default Directional Light (if needed), Skylight, ExponentialHeightFog, Post Process Volume (with Infinite Extend enabled), and Lightmass Importance Volume (if I'm planning to bake anything).

Draft reflections setup

The next step is a draft setup of local reflections(cubemaps) I recommend disabling SSR in Post Process Volume because it’s more difficult to see cubemap reflections when Screen Space Reflections are enabled.

For easy adjustments, I usually put some bright default cubemap in the SkyLight cubemap slot and set its intensity to around 20.

In this case, you can see the local cubemap clearly (in "Reflection view") when you place them on a level.

For manmade structures, like corridors and rooms, I prefer to use box reflections. Since they are more controllable than sphere reflections – they can prevent bleeding into other rooms, and throw walls. It is enough to place 1-2 cubemaps in each space for a draft setup.

"Box Transition Distance"(or Influence radius for Sphere Reflections) and "Capture Offset" are the only local reflection settings that I touch at this stage. Make sure the transition distance is not: 1) too short to observe the difference between the two cubemaps, 2) and too long to prevent bleeding between the two joining rooms.

For different game genres, I recommend moving the capture point closer to the player's eyesight. We see everything from this point of view in the game, and it would be good to see the correct reflections. For example, in a first-person shooter, this would be approximately 1.8 meters from the ground.

Also, try to move the capture point as close to the center of the room as possible. In this case, you will have more valuable data inside the reflection.

Try to extend the influence of the cubemaps to the walls as much as possible, so that they have the correct reflections.

Also, make sure that reflections do not bleed through the walls.

Move the capture point far enough away from the objects. Otherwise, there will be too much info about this object in the texture and not much data about other parts of the room.

This point is mainly relevant for highly reflective or metal surfaces. Do not end cubemaps in the middle of the surface, otherwise, there may be a very noticeable seam. Instead, you should expand them to a logical geometry transition. The picture below is a very exaggerated example.

Draft lightmap density adjustment (if you plan to bake lights)

To adjust the light map density, I try to keep the ceiling on the blue side in the "Lightmap Density" view. It is unlikely to have much light anyways, i.e. no need for high resolution. For walls, I give a bit more lightmap resolution, while the highest resolution (green color) ends up on the floor area.

I go through all assets and set their "Light Map Resolution" to the power of 2, or the sum of the powers of 2 so that they fit better in the shadow texture atlas.

Sometimes there may be multiple scaled instances of the same asset. In this case, one resolution of the lightmap may be too large, and the other one – too small. In such cases, I set the resolution of the lightmap manually at the level for each asset.

For example, the ceiling and the floor are the same assets on the level. But I don't want the ceiling to be as high in resolution as the floor.

And I set "Overridden Light Map Resolution" for the ceiling to reduce its resolution.

In most cases, you don't need to go beyond green color and, especially, red. This will only increase the baking time and texture cache size without no significant difference in the shadows. Later, you can manually increase the resolution of some assets if you see that they need it.

SkyLight setup

I used SkyLight to provide uniform illumination in shadow areas for the floor and walls. I chose the HDRI map as I find it eye-catching for this environment. Additionally, I made several adjustments to brightness and saturation to match the environment better.

Then I plugged it into the SkyLight Cubemap slot and set the "Intensity Scale" to what fits the scene better.

The ceiling seemed dark to my taste, so I brightened it. I set the color of the "Lower Hemisphere Color" to a slightly lighter black color.

Fog setup

I want the Exponential Fog to be visible only at the further walls of the rooms, so I set the "Start Distance" to 1500. I didn't want the fog to be extended indefinitely beyond the level's geometry, so I set the “Fog Cutoff Distance” to 5000. All that remained was to choose the color of the fog and its density. I chose it to be light blue and not too thick.

Post Process Volume setup

I locked the exposure and set the SSR quality to 75 for Post Process so that there are no weird changes in exposure while working and the reflections look better.

First (Draft) Lighting Pass

At this point, I define a theme for each room, like how they differ from one another, what colors and brightness should be used how the player's guidance will work. It is important to guide the player with light and make the further steps intuitive with its help. For example, if you know that this area is important for gameplay, you should be able to see this area clearly from a very long distance and it should grab your attention right away.

Show the correct path with light and shadow contrast.

It is also important not to illuminate dead ends or unimportant objects. Otherwise, the player will be frustrated about why this unimportant object is so highlighted or where to go.

To simplify the prototyping process, I used mostly Point Lights with "Cast Shadows" turned on. Keep in mind that these shadows are for prototyping only and should not be turned on for Movable or Stationary Point Lights at later stages. Disable "Use Inverse Squared Falloff" and set the "Light Falloff Exponent" to 1. Lights will not have a gradient and will fill the surface evenly. You can easily fill a space with light by controlling Attenuation Radius and Intensity. I also recommend adding your colors to the "Color Picker" for quick access.

I started with this room at the end of a long hallway. Zone 1 area here is a bright turquoise light. Intuitively it looks like some kind of laboratory area and is visible from the hallway. The goal is to draw player attention to the area and it does it perfectly.

I used a very subtle blue light for Zone 2. It is lit by fake bounce light from Zone 1 and gives some eye rest.

I chose the green light for Zone 3. It gives an analogous color harmony to other colors and doesn't make too much visual noise.

For the corridors, which are mostly rocks, I decided to use magenta. That way they will be dark and ambiently lit as well as give a nice difference in feeling between spaces.

The staircase between the two corridors has a blue theme. Without other colors, it will give visual rest and draw more attention to the stairs and the second floor.

In addition, it will give nice readability to the walls between rooms.

This big room was the biggest challenge. Since there is a lot of open space to fill, I had to be strategic and keep the players’ focal point. Keeping a balance between colors is the key, otherwise, you may end up with "Christmas tree" lighting.

Zone 3 is the focal point with blue light from the monitors. It is visible when you enter the room with an entrance "a".

Zone 1 frames the center area with green light. And it also gives additional zoning, because the second floor on the catwalks will have its color.

Zone 2 fills the rest of the space with warm lights. This allows us to walk from warm areas to cold ones. Also, from the player’s viewpoint: exit "b" is visible from entrance "a".

Join discussion

Comments 1

  • Anonymous user

    Wow what a great article, thank you! Any tips on how to stop lighting coming through corners of rooms etc?

    1

    Anonymous user

    ·2 years ago·

You might also like

We need your consent

We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more