This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong.
It is crucial to spend time making the light design for a level, a lot of atmosphere and a general impression of polish rely on the light. This tutorial will show what different types of lights there are, where they are used to an advantage and how to use special entities called Lamps. Lamps also have a gameplay element, requiring some planning and setup to create the best result for the end user experience.
The tutorial ends with an overview of how this is all implemented in Amnesia and some general pointers on how to optimize the level, lights have a tendency to slow things down!
The Level editor can create three types of lights: Point, Spot and Box. The most common and general purpose light is the Point light, while the Spot and Box are lights for more specific purpose.
All the lights have common properties, in particular the Point and Spot types. Here is a quick rundown of what the different properties are (only those mentioned in this tutorial), for a more specific list see Level Editor Documentation.
The Point light is simply a light that is cast as a sphere. It can easily be used as an ambient light for a whole room, a specific light source (the light of a candle) or to give the impression of being cast from a hole in the ceiling (placing a small, intense light close to the ground below the ceiling will create this impression).
A Point light can NOT cast shadows, hence you have to be careful in how you light your level. For example a light that does not cast a shadow, will cast its light through walls, so placing a large Point light close to a wall with a dark corridor behind it will not look good, as the Point light will shine out in the corridor. This can be solved in numerous ways, which is explained later.
The Spot light is a light cast as a pyramid. It's main use is for sources that need to have a sense of direction, such as windows or a fireplace.
A Spot light CAN cast shadows, because of this Spotlights can be used to create nice depth in levels. Casting shadows can be quite a slow down, so the use of shadow casting spot lights needs to be with care. More on this later.
A Box light is a light typically used to give a room or a section of rooms a general ambient light. If you have a dark underground passage, you can use a box light to give the whole area a faint deep blue color. If you do not use a box light the area would be pitch black, even if you have some random Point lights or Lamp entities placed, as they would not reach so far to cover the whole area. The reason to not use a very large Point light is that the Point light has a change in intensity from the center going out, making it unusable to this type of ambient lightning.
A Box light can NOT cast shadows or show the normalmaps (the fake impression of depth) in textures. Therefore it is important to only use Box lights as faint ambient lights or when trying to create a very specific effect or else levels will look very flat and dull in their coloring.
As you might already have figured out, the different types of lights make it crucial to use a combination of them to create the right type of light design for your level.
These are entities that has a light source in them, the player can ingame use Tinderboxes to turn on the lights (if they are off). Typical Lamps are chandeliers, candles, torches and fireplaces. These entities have a lot of properties that can be setup, but that is part of the Model Editor, so for the Level editor it is more about placing the entities at logical and nice looking places. There are some specifics to keep in mind when using the Lamp entities, we have done some design choice that gives a better impression ingame but requires some extra work while creating a level.
Most lamp entities are using a Point light, as such the lights are quite small as they do not cast shadows and needs to be useable in many situations. We have also placed the actual light source a bit out of alignment. It is NOT located at the exact location of, for example, the particle effect for the burning light in a candle. This to make sure the light is cast in more of the room it is in than being cast through walls, tables and similar (where the light would not be cast if it were a shadow casting light).
List of Lamp entities that have this special placement:
This means that when for example using candlestick01, you will have to rotate it so that X positive is in the direction INTO the room. The easiest way to do this is to place the entity on the floor of a room, then rotate it a bit to see how the light cast on the floor is moving around.
A final note, You will have to keep in mind how you place Lamp entities that can be lit by the player, so that if the player turns the light on it will be cast in a good way.
Because of the small light source in Lamp entities you will have to also place some larger light source in the level. Not for each entity, but for each group of entities. This so that the lightning looks better, otherwise you have some small lights that does not give an ambient light to the whole room see the below images.
With only Lamp entities it looks strange.
After adding an ambient Point light it looks more realistic.
Lamp entities that are off can be lit by the player, you have to take this into account when making the light for a level. For example, if you have a room with four Lamp entities, that are all set to off, you will have to create an ambient light that is very faint and place it properly in the room. Then you have to connect the four lamp entities to the ambient light. By doing so the ambient light will increase in intensity for each Lamp entity the player lits with his Tinderboxes. The settings for this look like this:
You enter the name of the ambient light into the ConnectedLight input and then you change the value of the ConnectionLightAmount to something suiting depending on the number of lights you have. If using four Lamp entities a good value should be about 0.1, this means that the value of the Lamp entities light is multiplied with 0.1 and then added to the value of the ambient light.
Example of how a Lamp would affect the ambient light(PointLight 1)
Lamp Entity: 1, 1, 1, 0.5 (Red, Green, Blue, Alpha)
ConnectionLightAmount 0.1: Lamp Entity Values 1, 1, 1, 0.5 * 0.1 = 0.1, 0.1, 0.1, 0.05
PointLight 1 before a Lamp is lit: 0.2, 0.2, 0.2, 0.3
PointLight 1 after a Lamp is lit: 0.3, 0.3, 0.3, 0.35
Let's take a look at how to use the different types of lights to create an overall nice light design. In the following test level I have created two rooms, one with a large window and one smaller with a fireplace. It looks like this:
To summarize, each room has one light that casts a shadow. What light it should be is chosen by what gives the biggest impact on the room or what would create the nicest effect. The window is obviously the brightest source of light in the large room and in the small room the fireplace is the center piece and benefits from the extra detail.
Each room has one or more large point lights, that gives an ambient light in the same color as the main light source, only less intense. In the small room these ambient lights have been connected to the Lamp Entities, as some entities are currently off they must be connected so that they will increase the intensity of the point light when turned on by player.
To speed things up, only Lamp entities and the large Spot light has an alpha that is not 0. This so that they affect the specular visibility of the objects. When using large lights such as the Box light (1.) and the large point lights (2, 3 and 4) they should not have any alpha, as it slows the game down. Only use alpha on lights that will have a nice effect.
All Lamp entities have also been rotated, so the off-placement of their Point light is towards the center of the room. This you can see if you look closely in the following to screens from the map viewer, giving a demonstration of the final look of the light design.
Finally, the last and most important. How to optimize and make sure you have a good lightning of a level without making the level come to a crawl on slower computers.