Lighting
How to light a game level with functional lighting strategies
Lighting serves an obvious gameplay function -- without light, the player cannot see what is happening in the game. And like many functional things, it doesn't necessarily have to be beautiful or even creative. It is perfectly acceptable to craft lighting that is "good enough" and move on with your life.
But with a little bit of attention, well-composed level lighting can help the player gauge distances (metrics) and recognize architectural features and patterns (wayfinding). In contrast, poorly lit spaces often feel stale, flat, or confusing.
While the game industry usually thinks of lighting as an artists' responsibility to make a game pretty, we are going to de-emphasize that aspect in this book. Lights do more than sell a game.
Instead we will focus on the design and function of the game lighting.
Ask yourself, what is this light saying and doing?
lighting study blockout by Harley Wilson (from https://www.artstation.com/artwork/PQJvn)
A strong lighting strategy both conveys the cultural mood AND helps players understand where to go.
For example, in the lighting study above by Harley Wilson, the lighting design certainly evokes a sophisticated modern interior and intimate mood within a realistic style.
But the lighting strategy also communicates navigation information for the player:
  • What type of space is this? Lots of recessed down-lights along a wall suggest this is a fancy gallery. If this was a game about stealing valuables from rich people, we would definitely want to stay here and look for loot.
  • How is the space organized? The cooler grays wash the gallery walls, while the warmer lamps in the middle of the room highlight a work area / bar. There may be useful items there.
  • Where's the exit? The back wall is shadowy, so maybe it leads to a secondary exit / backdoor, or maybe the broom closet, or a bathroom. A primary exit would be lit more prominently.

What is light?

In real-life, light is visible energy that interacts with surfaces. If you understand how photons behave (i.e. physics), then you can eventually derive how all observed phenomena emerge. When relatively simple rules can explain more complex effects, we say that system is elegant.
Video game light is not elegant. Here in video game land, light is a mess of many different systems that we must manually tweak and tune into seeming like an elegant system. When a feature does not fit neatly into a coherent consistent system, we call that a hack.
To review: real-life physical light is elegant, while real-time video game light is a mess of hacks. When working in conventional 3D realism, lighting designers make this hacky mess seem plausible and readable.
"What is light vs how games simulate it" slide from "Invisible Intuition: How To Light A Level" by Robert Yang for GDC 2018
Imagine making a rainbow with a prism. In real-life, you shine a ray of light through a prism and a rainbow "automatically" emerges because of the physics of light.
But in a video game, you would (1) make a refracting glass material for the prism object, (2) add a glow sprite where the beam intersects the prism, (3) paint an additive rainbow texture in Photoshop and place it next to the prism. None of those three elements (refracting glass material, glow sprite, additive rainbow) actually interacts with each other in the game engine. This is not an elegant universe of photons interacting with surfaces! Instead these are separate one-off effects that we glued together for the illusion of coherence. This "lighting effect" don't even use any in-engine light sources!
Lighting a video game is about picking and choosing only what you need. In many game engines you can set one light to turn off shadows, or set another light to disable reflectivity. But "turning off shadows" makes absolutely no sense in a physically accurate system. Imagine our strawman physicist, raging at our inaccuracy: "But there's no such thing as light without shadows or reflectivity!" Silly physicists.
spotlight casting shadows in Unreal Engine 4, by Oskar Świerad from https://unrealartoptimization.github.io/book/profiling/passes/
A recent shift toward physically based materials and ray tracing promises a more scientific shift in how we approach 3D rendering and light. Maybe the physicists will finally approve? But until that revolution arrives, we're stuck with what we've got, decades of various hacks and specialized systems that each approximate a different aspect of light:
  • Light sources: base layer of direct illumination, based on light angle and position
  • Shadows: objects occlude (block) light and project shadow maps onto other objects
  • Materials: the color, texture, opacity, and reflectivity of 3D surfaces
  • Postprocess: screenspace effects like color correction, bloom, and HDR eye adaptation
  • Reflections: true reflectivity requires re-rendering the scene; most games use approximations
  • Baking: developers "bake" lightmaps and reflection probes into the game data
Because video game lighting is such a complex wide-ranging topic that probably deserves its own book, this chapter will focus on design theories for light sources and shadows because that's usually the level designer's responsibility. (And again, note that in a AAA industrial context, lighting is often considered part of environment art and thus the work of a dedicated lighting artist.)
For detail on materials and environment textures, which heavily affect light, see Art Pass.

A brief history of light

The history of lighting design is the history of light sources. The sun and the moon (reflecting light from the sun) are the most common natural light sources. There are also artificial light sources like controlled fires, gas lamps, incandescent light bulbs... and in the 21st century, there is increased focus on energy-efficient fluorescent lights and LED lighting.
It’s tempting to think of light as a story about technology, progress, and older light sources becoming obsolete... but the light bulb did not make the sun obsolete, and the LED does not make fire obsolete! We still use fire as a light source all the time -- in our birthday candles, in our campfires, in our romantic candle-lit dinners. Fire hasn’t disappeared from the world, but rather our culture around fire has changed. While fire used to be a common practical tasklight in Shakespeare's time, now it feels more like a special decoration for a special occasion.
As a lighting designer, you need to sensitize yourself to how light conveys these ideas and emotions, because this is also how you communicate those moods to people as well.
various light sources throughout history: sunlight, fire, gas lamp, incandescent, fluorescent, LED

What is lighting design?

In real-life, architectural lighting design is the art / science of placing light sources to account for context and functionality, whether for work tasks in an office, or decorative accents in a moody restaurant.
Real-life professional lighting designers assess building plans, design or research light fixtures, and coordinate the placement of these fixtures with the architect. They shop in catalogs published by light manufacturers, with detailed technical specifications and lab-tested light falloff charts / standardized IES profiles that they can test in 3D tools similar to game developers. They must also balance local laws and building codes about minimum light levels, budget, maintenance plans, energy use, and sustainability.
a light fixture catalog with light distribute curves / light falloff charts in standard candelas (cd)
Because eyes adapt to nearby light levels, it is difficult to guess how bright a room actually is, so lighting designers often approximate a quick measurement with the lumen / zonal cavity method. For a more accurate reading on-site, they also use handheld light meters to measure scientific units like lux / lumens / candelas.
While game engines are increasingly adopting this technical approach to lighting, and now we even make use of candelas / IES profiles sometimes, do not confuse real-life lighting design with video game lighting design.
As level designers and game lighting artists, we aren't constrained by local laws, building codes, manufacturer supply chains, power supplies, or even natural physics. We must light to our unique design context with our unique tools.
recommended reflectance and luminance ratios for real-life classrooms, from IESNA Lighting Handbook 9th edition

Real-life vs. video game lighting design

Real-life lighting design
Video game lighting design
Runs on electricity
Also runs on electricity
Must obey laws of physics
Pick and choose "natural" laws; godless
Follow local regulations / zoning
No regulations, only gamer norms
Infinite light sources, infinite rendering
Optimize for fewest light sources
Long-term, you live in it
Short-term, you visit it
Glare is literally painful
Glare makes your game worth $60
High contrast shadows distracts
High contrast shadows look cool
Adjustable, many configurations
Mostly static, few configurations
Comfort, safety, usability, reliability
Drama, decor, clarity, plausibility
While real-life lighting design can offer us useful methods, its goals and constraints are fundamentally different from video games. Despite similarities, we must approach game lighting very differently and forge our own path.
lighting study blockout breakdown by Harley Wilson (from https://www.artstation.com/artwork/PQJvn)

Rendering lights

Every game engine renders lights differently. There's benefits and drawbacks to every method, no single technique is always perfect. Most games use a mix of several methods to support specific lighting effects. To avoid a particular weakness, you must understand what the 3D renderer is doing. But sometimes an "expensive" lighting effect is worth it, especially if you offset the cost with a "cheap" lighting effect that balances your framerate budget.
For more on performance and framerate, see Optimization.

Static vs dynamic

A static light does not change at all, while a dynamic light can change in color, intensity, direction, or position.
If your game design and art direction support it, using static lighting is almost always better for framerate because the engine can "bake" lighting data like lightmaps, spheric harmonic (SH) probes, and cubemaps / reflection captures -- though sometimes the annoyance of baking lighting data, or the high memory cost and file size of storing lightmaps, means static lighting is sometimes suboptimal.
In contrast, dynamic light means the level can change and react to the game state, enabling stunning special FX, moody flickering / shadows, switchable lights, and day-night cycles -- but if there's too many light sources, then it might overload the player's machine and the framerate will suffer. Dynamic lighting also introduces an additional production cost where you must test every part of the level under every lighting scenario.

Forward vs deferred

Most 3D renderers for games prioritize one of two rendering paths:
Forward rendering means the graphics card (GPU) processes each object in a straightforward manner, rendering and lighting every 3D object separately. Avoid overlapping lights, and generally use as few light sources as possible; each additional light means your graphics card has to render the object again, e.g. 2 lights on one object = the equivalent of 2 objects.
Deferred renderers "defer", or delay, any lighting calculations until after it collects all the 3D objects together -- and then it lights all visible pixels at once. Here you can use many overlapping lights and it doesn't really matter, because now lighting is more of a constant GPU cost based on screen resolution rather than object or light count.
(image: forward vs deferred)
It might sound like forward is obviously worse than deferred? However, forward rendering has a simpler design and is much faster for simpler scenes, while deferred renderers consume different types of GPU resources (e.g. render targets, bandwidth, buffers) and perform poorly with transparent materials. It all depends on what your project needs and what type of device you're targeting.
In practice, many game engines use both techniques at the same time, or more modern variants called Forward+, Deferred+, Clustered Forward, Tiled Deferred, etc. that mix and match different parts according to their needs. The major 3D game engines Unity and Unreal support both Forward and Deferred rendering paths, and mix and match techniques as necessary.

Direct vs indirect

Vertex lighting, per-pixel lighting, real-time. Hard or soft lighting. Shaders.
Bounced lighting, usually somehow baked into the game data by the developer. Lightmaps, baked reflections, light probes / spherical harmonics (SH), global illumination (GI). Almost always soft, ambient.

Light source types

Most 3D game engines and toolsets feature four (4) basic direct light source types:
  • Ambient light is the default minimum amount of light in the world to avoid pitch black shadows. Simple implementations add a flat color to every object, more complex implementations apply different amounts of ambient light based on surface angle or sky.
  • Directional light is like sunlight or moonlight casting constant light from a certain direction, usually downwards from the sky. Levels based entirely within interior spaces might use non-shadow-casting directional lights like ambient light, even if it's not realistic.
  • Point lights (or omnidirectional / "omni" light) are like light bulbs that throw light in all directions.
  • Spotlights cast a cone of light in a certain direction from a certain position.
(image: show examples of all four at once)
Almost every video game level will likely use all four of these types. Together, these light sources form a complete domain of basic lighting tools:
Global, affects everything
Local, affects nearby things
Shines in all directions
Ambient light
Point light
Shines in one direction
Directional light
Spotlight
Other light shapes are just variations on these basic types. Area lights are wide flat rectangular spotlights, tube lights are long point lights, and self-illuminated materials / "texture lighting" usually works internally by instantiating extra point lights along the light emitting surface.

Fixture vs light source

Up until now, we've been talking about light sources as visible fixtures / apparent light sources.
In practice, one visible fixture may actually consist of multiple invisible in-engine light objects. These additional lights soften
For example, in the medieval lighting study pictured below by Harley Wilson, there are only two visible light fixtures: an orange fireplace and a blue-gray window. However, in the editor, there are actually 11+ different point lights and spotlights in the scene, as well as a reflection capture and atmospheric light controller. What looks like two lights is actually a dozen objects! All of these different lights simulate air and light bounces, imparting subtle highlights and additional depth to the scene.
medieval lighting study with light entities by Harley Wilson (from https://www.artstation.com/artwork/lBLzJ)
Beware! This type of slow detailed lighting design demands a lot of time and resources. Some would even say it's indulgent or wasteful. When building a full level / game, you will not have the scope nor framerate budget to guitar-solo the lights for every single room.

Three point lighting

The most common lighting design theory is probably three point lighting, which is widely used in film, theater, and photography. Three point lighting refers to three different types of lights:
(1) Key light is the main dominant light source that illuminates most of the subject or area. In most levels, this is usually a directional light (sunlight) or a bright powerful spotlight with high falloff constant (like a floodlight). Task light.
(2) Fill light brightens darker areas to avoid plunging everything into shadow. To fill a game level, we usually use ambient light and (many) invisible soft dim point lights floating in the middle of the room, but wide-angled dim spotlights are also useful when you want to direct the fill and, for example, avoid any fill splashing onto the ceiling. Ambient light, wash.
(3) Rim light highlights edges to pop the foreground from the background. Accent light.
(And in portrait photography, sometimes a fourth background light brightens up the backdrop to smooth out awkward shadows from the key and fill.)
Notice how the key light and fill light in this example are roughly perpendicular to each other, while the rim/back light is behind the subject. Pay special attention to the light positions and directions! The light source placement, relative to other lights, determines their function.
However, the big problem with using three point for games is that it assumes you have complete control over the camera. What if the player controls the camera?
Three point light types depend on the light's orientation relative to the camera -- a rim light is a rim light because it grazes the subject, but if you approach from a different angle, now there's no more rimming action -- now the rim light is a key light! If it looks like a dim shadowy silhouette from the front, it'll glow like a deer in headlights from the back. The light placement matters, but the camera placement matters too.
So in order to use three point theory effectively in games with free movement and a free camera, you need to predict how the player will utilize both.
In a first person game, that means knowing roughly where the player will be walking and looking. Fortunately, we already have a tool to constrain the player's movement and rotation: it's your level layout! If you frame a subject a certain way, or limit an approach to a certain direction, then you can place lights for that perspective. Your layout is a lighting tool.

Cinematic lighting

The most common use of three point lighting in games is for lighting characters in cinematics / cutscenes. Because you have more camera control in a cutscene, you should draw upon more filmic lighting techniques -- because you're basically making a movie.
TODO: summarize text from these cinematic lighting cheat sheets by Derek L. Brand, senior concept artist on Psychonauts 2 at Double Fine https://twitter.com/DerekLBrand/status/1440089196467609608
lighting characters with key lights, internal documentation used for Psychonauts 2 by Derek L. Brand https://twitter.com/DerekLBrand/status/1440089196467609608
lighting characters with fill lights, internal documentation used for Psychonauts 2 by Derek L. Brand https://twitter.com/DerekLBrand/status/1440089196467609608
lighting via exposure and value analysis, internal documentation used for Psychonauts 2 by Derek L. Brand https://twitter.com/DerekLBrand/status/1440089196467609608

D6 lighting

D6 lighting uses the six faces of an ordinary six-sided game die (1d6) (⚀ ⚁ ⚂ ⚃ ⚄ ⚅) to help you remember different lighting strategies.
This strategy is about lighting for flow, not just lighting from a specific view or camera perspective. It represents a more architectural and spatial approach to lighting a level, and in most cases, we encourage you to prioritize this type of lighting theory over three point lighting.

⚀ 1. Focal point

Place a lone light source to emphasize a specific point or place, to suggest the player approach this exact location.
A point light treats all angles equally, while the directionality of a spotlight suggests more of a specific angle of approach or intention. Imagine a lone window, campfire, car headlights, flood light, a dramatic lone stage light angled down.

⚁ 2. Focal frame

Place two similar light sources next to each other to frame something in the space between. It will suggest an approach that is perpendicular to the frame.
Frame an entrance or exit. Torches, sconces.

⚂ 3. Path / boundary

Angle spotlights toward a wall to "wash" the surface evenly

⚃ 4. Space

⚄ 5. Space with focal point

⚅ 6. Space with framed path

How to light a level

Start big

Light the biggest room / area, don't fiddle with small stuff
Start with key lights
Any global fill (ambient, global illumination)
if using indirect light in an outdoor setting, do an initial low quality light bake immediately

Natural light

various window designs and daylighting strategies, from "Architecture: Form, Space, and Order" by Francis Ching
usually directional lights and ambient lights, reflectance and reflection probes and SH very important, fog for atmospheric scattering... because it's so dependent on one light source to create contrast, ambient lights / fill lights / shadows are very important

Day for night

unless you're working in a dark moody aesthetic or the horror genre, then don't actually light your night time levels so dark
I mean, you can try, but you'll just get complaints from your playtesters that the level is too dark, and you'll be forced to walk back your too-dark lighting decisions anyway
instead, light as if it's early morning, and then use a night sky, audio cues, and fogging to make it feel like night

Artificial light

usually point lights and spotlights, pay attention to falloff and attenuation
light temperature
fixture design
IES profiles
Make reusable prefab light fixtures: make 1 floodlight, configure it, then reuse and duplicate it
work modularly and don't obsess over it too much
For key lights and accent lights, have a light source or light fixture in mind

Motivated lighting

Motivated lighting is light that has an apparent source / fixture ("motive"), and you are emphasizing / exaggerating ("motivating") its visual effect.

Wash vs grazing

If it's a fill light, it's ok for there to be no light source
it can be a point light that just floats in the middle, keep it dull and low intensity, you don't want the player to wonder why there's a random ball of light glowing in the middle of the room
Fallout 4 didn't have any baked lighting!! they handplaced all their fill lights!!
lighting designers call this "wash lighting" -- a soft smooth fill light with minimal shadow, usually for wall-washing (e.g. a gallery)
vs grazing, where you draw attention to the wall surface to highlight detail

Shadow design

Shadows create the contrast that impart depth to the 3D space. Height and depth perception is crucial for reading the topology of the level.
Shadow diagram by James Gurney, from https://gurneyjourney.blogspot.com/2010/02/light-and-form-part-1_15.html
Think about the shadow anatomy, affects the look of the game a lot.
Team Fortress 2 famously used very saturated shadow terminators on the characters
In our opinion, don't obsess so much over crafting specific dramatic shadows, you end up sacrificing everything just for one spot which is silly... think holistically about how shadows wash over the room and space, not on a specific floor or wall
Focus on big areas and gradients, think big picture
Avoid flat pitch black shadows. Use fill, bounce, reflectance to convey depth
Occlusion / contact shadows come from baked lightmaps or screenspace effects, don't stress out about them
Real-time dynamic shadows in every 3D game engine is expensive, turn off shadow casting for most lights and objects
Highlights, midtones, shadows

Texture with midtones

As a guideline, keep diffuse / albedo world textures within the midtone brightness range. Do not let the texture get too dark or too bright, or else light and shadow will have no space to do their work.
A texture that is pitch black cannot become blacker, and a texture that is full white cannot become much brighter. But if you must err on too-dark or too-bright, generally a too-bright texture is much more flexible than a too-dark texture.
"The biggest reason environments should not have dark textures is that in the physical world very few materials go below a 50% grayscale value. Materials that would go beyond that would be plastics, certain rocks, and paints. It is also the opposite, [...] super bright textures would be reserved for paint, metals, and others. [...] So I tend to stay in the 50% grayscale mark or higher [...] and the reason is that I rather have a brighter texture that causes too much bounce vs a texture that is draining the life out of my scenes." -- Rogelio Olguin, senior texture artist at Naughty Dog, from "Texturing Values for Environments"
To check your texture brightness, open the texture file in an image editing tool like Photoshop (see our full list of 2D art tools) and access your tool's histogram panel. In Photoshop, that means using either Window > Histogram or Image > Adjustments > Levels, and ensuring the image brightness is mostly in the middle 50% of the graph, between the 25% and 75% mark on the horizontal axis.
For more on environmental texturing concerns and readability, see Art Pass.
The exact "50% mid gray" midpoint may vary with the game engine's color space. Like for Unreal 3, sometimes the mid gray was actually at ~73% because of sRGB gamma to linear conversion (info). Today, most modern game engines use "linear" color space because it's more consistent and reliable.
Comparing a dark albedo texture with low histogram values (top) vs a midtone albedo texture with medium histogram (bottom), from "Epic Games Texturing Guidelines" https://docs.unrealengine.com/udk/Three/TexturingGuidelines.html
"If you create a texture that is too dark you are limiting its ability to be bright in the game. You should remember that the texture you are creating is describing how bright that surface is when lit by a 100% bright white light. Also consider that if you paint a texture too dark or include ambient occlusion that is too dark you will inhibit the surfaces ability to show shadows and lighting. Textures with too much noise and too high of contrast will also make it difficult to read a surface's shape and lighting. [...] "Below is a practical example of how dark textures affect lighting. [The left image] is trying to fix the [dark texture] by increasing light intensity [by 500%]. You can see this doesn't help GI or the dark areas at all. The final image is using the adjusted texture with a light brightness back [to normal]. These images show that if the textures are too dark they will not result in good lighting no matter how much you try to fix it with brighter lights." -- from "Epic Games Texturing Guidelines", Unreal Engine 3 developer wiki. Emphasis added.
Comparing a scene with dark albedo texture (left) vs. midtone albedo texture (right), from "Epic Games Texturing Guidelines" https://docs.unrealengine.com/udk/Three/TexturingGuidelines.html

Light pass workflow

Lighting can be very time-consuming, so don't attempt to do final lighting all at once. Instead, build flexibility into your workflow, and work iteratively. We recommend lighting in four passes: mood, navigation, gameplay, and detail. Space out each of the passes and allow enough time to settle.

Mood lighting pass

Set main key lights, figure out global settings, and add fills, think about the big takeaways and themes and player experience goals. "It should feel bright and sunny and happy"... "it should feel dark and scary and haunted"... "it should feel big and lonely..."
Light main entrances and exits of each room. To maximize the chances of a player noticing a particular place, light it. Build a hierarchy. Big important exits should have more important looking lighting, while secondary spaces should have dimmer less focused lights.
brightly lit doorways help players understand the entrances, exits, and flow of the room; from "Functional Lighting" by Magnar Jenssen http://magnarj.net/article_funclight.html

Gameplay lighting pass

Lighting to foreshadow encounters (enemy approach, battle line, possible strategies and flanks)
Lighting to highlight puzzle elements and suggest areas to explore
If you haven't playtested already, then you definitely need to playtest at this point.
the strong spotlight on the left draws attention to the enemy soldiers; from "Functional Lighting" by Magnar Jenssen http://magnarj.net/article_funclight.html

Detail lighting pass

Fine tune and tweak everything, but don't spend too long, it probably looks good enough, and if you tweak it too much you might destroy the effect from a previous pass.

Lighting examples

TODO: showcase different contexts (industrial vs residential) and moods (scary, comfy)
lighting variations diagram for level design by Simon "Sock" O'Callaghan

To review...

Review

Now what?

  • Try a lighting design exercise.
  • Lighting is traditionally the most performance-heavy visual aspect of a level. After a lighting pass, you'll want to do an optimization pass.

Further reading on lighting

Last modified 2mo ago