Glowing Outline For Things Other Than Payloads And Flags

Discussion in 'Mapping Questions & Discussion' started by Digaag Wa Riz, Dec 27, 2012.

  1. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    83
    I have a question for someone or everyone. I understand that there can be an outline for the intelligence cases and payload carts that highlight where they are in a map even through walls. I want to ask if I can apply this glowing outline to other things.

    Specifically, I am creating a CTF map in which BLU and RED must get the intel from the opposing team's base, and then ride a gondola back to their base. I would like the gondolas to have this glowing outline on each of them. What I would prefer is that they don't have this outline but are lit dynamically as they move from the interior of each base (which is in a not-so-bright room) to outside (which is bright). My main problem is that each gondola is shaded as it is spawned and will not be shaded as it is hit by lights of varying intensities and directions.
     
  2. Untouch

    Untouch L4: Comfortable Member

    Messages:
    187
    Positive Ratings:
    43
    I may know a way, give me a sec to mess about on hammer.
     
  3. GPuzzle

    GPuzzle L9: Fashionable Member

    Messages:
    638
    Positive Ratings:
    134
    Rules for messing in Hammer:

    Rule 1: Do not divide by zero.
    Rule 2: Do NOT divide by zero.
    Rule 3: If something goes extremely wrong, it's Source being Source.
    Rule 4: Rule 7 is a lie.
    Rule 5: Do not carve.
    Rule 6: Don't put hard-coded buildings in your map.
    Rule 7: Rule 4 is a lie. And now I've broke Rule 1 and Rule 2.
     
  4. Untouch

    Untouch L4: Comfortable Member

    Messages:
    187
    Positive Ratings:
    43
    Is the gondola a prop?
     
  5. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    83
    Proud breaker of Rule 5.
     
  6. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    83
    The gondola is a brush-based entity tied to a func_tracktrain. I imagine it would work the same way as a prop.
     
  7. Untouch

    Untouch L4: Comfortable Member

    Messages:
    187
    Positive Ratings:
    43
    Won't work my way then, sorry.
     
  8. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    83
    If you mean I won't be able to add a glowing outline then that's okay. I want to know how to allow the gondolas to be lit dynamically.
     
  9. Untouch

    Untouch L4: Comfortable Member

    Messages:
    187
    Positive Ratings:
    43
    selfilum texture on the brush may do that.
     
  10. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    83
    I do not know what you mean by that. I know there is a box checked on the texture browser that says "selfilum" for every texture I've used.
     
  11. Untouch

    Untouch L4: Comfortable Member

    Messages:
    187
    Positive Ratings:
    43
    In .vmt files there is a proxy called "$selfillum", putting it to one ("$selfillum" 1) should work.
     
  12. GPuzzle

    GPuzzle L9: Fashionable Member

    Messages:
    638
    Positive Ratings:
    134
    hl2.exe has stopped working.

    Blame carve for that.
     
  13. The Asylum

    aa The Asylum

    Messages:
    1,658
    Positive Ratings:
    439
    If you're looking to be able to see objects from behind walls, try adding this to a custom texture's vmt:

    "UnlitGeneric"
    {
    "$baseTexture" "your/texture"
    "$alpha" 1
    "$translucent" 1
    "$vertexalpha" "1"
    "$ignorez" "1"
    "$no_fullbright" "1"
    "$vertextcolor" "1"
    "%keywords" "tf"
    }

    That'll come out looking like this:

    [​IMG]

    The VTF I used has a slight transparency, so it doesn't clash with what the player is percieving

    Create the outline via brushwork, and then parent that to the gondola.
     
    • Thanks Thanks x 3
  14. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    83
    I don't know how to do any of this. I'm sorry if my ignorance is making anyone impatient. Please tell me how to do this since I'm pretty sure these these things can't be changed in Hammer.
     
  15. The Asylum

    aa The Asylum

    Messages:
    1,658
    Positive Ratings:
    439
    a custom texture needs two things to function: A VMT file and a VTF file. In simple terms, the VTF file is the texture itself, while the VMT file tells the game how that texture should behave.

    Creating a texture is easy. You could just drag and drop a 256x256 image into vtex.exe (or a 512x512, 1028x1028, etc), and that'll spit out a VTF file of your image. I reccommend you download VTFEdit, though- I find it much better and easier to use than vtex.

    Creating a VMT is easier. All you need to do is copypaste some parameters into a text file, and then rename the extention .vmt (ie: mytexture.txt --> mytexture.vmt)

    This is a great thread to get you started making your own custom textures. You really should read it.
     
  16. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    What Asylum wrote is a .vmt. A .vmt, short for Valve Material Texture (or something like that, who actually knows), determines the properties of the texture whose actual image is given by its .vtf, the file you reference in $basetexture. Each line starting with $ is a different property.

    To actually create one of these, open up notepad, paste Asylum's .vmt (starting from "UnlitGeneric" and ending with }) into a new file. Save the file to tf/materials/[usually your map's name] and make its extension .vmt instead of .txt. Then, create a .vtf file. In this case it would most likely be a single color, 16x16px. Make that in Paint or something, save it, then drag it onto or import it with VTFEdit. Save it as a .vtf in the same place you saved the .vmt; and finally, edit the $basetexture of the .vmt to read "$bastexture" "tf/materials/foldername/vtfname" and save. Boom, your texture is ready to be used in Hammer!

    EDIT: I need to type faster, Asylum ninja'd me.
     
    • Thanks Thanks x 1
  17. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    83
    Sorry, this post has been changed because I didn't know what the heck I was talking about when I wrote it. NEW POST: How do I make the outline glow? I made the custom texture and it works in game but it's so dull...It doesn't have the pizzazz of the payload glow.
     
    Last edited: Dec 29, 2012
  18. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    I'm guessing, from Asylum's screenshot, that he used a yellow texture as the base. In your case it would probably be best to make bright red and bright blue textures and assign them to the appropriate boat.
     
  19. WolfKit

    WolfKit L3: Member

    Messages:
    128
    Positive Ratings:
    51
    Doesn't hammer have a function to turn brushwork into a prop? If you did that could you use Untouch's way?
     
  20. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,031
    Positive Ratings:
    3,975
    No, that's Propper. Useful but real modeling is better
     
    • Thanks Thanks x 1