VERC: Using Skys in Half-Life Last edited 15 years ago2003-02-17 18:07:00 UTC by Penguinboy Penguinboy

This article was recovered from an archive and needs to be reviewed

  1. The formatting may be incorrect as it was automatically converted to WikiCode from HTML, it needs to be revised and reformatted
  2. Some information may be out of date as it was written before Half-Life was available on Steam
  3. After the article is re-formatted and updated for Steam HL, remove this notice
  4. Please do not remove the archive notice from the bottom of the article.
  5. Some archive articles are no longer useful, or they duplicate information from other tutorials and entity guides. In this case, delete the page after merging any relevant information into other pages. Contact an admin to delete a page.

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.
sky_figa.gifsky_figa.gif
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 ).
sky_figb.jpgsky_figb.jpg
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.
sky_le.gifsky_le.gif
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 (Link: index.php?doc=1037472496-69804100) article.
sky_figc.jpgsky_figc.jpg
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.
sky_ss.jpgsky_ss.jpg
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. For a more concrete illustration, check out the example map linked below.
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.

Comments

You must log in to post a comment. You can login or register a new account.