Sunday, May 3, 2015

Lighting theory for 3D games, part 3: the heresy of three-point lighting


This is part of a series on how I approach game lighting. Part 1 was about light fixtures, and part 2 is about light as a formal material.

In part one, we began by thinking about light culturally -- light has meant different things to different people across history, and you must consider that meaning when lighting your spaces. But in part two, we observed that much of our everyday relationship to light is more immediate and less intellectualized, that we often use light to help us do things. Theoretical frameworks about light help us articulate what we think the light is doing.

One of the most common theoretical frameworks for lighting is the three-point lighting system, used mainly in photography and film. As I argued in part 2, one of light's most important jobs is to allow you to read the surface or topology of an object. The three point system helps us formalize light source in terms of how to "read" an object. (I also argue that it has some serious weaknesses for 3D video games, but we'll get to that in a minute.)

It's called "three point" because there's at least three light sources involved:

The key light (B) is your primary light source that lights most of the object, the fill light (C) helps brighten up the dark parts so we can read the surface better, and the back light (D) is more like a rim light to accent the back edge of the silhouette and distinguish it from the background.

It's a very standard kind of setup. You should only do this when this is the mood you want -- that is, if you want something that looks "safe" and "high production" as if it were shot in a studio or film set, then use three-point lighting.

But if you want something to feel a bit more scary or sinister, you could borrow the techniques of countless campfire horror stories and point a hard keylight upward, as if illuminated solely by the infernal glow of hell. Or if you want something to feel more mysterious, strengthen the back light to illuminate the back of someone's head but dim the key and fill.

Left: sinister uplights. Right: mysterious side light, little or no key light.
These make for nice screenshots.

... this is also where a lot of 3D game artists and game designers suffer from bad phenomenology. They think their goal is to achieve great screenshots, and in film / photography / theater / 2D games that is an admirable goal. But as people working in 3D games, our actual goal is to craft some sort of navigable 3D space, experience, or system, and our lighting needs to be part of that context.

A screenshot is not a 3D space, which means a lot of this three-point methodology falls apart once you add any kind of interactivity or camera movement to it.

Say I'm lighting something without a strong key light... but what if I walk around and look at the object from the other side? Suddenly, the back light is now a key light, and the effect is totally different. Is this still mysterious, and if so, is it the same kind of mystery? What are we actually telling the player to look at, here?

Depending on your perspective, a back light can become a key light, and vice versa.
To me, this is biggest weakness of using three-point lighting in 3D games -- key / fill / back lights are relative to the viewer's perspective, but most 3D games involve a freely moving and rotating camera perspective. I argue a virtual place is understood best as a constructed space, not as a series of still screenshots. De_dust is not a series of camera angles, it is a continuous geography with an infinite number of camera angles. Three-point lighting was intended for situations where perspective was controlled, and a 3D video game is not one of those situations.

... Unless we control the player's perspective anyway. Or if we can't control perspective, at least we can strongly influence the player's reading of a space and imply a specific vantage point. Then the player will do what we want them to do. Or at least understand what we were trying to do.

For instance, what if the space had specific "frames"? What if we placed a chair at a window, or required the player to enter through a doorway?


If there's a chair, we're signalling to the player that they should consider where the chair was facing. If there's a door, we know with certainty the player will have to enter the room through that doorway. Trust your player to understand the framing and vantage point we're implying. Chair placement is a "passive" type of frame, while a doorway is more "active", and both rely on already establishing the floorplan and interaction methods before committing to lighting.

Maybe that means we should usually do lighting design later in the development process, once we know the basic shape of a world and what we do in it. This begs the question -- what is a typical workflow for doing lighting design? How do we do it?

We've been treating lighting design as a thing you study or conceptualize. However, good lighting designers know that they have to test their setups, consider maintenance regimes (an unfixable fixture is a poorly designed fixture), and actually measure light levels with specialized devices (the industry uses candelas / lumens to quantify light) because the most important part of design is in the implementation. They visualize the distribution of light levels using photometric diagrams like this:


The only way to know if a key light is actually performing as a key light is to watch someone walk through your space. Lighting design cannot happen in a vacuum, disconnected from the world. You should light a game according to the context, according to what the game is about, and what is happening in the game, and whether the game engine permits you to do it in the way you want to do it.

To know if we're achieving our objectives with lighting, or whether our design is even feasible, we have to TEST THE IMPLEMENTATION. Until we do that, the design isn't done.

So then, um, how do we do game lighting, exactly?...

NEXT TIME: part 4, how 3D engines think about lighting