User login

Navigation

Poll

I downloaded the ETQW demo and....
...I'm too busy playing for polls.
13%
...it's awesome.
50%
...it's okay, I expected better.
13%
...I'm lost in the valley, anyone have a map?
0%
...my machine won't run it. :-(
25%
Total votes: 8

Who's online

There are currently 0 users and 17 guests online.

Welcome to RUST | Gamedesign.net

Skies (2)

Submitted by Andy on Mon, 2004-09-13 04:40.

Half-Life

Skies (Part 2) - by Andy

This tutorial is designed to give you some general information on the sky properties in Half-Life.
In the last tutorial we looked at the file names of the skies available in Half-Life and where to find your skies (half-life/valve/gfx/env).
This time we are going to look at placement of the sky in game and shadow effects.

Recapping on the last tutorial, here is a visual representation of the desert series of skies:

BKRTFTLF

North = BK
desertbk.bmp

East = RT
desertrt.bmp

South = FT
desertft.bmp

West = LF
desertlf.bmp

  Orient

The game engine places the sky texture on brushes that are orientated in the directions above, but it is easier to understand if you have an idea of how this is done in the editor. The picture above is representative of the Top (x,y) view in most editors. This will give you an idea of what sky texture the 'player' will see, but more importantly it allows you to add shadows.

Morningft

Most Half-Life skies have the sun positioned directly above, but the morning series has the sun just rising above the South brush. If you positioned your light_environment without any modification to the default settings, then there wouldn't be any shadows cast by the sun and it wouldn't look right. Careful positioning of the light_environment will enhance the 'feel' and look of your maps by achieving a cast shadow that fit's the sky.

For a more in depth look at creating skies have a look at Creating Environment Maps with Terragen by Mithodeil.


Shadows and the Light_environment.
Angle

The light_environment controls the style of light emitted from the sky.
It only works when there are brushes textured with sky in your map.
You can place the entity anywhere in the map, but to help out, it is usually a good idea to place it next to the brush face that you have identified as the one that will represent the sun in game.
In the case of the morning series of textures this will be the brush that is placed at the 'South' direction in the editor.
If you place it near this face, then changing the properties of the entity will correspond to the editor window.

Pitch Yaw Roll (Y Z X):
One of the properties of the light_environment is angles or "Pitch Yaw Roll (Y Z X)". Looking down on the 2D editor window above, setting the Yaw property will direct the light out into your map.
If you set the Yaw to  90  then the sun will appear 'ingame' to be coming directly from the 'South Brush' and going to the 'North Brush'.
The shadows in the morning series of skies are slightly angled again, and to make all the brushes in your map give off a shadow that it is consistent with the sky, you have to increase the YAW slightly. 100 seems to be right.
This is very much trial and error.

Pitch:
The "Pitch property" of the light-environment, (not to be confused with the Pitch of the angles mentioned above) is the property that will provide the shadows created by the brushes in your map.
A setting of 0 will not produce any shadow as the light will be emitted horizontally across the roof of your map.
A setting of minus 90 will simulate the sun shining straight down. To cast a long shadows enter a figure around minus 35 , and for a short shadow minus 70 .

Brightness:
One more thing worth considering is the "Brightness" setting of the light_environment. You can soften the light by adjusting the fourth figure in the RBG values of the Brightness property as that will increase of decrease the luminosity.
The default is 200, so a figure of 150 will be lees bright. If you set the luminosity to 0 you will not get a dark map, instead you will get a medium lit map.
Changing the colour of the light is also beneficial. You can choose the colour of the 'sun' from by changing the RBG and softening the colour.

Shadow map


RUST | Gamedesign.net is your source for all the latest game-editing news and tutorials. If you are seeing this message, this means that you are using a browser that does not support CSS. Please upgrade your browser and enjoy your stay at RUST and if you have any questions, comments, or suggestions, please contact a site administrator.