Can't get lights.rad to work

Jansteffen

L1: Registered
Mar 26, 2016
3
1
Hello everyone, I just recently began mapping and so far it's been going pretty well, however I wanted to create a texture that acts as a light source, which after a quick google search I found an article in the developer wiki and various youtube tutorials showing how it is can be done via creating a lights.rad file in the game's main folder (steamapps/common/Team Fortress 2/tf/lights.rad)

The way I understand it is that hammer automatically looks for a file of that name and uses it when compiling, but even after setting up my lights.rad with the following line:

dev/dev_whitelight 255 255 255 300

The texture still just appears as normal. I have already double and triple checked the name as well as the .vmt files for the texture, all my compile settings are on "normal" but I just can't get it to work.

In the compiler output I found the following lines:

[Reading texlights from 'lights.rad']
unknown light specifier type - lights

[56 texlights parsed from 'lights.rad']

Any tip or advice is highly appreceated.
 

henke37

aa
Sep 23, 2011
2,075
515
unknown light specifier type - lights
There's your problem. Vrad doesn't like your file. It has no problem opening it, it just doesn't like what it sees.
 

Jansteffen

L1: Registered
Mar 26, 2016
3
1
Sooo what's wrong with it? As far as I can tell it just needs to be one line consisting of
<folder>/<texturename> <RGBB>
 

Tumby

aa
May 12, 2013
1,087
1,196
The thing that is wrong with your file is that hammer is loading a different one already. The game already comes with a lights.rad file. You need to create a lights.rad file with a different name and specify it in the expert compile settings.

[Reading texlights from 'lights.rad'] Not yours!
unknown light specifier type - lights Valves fault!
[56 texlights parsed from 'lights.rad'] 56 things are in that file, which can't be your 1-liner!
 

Jansteffen

L1: Registered
Mar 26, 2016
3
1
Huzzah!

Thank you!

Kinda strange though that pretty much all resources I found on the internet said to just go with lights.rad rather than a custom name.


To any googlers in the future who might stumble across this forum post with the same problem, the solution is to go to expert compile mode, on the left click on lights.exe and then on the right add the parameter
Code:
-lights <filename>.rad

Anyways, now I just need to figure out how I can get my game to launch automatically after compiling...
 

Attachments

  • 20160326224001_1.jpg
    20160326224001_1.jpg
    205.5 KB · Views: 661

Tumby

aa
May 12, 2013
1,087
1,196
Anyways, now I just need to figure out how I can get my game to launch automatically after compiling...
Check "Copy File" and "$game_exe". If you already compiled, you can select "Run Map in Engine Fullscreen/Windowed" from the dropdown menu on the left or just remove all checkmarks except for "$game_exe".
And because we are already on the topic of lights and advanced settings, take this: http://www.nodraw.net/2010/12/lighting-compile-options/