Snarkpit Articles


Adding fog to your map is very simple, it only requires a small script to be done. We will presume you have a map ready for fog to be added & a .gsc file to edit.

First we need to work out the colour of the fog we want. Open the microsoft paint program (normally located in start/programs/accessories/)

Once open, click on colors/edit colors...



Now click on define custom colors & it will open a color selection pannel.



Use this to select a color that will be the same as your fog in game, I have chosen a rather odd green. Notice that in the bottom right my RGB Values have been set to 5/140/60. This is basically how much of each primary color is needed to make my green.



Now we have to re-calculate our color so that CoD can use it. CoD uses a decimal value for RGB so 100% is 1.00 & 50% is 0.50 - to re-calculate our values we need to indivudually divide them by 255 (the max amount of color possible).

Open microsoft calculator (normally located in start/programs/accessories/) & enter your red value. in this case "5". now hit the "/" key to divide, enter "255" & hit "=". From the end value take the first 3 numbers & ntoe them down.



The value we now have should be 0.01 - repeat this for the green & blue values until you have all 3 values written down. In this case 0.01 0.54 0.23.

Now open your .gsc script file & enter the following script:

setCullFog (start distance, end distance, R, G, B, Transparency);

so for example my green fog, starting from where the player stands & ending at 1024 units away with no transparency would look roughly like this:



Now test your map & look at your (hopefully not oddly coloured) fog smiley



Post ReplyView Topic
Discussion
0 starsPosted by TanK on Mon Aug 2nd 2004 at 6:08am

Can anyone tell me how to MAKE a .gsc file? I mean, it can't just be that you make a .txt file, rename it to mymap.gsc and POOF! You got a .gsc file! Do I need a program or anything?
0 starsPosted by Skeletor on Mon Mar 29th 2004 at 10:05pm

<a href="http://www.planethalflife.com/features/motw/tod/tod04.jpg" target="_blank">http://www.planethalflife.com/features/motw/tod/tod04.jpg</a>

BAD EXAMPLE!
0 starsPosted by pepper on Fri Mar 19th 2004 at 6:38pm

i really wish i had call of duty
[author]
Posted by KoRnFlakes on Fri Mar 5th 2004 at 1:08pm

If you make a bold or funny statement its likely to stay in peoples minds, making it green meant it was easier to understand &amp; no fog isnt always grey, its various shades during whatever time &amp; in the desert a yellow would be more suited. There is a map called fivepoints that used a dark blue &amp; pulled it off well for night time.
0 starsPosted by matt on Fri Mar 5th 2004 at 12:19pm

Shouldn't fog be grey?
Post ReplyView Topic