Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
0 Active | 263 Guests
Online:

LATEST FORUM THREADS

»
New BF2 Mod
BF2 General

Tutorials

»
SOF1 Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Map 10 : Outdoor Lighting
Versions: You must be logged in to view history.
For this tutorial we will look at the basic techniques of outdoor lighting
Mapping 101 - Outdoor Lighting - Tutorial 10

For this tutorial we will look at the basic techniques of outdoor lighting, we have already used the easy way, but this is far from satisfactory. Much more natural lighting and shadows can be achieved by just making a few simple changes.


  1. First of all delete the light in the middle of the courtyard.

  2. Now select all of the sky brushes, and bring up the surface inspector (S), check the light box , and put "50" in the "Value" box on the left. The actual value here isn't important, but 50 is a good safe amount. Make sure you don't accidentally change the texture, to be safe click on the sky texture first.


There are 5 main keys we need to set up before we do lets run through them. The first value is "_sun_light", which is basically the brightness of the sun. This will typically be in the low hundreds. Figure 1 shows two different values.

Figure 1. on the left the _sun_light value is 100, on the right it is 400

The next key is "_sun_angle", which sets the direction from which the sun shines. It has 2 values yaw & pitch. Yaw works exactly the same as the direction buttons at the bottom of the entity window. 0/360 is East, 90 is North, 180 is West and 270 is South, all looking from the top view. Pitch is the up/down angle from -90 straight down to 90 straight up. See Figure 2.

Figure 2. Left is a value of 315 -45 and right is a value of 270 -45

The next key is "_sun_color", which is, as you might have guessed the sun color, and takes the form of a RGB value, the same as the light entity. If there is no color the color of the sky texture will be used. NOTE this does not mean the compiled sky texture it means the one you see in SofRadiant, which is why there are 2 colored sky textures. See Figure 3.

Figure 3. Left is yellow (1.00000 1.00000 0.00000) Right is no _sky_color key at all.

Next is "_sun_ambient" which will be added to all points that can see any lit sky surfaces, even if the actual sunlight does not shine there. This is generally used to brighten up the sun's shadows. See Figure 4.

Figure 4. Left is no _sun_ambient value and right is a _sun_ambient value of 20

Lastly is "_sun_diffuse" which is used to soften the harsh shadows resulting from the sunlight. This can be a maximum of the value of "_sun_light". See Figure 5.

Figure 5. Left with no _sun_diffuse, right is a value of 150.


  1. So lets add the values to our worldspawn entity, bring up the window, select worldspawn then enter the following values :

"_sun_light" - "400"

"_sun_angle" - "315 -45"

"_sun_color" - "1.000000 0.885246 0.688525"

"_sun_ambient" - "10"

"_sun_diffuse" - "50"

Figure 6.

Hopefully your map looks something like Figure 6.


One trick I use for the sky color is to use the color picker (K), and then simply add "_sun" in front of the "_color" key. Then select the "_color" key and hit the "Del Key/Pair button"


For more information on sun light check out RadiosityLand home of ArghRad.

That concludes this set of tutorials, hopefully you have got to grips with the basics of SofRadiant and can now build your own basic map.

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»