Can't get lights.rad to work

Discussion in 'Mapping Questions & Discussion' started by Jansteffen, Mar 26, 2016.

  1. Jansteffen

    Jansteffen L1: Registered

    Messages:
    3
    Positive Ratings:
    0
    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.
     
  2. henke37

    aa henke37

    Messages:
    1,832
    Positive Ratings:
    420
    There's your problem. Vrad doesn't like your file. It has no problem opening it, it just doesn't like what it sees.
     
  3. Jansteffen

    Jansteffen L1: Registered

    Messages:
    3
    Positive Ratings:
    0
    Sooo what's wrong with it? As far as I can tell it just needs to be one line consisting of
    <folder>/<texturename> <RGBB>
     
  4. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    931
    Positive Ratings:
    894
    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!
     
    • Thanks Thanks x 1
  5. Jansteffen

    Jansteffen L1: Registered

    Messages:
    3
    Positive Ratings:
    0
    Huzzah!
    [​IMG]
    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...
     

    Attached Files:

  6. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    931
    Positive Ratings:
    894
    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/