Snarkpit Articles

lights.rad

Where is it and how do I make one?
This tutorial will explain how to find and edit the lights.rad file that makes textures look like they are emitting light.

<OL TYPE=1>[*] First off if you don't have it installed already go to Windows Update and install Microsoft Net Framework. You also need GCFScape. You can get it here
[*] Close your Steam. You can not open up .gcf files with Steam open.
[*] Open up GCFScape, click on File, Open and navigate to your SteamApps folder. Mine was located at C:Program FilesSteamSteamApps
[*] Open sourcesdk.gcf
[*] Click on game_content and then the game that you are working on. I chose to extract the one that is in Counter-Strike Source - cstrike.
Article image


To extract lights.rad right click on the file and choose extract. Extract it to the same directory as the MOD you are working on. In my case it was C:Program FilesSteamSteamAppsme@myemail.comCounter-Strike Sourcecstrike

[*] Close GCFScape and navigate to where you just extraced your lights.rad.
[*] Open up lights.rad with notepad and look at the first line...
User posted image

lights/fluorescentcool001a 189 231 232 350

lights/fluorescentcool001a is the name of the texture, 189 231 232 is the RGB value, and 350 is the brightness.

[*] To change the color of the light that the texture emits you want to change the first 3 sets of numbers to the RGB value of the color you want. The best way to find out the RGB (red green blue) value of the color you want is to fire up MS Paint, click on Colors, Edit Colors..., and then hit the Define Custom Colors >> button.
Article image


Lets pick pure blue for example. Once you click your color look to the RGB values on the bottom right. the order of the numbers are top to bottom, left to right.

So, 0 0 255 equals pure blue.

[*] The next step is brightness. To change how bright the texture glows or emits light set the last set of numbers, the higher the brighter- changing 350 to 500 would make it seem brighter.
<LI>After you are done changing your values be sure to save any changes.</OL>

Discussion

Posted by Flynn on Fri Jan 5th 2007 at 10:15am

Posted by Sparky911 on Thu Apr 20th 2006 at 6:06am
[Author]

Added the part about Microsoft .NET Framework. ALso changed tutorial a little to reflect the new file layout since I first posted this tutorial.
Posted by Bl1tz on Fri Apr 15th 2005 at 6:01am

Fine tutorial, except for the fact that you leave out the key step that you need the Microsoft .NET framework to run GCFscape.

I saw this a month ago, tried to install GCFscape, and it wouldn't install. I searched around but didn't see anyone else having trouble with it. Finally, tonight, SonicDM told me I needed .NET framework for it to run!

I can't imagine why you wouldn't just link to the GCFscape homepage, which tells you that you need .NET, and even has a link for download.

Thanks
Posted by OtZman on Wed Mar 2nd 2005 at 3:19pm

Useful tutorial. I haven't tried extracting lights.rad using GCFScape, instead I did what Tracer Bullet said.

Is there any way to make a texture, emitting light, lighting itself? Now, if I make a room with no lights but a cube in the middle with a light emitting texture applied, the room is lit but the cube remains dark, only vaguely lit by light reflected by the floor, walls and ceiling of the room.
If I remember right, light textures in HL1 lit themselves.
Posted by Sparky911 on Wed Feb 16th 2005 at 7:57am
[Author]

Hmm I have never actually done it. I just knew how to get to it and how to replace it. Im sure its just a path error. Your lights.rad must have to go into a different place then where you have it

Maybe in the Options for Hammer I think thats where you set it to look for the .rad file.
Posted by headx on Tue Feb 15th 2005 at 7:59pm

Looks like the .rad file in the GCF always replaces any external .rad. I've got two blank .rad files in \bin (<mapname>.rad & lights.rad), and it still reads the .rads in the GCFs. This is really a step backwards from Half-Life.

Is there some way around this?
Posted by Sparky911 on Mon Feb 14th 2005 at 2:13pm
[Author]

The lights.rad program still has to be extracted from the gcf (pak) and Paint is used to simply find the RGB value of the colors. Notepad is still used.
Posted by warlord on Mon Feb 14th 2005 at 2:04pm

Is the use of this program realy necessary, couldnt you still use notepad like with the original lights.rad
Posted by TorQueMoD on Fri Jan 21st 2005 at 1:14am

It seems that the lights.rad file in the GCF file overrides the lights.rad file in your sdk/bin directory. I placed it with my vmf file and gave it the same name and that worked fine.

Thanks Sparky and Tracer!
Posted by Sparky911 on Tue Dec 28th 2004 at 1:24pm
[Author]

Re-read the tutorial starting at step 6