General Half-Life 2/Lighting
description
Tips on how to improve your lighting.
keywords
light, improve, lights, 3d, 3d mike, light spot, spot.
As you know good lighting can make and break a map. But apart from setting the mood of your map there’s a few practical things to keep into account when setting up lighting:
1. Players don’t like dark or over lit maps.
Dark maps are hard to play and people will get frustrated cause they get shot from dark spots. Over bright maps will make your eyes more tired after playing it for a while. Over brightness is easy to avoid but handling the contrast of your maps lighting is sometimes hard.

Fig 1: Look at how the roof is almost completely black whereas on eyelevel you can still easily make out the geometry and respectably opponent players.
2. Colored surfaces will change the lighting solution of your map.
A red texture will become dark when blue light hits it and It will not cast back anything apart from red light. A yellow texture will become green when blue light hits it and will only reflect yellow light. Think about this before thinking a red brick will suit your evening sun map.
3. Avoid high contrast places.
Where light and darkness meet its often hard to see anything. This is pretty hard to solve especially on a map that has outdoor and indoor locations.
So we know what to avoid but how to avoid it?
1. Avoid dark spots:
To prevent your map from becoming too dark you can approach a couple of techniques. The easiest being to add some ambient light. Ambient light can really mess up your maps mood if used wrong. Ambient light should ALWAYS use color values out of the blue spectrum. Blue is the color people will see the longest after dusk. Adding a little bluish ambient light to make sure your dark spots are not entirely black will give your map that slick (Id like to call) Pixar-look.

Fig 2: Nice hard yellow rim and bluish shades.
However if your map NEEDS an area of complete darkness (I can’t think of a reason why) the ambient light will prevent this. In that case it would be smarter to add a couple of really low intensity bluish lights in the dark spots you’d like to be not too dark. Low values of Ambient light should be used in any case. DON'T overdo it.
2. Avoid saturated colored surfaces.
Especially on outdoor scenes it’s very unwise to use deep saturated colors in your textures. These will absorb values of your sunlight and cause your map to be very unpredictable to light. Also dark textures absorb more light then white ones. A texture should NEVER be completely black or completely white. A truly white surface should not be allowed to exist because it’ll reflect all the light that is cast on it. This will cause your map to appear over bright and you will not be able to fix this by tuning down your sunlight intensity values. So never use a 255 red, green or blue value in your texture. And to make a small bridge to the next paragraph: don’t set a too high contrast in whatever your texture depicts. Make sure your textures stick in the middle of the colored ranges and contrast and brightness values. The sun and skylight is supposed to give mood to the surface NOT the texture that’s applied to it.
3. Avoid high contrast areas:
So you have made a map where outdoor and indoor areas connect. You have set some lights for the interiors and added sunlight and some ambient settings. You think it’ll be ok because your screenshots show enough detail in the shadowy parts near your entrance right? Wrong. In game it’ll be much harder for your eyes to adjust to the dark interior parts when running in and out the entrance. Your eyes will need to adjust just like in the real world. So it’s smarter to help your eyes a bit by adding 1 or 2 floating lights IN the entrance. With big entrances this is not always necessary because the grandiosity bounce will do it for you.

Fig 3: The sewer doesn’t immediately go pitch black but is lit by a lamp close to the entrance avoiding a high contrast spot.
Ok so now you know how to avoid certain things when lighting your map, but how about making the map actually look nice?
In my opinion every map needs some sort of link to an outdoor area to get some sunlight in. Sewer maps and other complete interior maps kind of make me feel like I need to get out instead of actually want to play the map. I immensely dislike DM_LOCKDOWN for this. An outdoor map (and especially a moody one) inspires more and is a healthier environment in which to frag. *taken from: "CS-Life" by -=n00b$|@y3r=-
So what can we tweak?
1. The skybox
2. The light environment
3. The light environment ambient light
4. The sun color (if you have a visible sun)
5. Indoor lights
1. The skybox.
Picking one from Valves SDK content dirs is the easiest way. Making one is somewhat more complicated and if you know how to paint clouds then you shouldnt be reading this tutorial

Fig 4: Check how the red evening skybox still shows blue in the opposing corner of the sunlight. This blue is best used for the ambient and shadow color. The sun color would be a bleak yellow very close to the orange in the clouds
2. The light environment.
The sunlight should obviously match the skybox to some extent. The common mistake people make is giving the sun the most prominent color in the skybox texture. Look for the spot the sun has in the skybox and pick that color. The sunlight is usually a slight yellowish or pale blue color EVEN if is full daylight. If you give the sun a too bluish tint be prepared for a very very blue map. Also when you pick a yellow tint make sure you stay slightly close to red (orange) instead of going the other way to green (deeper yellow). The orange will give your sun more warmth where true yellow will set a very unnatural and ‘dirty’ mood. Also using a slight yellow-orange sunlight will make sure your models will be able to show every color that’s in their texture. If your sun lacks one color too much your models will look oversaturated in one part of the color spectrum.

Fig 5: For DM_AVALON I used a pale blue environment light. Notice how its almost white.
3. The light environment ambient light.
Low intensity blue tint that matches the skybox texture. Even if you have a red hot evening sky it’s smarter to keep the ambient light color slightly bluish. The sunlight (set to very orange in this case) will light the parts of the map where the blue ambient light will give the shadows that typical night-look.
Importing note about shadows: For the Shadow control color select the same color as used in the light environment ambient color settings.

Fig 6: The light environment ambient light, almost always a dark blueish tone.
4. The sun color (if you have a visible sun).
The sun color is usually the same or a slightly more saturated version of the light environment. I prefer a yellow or orange sun because it gives the impression of more warmth.

Fig 7: Compare the actual color of the sun which is much more yellow to the pale bluish environment light in fig 5.
5. Indoor lights.
Indoor lights are pretty much location specific and may be used in any color. Oversaturated colors are not advised because they will prevent your models from showing all of their color. For instance an oversaturated red alert light will prevent people from seeing green and red as separate colors. Over saturated light should NOT be used close to outdoor/indoor entrances. Here it’s perhaps smart to help the light creep in a bit by adding a low intensity light with slightly outdoor colored values (avoid high contrast areas remember?).
Also when selecting yellow lights its smarter to stay in the orange part of the spectrum. Steering too far towards green will result in a ‘dirty’ look.

Fig 8: Tip: Don’t use yellow for a yellow light, choose a more orange tint. It will result in a more warmer light.
I hope this tutorial might help some people and if you have any further questions feel free to mail me. Keep in mind this is just my suggestions on creating interesting as well as practical lighting for the HL engine. With this tutorial I certainly do not aim to cover every technique there is out there nor will I claim to be 100% right about everything stated here. I do hope you liked it!
- Michael Visser aka 3D-Mike
The original can be found at http://www.3d-mike.com/game/lighting.htm
