Need some help with a normal map

can't get my normal maps to work

By Fire 3 years ago

I've always had this problem with normal mapping: if the texture did not come with a normal map in the game (i.e. the ambassador) I cannot make them work. I added "$bumpmap" to the vmt, but it ceases to work. Here's my vmt code for a normal mapped pistol (that doesn't work) If you know the problem, please tell me how to fix it.

"VertexLitGeneric" { "$basetexture" "models\weapons\vpistol\vpistol" "$bumpmap" "models\weapons\vpistol\vpistol_normal"

"$phong" "1"
"$phongexponent" "25"
"$phongboost" "10"  
"$lightwarptexture" "models\lightwarps\weapon_lightwarp"
"$phongfresnelranges"   "[.25 .5 1]"

"$basemapalphaphongmask" "1"

"$rimlight" "1"
"$rimlightexponent" "4" 
"$rimlightboost" "1"

"$glowcolor" "1"

(of course, below here would be the cloaking proxies and shit, but i didn't think that mattered)

7 posts 1,294 views
  • You must be a member

Replies

  • murphy7's Levels
    • P2: Drudge
      Points: 2,773
    • E1: Helper
      EF: 2
    • C1: Member
    • A5: Veteran
      Account Age: 5 years
    Posted 3 years ago

    Its weird nobody answered. Thats just sad. The problem is "$basemapalphaphongmask" "1". Remove it, put the alpha channel of the diffuse to the normal's alpha and all is correct.

    Incredible Monkey Man
  • Fire's Levels
    • P1: Beggar
      Points: 155
    • C1: Member
    • A4: Graduate
      Account Age: 4 years
    Posted 3 years ago
    Posted by мurрнч Its weird nobody answered. Thats just sad. The problem is "$basemapalphaphongmask" "1". Remove it, put the alpha channel of the diffuse to the normal's alpha and all is correct.

    I'm a VMT noob. So you just remove the basemapalphaphongmask, but what do you mean by putting the alpha channel of the diffuse to the normal map? Where would I make this change?

  • murphy7's Levels
    • P2: Drudge
      Points: 2,773
    • E1: Helper
      EF: 2
    • C1: Member
    • A5: Veteran
      Account Age: 5 years
    Posted 3 years ago
    Posted by Fire
    Posted by мurрнч Its weird nobody answered. Thats just sad. The problem is "$basemapalphaphongmask" "1". Remove it, put the alpha channel of the diffuse to the normal's alpha and all is correct.
    I'm a VMT noob. So you just remove the basemapalphaphongmask, but what do you mean by putting the alpha channel of the diffuse to the normal map? Where would I make this change?

    In the default diffuse map alpha channel you can find a gray map with white egdes and/ or black spots. This is the phong map. The engine will automatically search the phong mask in the normal map. But, Valve didnt added a normal map for the pistol, so they added the "$basemapalphaphongmask" "1" it tells the engine that the phong mask is in the diffuse. So go to the original diffuse map from valve, select the channels tab in photoshop/ whatever program copy it and put it in the normal map's alpha channel.

    Incredible Monkey Man
  • boiler rat's Levels
    • P2: Drudge
      Points: 2,338
    • E1: Helper
      EF: 1
    • C1: Member
    • A5: Veteran
      Account Age: 5 years
    Posted 3 years ago

    Are you trying to compile right now or enable a normal map?

    Or create one?

    Normal avatar? Yeah I got one.
  • IppE's Levels
    • P3: Peasant
      Points: 21,754
    • E1: Helper
      EF: 12
    • C2: Treehouse Member
    • A5: Veteran
      Account Age: 5 years
    Username
    IppE
    Posted 3 years ago
    Posted by boiler rat Are you trying to compile right now or enable a normal map? Or create one?

    Obviously he is trying to enable it.

    This is what murphy (probably) ment: Open the diffuse texture in photoshop (v_pistol.vtf) go to the alpha channel (bottom one in the channels tab) Copy it, and save it to the alpha channel of the normal (and be sure to save it as uncompressed texture with alpha channel)

    Then write "$normalmapalphaenvmapmask" "1" in the vmt. (Unless TF2 uses differet vmt command for phong maps on normals alpha, havent studied that version of the engine)

    User Title
    Misfortune
  • Rafael De Jongh's Levels
    • P3: Peasant
      Points: 17,646
    • E3: Tutor
      EF: 72
    • C2: Treehouse Member
    • A5: Veteran
      Account Age: 5 years
    Skinning/Modelling Expert
    Posted 3 years ago

    And let us see your normal map i hope its not from diffuse :p

    User Title
    2D/3D Artist
  • IppE's Levels
    • P3: Peasant
      Points: 21,754
    • E1: Helper
      EF: 12
    • C2: Treehouse Member
    • A5: Veteran
      Account Age: 5 years
    Username
    IppE
    Posted 3 years ago
    Posted by {H.H} Boba Fett And let us see your normal map i hope its not from diffuse :p

    You're the one to talk...

    User Title
    Misfortune
  • You must be a member