Phong not showing up, normal map fucked up in some way

I tried asking around in Pimpage but fuck it, I’m creating a thread for this.

I have this really weird problem with phong and a normal map.

Yeh I have all the required parameters in the VMT but the phong doesn’t show up, unless I fuck up the path to the bumpmap. Then the phong shows up on the invalid bumpmap thingy for some reason. My bumpmap’s alpha channel is all white, and no, I haven’t had any problems with white alphas in bumpmaps before.

So uh, what the heck is wrong? This is the second time I’ve encountered this problem. It hasn’t occurred when I’ve skinned VALVe’s or some other official author’s textures, but for some reason it wants to fuck shit up on custom-made textures. So what the heck?

Post your vmt.

Here. The phong values are temporary.


"VertexlitGeneric"
{
	"$basetexture" "models/props_vehicles/Terminator/hktank/HKTankBody1"
	"$bumpmap" "models/props_vehicles/Terminator/hktank/HKTankBody1_n"

	"$phong" "1"
	"$phongboost" "50"
	"$phongexponent" "1"
	"$phongfresnelranges" "[1 1 1]"
}


Add


"$model" 1

If your looking at it in model viewer its seemingly random if it shows phong or not, and when it does its nothing like it is ingame.

Otherwise i’m not sure why it wouldn’t show, especially with a white alpha on the bumpmap and a phongboost of 50, it should be blinding you.

Really? It has always worked properly for me… You have to tick “Normal Map”, though.

I can’t tick normalmap, it crashes.

Adding the “$Model” helped. Thank you.

Good to know, then my problem seems to be to do with HLMV not my VMTs (though I don’t have to add $model 1 to get phong to work in-game).

Try this. I used to use a different set of phong options and it always looked overpowered in game, but ever since I changed to these options and the L4D model viewer, it is very close to as it is ingame.


$phong 1
$phongboost 2
$phongexponent 7
$phongtint "[1 1 1.3]"
$phongfresnelranges "[.2 .3 2]"

If it’s still overpowered ingame using that, try using the L4D model viewer for everything.

Bumping with a new problem. $basealphaenvmapmask doesn’t work. The texture’s alpha channel has inverted black and white (And no, it’s not matte black or matte white, I have a mask) so it should show up, but it doesn’t. Here’s the VMT.


"VertexlitGeneric"
{
    "$basetexture" "models/props_vehicles/Terminator/hktank/HKTankBody1"
    "$bumpmap" "models/props_vehicles/Terminator/hktank/HKTankBody1_n"
    "$basealphaenvmapmask" "1"
    "$envmap" "env_cubemap"

    "$phong" "1"
    "$phongboost" "1"
    "$phongexponent" "120"
    "$phongfresnelranges" "[1 1 1]"
}


When using a normal map you can’t put the specular map in the alpha channel of the diffuse map. Put it in the normal map alpha channel instead and change


"$basealphaenvmapmask" "1"

to


"$normalmapalphaenvmapmask" 1

Alright, I’ll do that. According to the Valve Dev Wiki $basealphaenvmapmask should work, though.

Nope.

Ah, didn’t notice that. Give me Bad Reading.