Light Up Your World: How Lighting Makes All the Difference for Games
Whether you're creating the greatest sci-fi shooter or an adventure game, lighting should play a critical role in the game development process. Setting the correct mood for your game is determined by the lighting choices you make. Lighting has the most influential role in your game's world and can make or break the visuals.
This article covers how lighting is different in games versus other mediums and the vital effect it has on your game environment, so you can make the right lighting choices for your next project.
Many of the same lighting principles that apply to movies and other pre-rendered projects can be used for games. However, the nature of games makes how the principles are approached and implemented drastically different. Games are interactive, and the lighting can often change based on the character's actions.
For instance, the player may have the ability to shoot out a light and completely alter the game world instantaneously. The lighting in a scene can also change simply based on the player's current position and perspective in the game. If the player moved to a different spot, they'd see reflections and light rays very differently.
In a movie, or anything pre-rendered, those challenges aren't really present. The light is determined by the camera angle and designed to look perfect for that one situation. A viewer watching a film doesn't have the ability to move the camera to get a different angle.
Lights in games are typically created by the many different built-in light tools found in the game engine. One of those tools is the ability to bake lights on to the materials in order to save render time. This gives the illusion that light is being cast, but it's actually just the light baked onto the texture. A lamp hanging on a wall can be used as an example. The light that's being cast can be simulated by a light map, and the actual light can then be removed.
This technique is a great time saver and allows for more detail to be added elsewhere in the game, but it also means lights that are baked won't have any effect on moving objects. So knowing what lights to bake and what lights to actually have in the game engine is vital. As game engines progress and the hardware they're being played on enhances, so does the way light is being simulated inside the game.
In the past, lighting was overlooked or simply created without much attention to detail because the hardware and engines weren't up to par. As hardware advances, so does the player's expectations on what they anticipate to see while playing a game. Bad lighting can completely ruin an otherwise great game experience. No matter how amazing the models or textures are, if the lighting isn't right it won't do them justice.
If you look at a movie, you know how vital lighting is. The lighting for a scene is never placed without reason, because the lighting plays a critical role in the mood and feeling being presented to the audience. As games try to immerse the players into a more cinematic experience, the lighting needs just as much care and thought in it as a movie. After all, light can make a seemingly harmless environment look menacing. It can make a place feel warm and inviting or scary and cold.
Light has a drastic effect on the feel of a game; it determines how a player interacts with and views the world they're playing in. For instance, look at a horror game. There's always a specific lighting technique used throughout the game to help achieve a sinister and ominous feel to keep the player on edge. The lighting is much darker with deep shadows for creatures to hide in. Sometimes the light may only be coming from the flash light the player is holding, giving the player complete control of the lighting.
Imagine if this horror game suddenly got all the lights switched on. There'd be no shadows or dramatic lighting; suddenly the game wouldn't feel so scary anymore. That's why light is so important to your game.
Think about how you want the player to feel while they're experiencing your game. Lighting shouldn't be put in simply to illuminate objects; rather it should be an extension of the overall story and experience.
The lighting in a game may change drastically from level to level. For example, in Halo 4 you may be in an area where you're fighting aliens in a ship with minimal lights. This can make you play the game differently; you might be a little more cautious as you make your way through the level. However, the next level you might be outdoors in a huge open area lit by the sun, providing you with a completely different experience and drastically different lighting effects.
In an MMORPG or a game like Grand Theft Auto 5, the lighting is not determined by different levels. There's a day/night cycle and weather changes that influence and have a dynamic effect on the lighting in the game world.
Establish a Light Source
One of the most important steps in establishing light for your game is determining the light source. No matter what game you're making, the light should always come from a definitive source, whether it's the sun, moon, a street lamp or a light on the ceiling. You never want the light to be coming from nowhere.You want the player to be immersed in your game. As soon as you have strange, unrealistic lighting effects that aren't coming from any particular source, it can take the player out of the experience.
Use Light to Lead the Player
As mentioned before, lighting shouldn't be added simply to illuminate 3D objects. Think about how it'll affect the player and the game world. Lighting can be used to help lead the player, identify objectives or threats and act as a sort of guide for the player as they make their way through the environment.
To learn more about leading the player, check out this in-depth article on game level design.
One of the best ways to help you understand light and its different effects is to look at real world pictures. Go outside and take photographs at different times of day. You can also take a look at some of your favorite movies and see how they accomplished the lighting in each scene to find out what worked and what didn't. If you're working on a horror game, get lighting inspiration from a horror movie to see how they accomplished that unique lighting and what made it so scary.
No matter what type of project you're working on, lighting should be a critical step in the design process. So don't overlook it, because it's how you establish the feel of your game. Without great lighting the entire game will suffer. Remember to think about the type of lighting that will match the environment and do it the most justice.
If you want to learn more about lighting for your games, check out this great Lighting in CryENGINE tutorial and other game development tutorials on lighting.