Introduction
There seems to be alot of confusion over how to implement skys in a level. The concept is much more simple than most people think, and perhaps this is what leads to confusion.
Setup
Below is a picture taken from the Worldcraft 3D view. The blue brushes are SKY brushes (that is to say, they are brushes covered on all sides with the texture named SKY). The should be positioned, as above, wherever you want to see the sky.
It may be useful to make the sky reach much higher. Generally, you want to avoid letting the player touch the sky. Its also a good idea to place clip brushes (brushes completely covered with the texture named CLIP) over the sky brushes, as this will prevent the player from going through the sky. (This wasn't done in the example map.)
In the upper-right corner of the
fig. a picture, you will notice a little purple box. This is the light_environment entity. It controls the sky's lighting properties (as seen in
fig. b).
Above you can see the properties of the light_environment. The angle (in the upper right corner of the properties box) sets the direction light will shine. The first property,
Pitch (
pitch), sets the upward or downward angle of the light. A negative angle will shine downward. The last property,
Brightness (
_light), controls the color and brightness of the light. The first 3 numbers of its value are the RGB (Red/Green/Blue) value, and the fourth number is the brightness.
This is a
heck of a lot easier than placing a bunch of light entities if you're trying to make realistic outdoor lighting.
The most important thing to keep in mind with the light_environment is that its properties will only be applied to brushes that have the SKY texture on
all sides. Also, a light_environment entity will only affect the sky in vis areas visible to it. This is a little hard to explain, but look at the picture below.
If the light_environment is placed at location
a, it will only affect its area and the one adjacent to it. It its placed at location
b, it will affect all three areas.
One of the last things to think about (or maybe the first, whatever) is which sky you're actually going to use. By default, there are 19 skys available for your use. Names and pictures are outlined in the
Half-Life Skys article.
Once you know the name of the sky you want to use in your map, load up the worldspawn properties (
fig. c) by selecting
Map Properties from the Map menu. Click on the
environment map (cl_skyname) property and enter the sky's name as a value. If you skip this step, leaving the value blank, the default sky, desert, will be used.
As you can see, using the light_environment enables you to setup even lighting with a consistant angle and pitch.
Resources
Below is a list of entities related to this tutorial.
This article was originally published on the
Valve Editing Resource Collective (VERC).
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the
TWHL Archiving Project page.