Is it possible to make an entire brush give off of light?

Discussion in 'Mapping Questions & Discussion' started by Kazagin, Feb 23, 2010.

  1. Kazagin

    Kazagin L3: Member

    Messages:
    130
    Positive Ratings:
    9
    (Topic)
    Lava plays a part in my map, and I want to make it give off light to have it light as much of the area it is in. (So I can use less lights around the area.)

    Anyway, is there a way to make a certain brush give off light?
     
  2. Cynick

    Cynick L4: Comfortable Member

    Messages:
    153
    Positive Ratings:
    144
    I think you're looking for Glowing Textures. (Probably the part on $selfillum)
     
  3. fubarFX

    aa fubarFX The "raw" in "nodraw"

    Messages:
    1,597
    Positive Ratings:
    1,677
    yeah, $selfillum.
    you might want to make an alpha channel for it tho.
     
  4. Dr. Spud

    aa Dr. Spud Grossly Incandescent

    Messages:
    878
    Positive Ratings:
    800
    $selfillum will only keep the texture lit, but won't cast light onto other surfaces.

    I feel like I've read of a way to do this, but I can't remember. Maybe I'll find it later.
     
  5. Rexy

    aa Rexy The Kwisatz Haderach

    Messages:
    1,795
    Positive Ratings:
    2,366
    You guys are forgetting to add to lights.rad! You can make the texture emit light as well as appear to be glowing:

    <material> <red> <green> <blue> <intensity>

    http://developer.valvesoftware.com/wiki/Lights.rad#Lights_files

    Example:

    sketch/sketchglow 255 255 255 200

    Although that texture does not exist, that's the basic principle. The three values of 255 create a white light. Just make sure your material is glowing and has a properly defined alpha channel, and is using "$selfillum" "1".
     
    • Thanks Thanks x 1
    Last edited: Feb 23, 2010
  6. Kazagin

    Kazagin L3: Member

    Messages:
    130
    Positive Ratings:
    9
    Ok, I'm trying to do the .Rad method, but I can't find the lights.rad file for TF2.
    I checked in the:
    SteamApps>Kazagin>team fortress2>tf directory, but nothing to be found.
    (I found it fine using the half-life 2>hl directory.)

    Anyway, how do I make a .rad file?
    Is there anything special I need to put in it, or do I just need to start with the crap for the lights I'm doing now?
     
  7. Rexy

    aa Rexy The Kwisatz Haderach

    Messages:
    1,795
    Positive Ratings:
    2,366
    All you need to do is make a new text document, with notepad, and rename it to "lights.rad". When prompted which software to open the file with, pick notepad. Then just add your lines to the .rad file. This newly created lights.rad file needs to go in the base folder of your tf2 directory:

    "...steamapps\USERNAME\team fortress 2\tf"

    By default, when compiling, the software looks for information in lights.rad if there is one present. You can have other .rad files, but you have to tell hammer to use them during your compile--but that makes things much too complicated, all you need is lights.rad
     
  8. Kazagin

    Kazagin L3: Member

    Messages:
    130
    Positive Ratings:
    9
    EDIT:
    It didn't work. I put "$selfillum" "1" in the VMT, and put lava 255 255 255 200 in my lights.rad and lava/lavaglow 255 255 255 200 in my lights.rad .
    I checked the texture in VTFedit, and it doesn't have an Alpha channel.
    How do I take a texture that isn't mine (in this case, MangyCarface's lava texture), and add an alpha channel?
    (Note: I pm'd him to ask for permission to alter his texture. Waiting for a response.)
     
    Last edited: Feb 24, 2010