Light in Mesh
All lighting is added using Trenchbroom. There are four types of lights that can be used when making a level:
Each has it’s own use and settings.
The lighting range roughly equates to: 1 = 32 Quake units.
Setting a range to 1 and putting the closest wall 64 units away, will make it appear that the light is doing nothing. To debug lights, it is useful to put a brush close to the light when testing.
All lights (aside from ambient light and point light), can use a direction to focus the light in a direction. You can set this setting using
angles property in the entity.
The angle are based on degrees. Given the angle tuple (0 0 0), where X is the degree we are talking about, they are layed out as follows:
(0 X 0) | / 180 |/ 90 ---*--- 270 /| 0 / |
(X 0 0) 270 | / 180 |/ ---*--- /| 0 / | 90
The light is always emanating from the center of the dynamic lighting cube.
Intensity should be between 0 and 1, but you can go past one to “blow out” the light. It has an interesting effect, but has diminishing returns.
Ambient light is the default amount of light that all things “give off”. If this is set to (0, 0, 0), you wont be able to see anything. If you set this to (1, 1, 1) everything will look like it is glowing very brightly.
This setting is controlled in the
worldspawn settings. You can get to this menu by click anywhere there isn’t some geometry and changing the
You usually want this value quite low. Setting this value to around (.2, .2, .2) is a good starting point. A very small change has a very large effect.
Directional light sends light in a given direction forever. This can be used to simulate the sun for example. Putting a directional light above a scene and setting the direction to down, all the objects will look like they are being lit from above.
Point lights send light out in all directions from it’s given point. Point lights are good to light rooms by placing them at the center for example.
Spot lights are like point lights but can be made to only send light in one direction. The
cutoff value is used to focus the light’s beam a bit.
Note: spot lights do not light up the air between the light and the floor by itself. It’s best to place these near a wall when trying to work out angles.