Eleged van az unalmas gyári mapokból? Készíts saját egyedi pályát magadnak!!
MENÜ

In CoD4, theyve completely redone the lighting for the better. Now every light is dynamic: you can create spotlights (most lights in real life are like this), omni directional (which are like the spotlights but still cool) and a whole bunch more. In CoD1, UO and 2, you had only one way of making a light--and that was an omni directional light which emanated everywhere. In CoD4, there are more ways than ever to make lighting look awesome.



The limit is your imagination. Lets go over some good uses of these new measures.


Good uses for spotlights

Lets say you have a map where you are being interrogated by a terrorist. You want that classic film style light, only showing the terrorist and the table hes in. You dont care about the room. You want a spotlight. Lets go with this idea and play around with it. First make a room and put a model in the map (right click the 2d grid, go to misc > model and navigate to your CoD4/raw/xmodel/ folder and find the model named "com_northafrica_longtable"). After that, add a light above the table (right click the 2d grid, go to light).

When you add the light, youll notice your screen will look like this:



Dont worry, you didnt break it. Go up to View > Light Preview > Toggle preview at max intensity. Now youre light should look more realistic.



Good. Now add an info_null (right click the 3d grid, go to info > null) and place that where you want the light to shine. This is the crucial part of spotlights. If you dont add this, the light will be omnidirectional, which we dont want. I placed mine right above the table.



Deselect the info_null (ESC) and then select the light again. After the light is selected, select the info null and press W. This will link the two together. Deselect both and reselect the light. Press the N key to bring up the entity editor and add the key "radius" and value "175". You might need to play around with the value a bit so the light is not too bright, but not too dark, depending on where the light is situated. Check the "PRIMARY_SPOT" box.



Alrighty. Deselect everything. Youve just made your first spotlight. Congratulations. Thats all there is to it to making cool light effects. I suggest you play around with the light and move it around the map so that you get different effects. Find what you like and go with it.


Overall world lighting

World lighting is basically the ambient light that you get on a map. On some maps like Backlot, the ambient is pretty high, and then on some maps, like Wet Works, the ambient is pretty low. World lighting settings are simple to create and edit. Lets play around with them.

I made a simple map with a grassy brush and a skybox with the "sky_chechnya" texture.



To make world light settings, called "world spawn settings", hit the N key. In the upper box it should have "worldspawn" selected. Now lets enter some values. ModsOnline has all the stock world spawn settings, so take a look at those: http://www.modsonline.com/Tutorials-read-445.html. I chose to use Ambushs world spawn settings.

In the entity editor, add the following keys/values (type the first one in the key box and the second in the values, then hit enter):

"radiosityScale" "1"
"contrastGain" "0.15"
"diffusefraction" "0.05"
"_color" "0.90 0.90 1"
"sunlight" "1.5"
"sundirection" "-146 -34 0"
"sundiffusecolor" ".43 .39 1"
"suncolor" ".9 .98 1"
"ambient" ".1"

Now youve added your world spawn settings. Now that weve done that, everything in our map (outside atleast) will be that color. Everything inside will require lights, but you can decide if you want to use that. I usually just copy one of the world spawn settings from one of the stock maps, as it is MUCH easier to make your map that way.

If you want to try out the lights, hit CTRL-F8 to see an in-editor preview of the world lighting. Moving on.

Asztali nézet