Make a weapon Glow

How do i do it :S?

By Ranef 3 years ago

So, i made a skin where i want parts of it to glow (i got the glow and the skin in separate pictures) i think i know how to make a vmt file for it, but i dunno what to do in the vtf file.

Plz help me

-Ranef

3 posts 2,431 views
  • You must be a member

Replies

  • IppE's Levels
    • P3: Peasant
      Points: 20,535
    • E1: Helper
      EF: 12
    • C2: Treehouse Member
    • A5: Veteran
      Account Age: 5 years
    Username
    IppE
    Posted 3 years ago

    You need alpha mask for the glow. Take the current phongmask from the alpha channel of the diffuse (if you have one), create a normal map (can be flat too, doesn't really matter) and place the phongmask on the alpha channel of the normal map.

    Next, you paint the alpha channel of the diffuse texture black, and the parts you want to glow white (its linear though, white=100% glow, 50% gray = 50% glow ect. so if you want some places to glow more then others, use different shades)

    Then you do the vmt as follows:

    "VertexLitGeneric" { "$basetexture" "path to texture file" "$bumpmap" "path to normal map with phongmask on its alpha channel" "$phong" "1" "$phongexponent" "20" "$phongboost" "1" "$lightwarptexture" "models\lightwarps\weapon_lightwarp"
    "$phongfresnelranges" "[.3 1 8]" "$normalmapalphaenvmapmask" "1" "$alphatest" "1" "$selfillum" "1"

    *Any other vmt parameter you need*
    

    }

    So in the end you have: Diffuse texture with selfillum mask on alpha channel Normal map with phongmask on alpha channel .VMT file

    Ask away if something is unclear.

    User Title
    Misfortune
  • Ranef's Levels
    • P2: Drudge
      Points: 1,240
    • C1: Member
    • A4: Graduate
      Account Age: 3 years
    Posted 3 years ago

    Thanks for the reply, but tbh, i dont really understand anything at all :/ I dont know what alpha channel is or does, the same with the phong mask, maybe you could throw in some few screens?

    -Ranef

    User Title
    Golden wrecnher
  • Schrodinger's Levels
    • P2: Drudge
      Points: 1,040
    • C1: Member
    • A4: Graduate
      Account Age: 3 years
    Posted 3 years ago
    Posted by Ranef Thanks for the reply, but tbh, i dont really understand anything at all :/ I dont know what alpha channel is or does, the same with the phong mask, maybe you could throw in some few screens? -Ranef

    Well in layman's terms:

    lets pretend you're editing the shotgun.

    ============= - Open v_shotgun in photoshop, gimp, or whatever .vtf/.tga capable image editing software you've got.

    - Add the textures you want to glow, then tab over to the color channels and add an alpha map, where everything except what you want to glow is masked out in black.

    - Save this as your new texture, then create a new blank normal map and save it as vshotgunnormal or whatever.

    - In your vshotgun.vmt, it would read similar to the code posted above, substituting the directory of your vshotgun.vtf and vshotgunnormal.vtf in the appropriate places.

    Basically, the code is telling the shading on the model to act independent of outside light sources, so even in the dark, parts of the model still "glow." If you don't mask out only the parts you want glowing, the entire model stays illuminated, even in pitch black, which looks really horrible.

    User Title
    Everywhere and Nowhere
  • You must be a member