Need help with phong lighting. (Hat)

mikehall

L1: Registered
Mar 7, 2012
2
0
I know this isn't about a TF2 map, but it's close enough. This is probably the best place for me to get a good answer.

So I made this hat for TF2, went through the little itemtest gizmo, and got this far LINK.
As you can see, the lighting is way off. It's not supposed to look green at all. It should look something more like this render I did in Blender LINK.
I did a little research and discovered it needed an effect called phong as seen in this dude's hat LINK. So I made a normal map, recompiled it, and used the .vmt settings from the Pyro's traffic cone hat. This, LINK, seen in in Model Viewer, is as far as I've gotten. As you can see, the light goes absolutely bananas on this thing. The intensity varies from different angles, and at some points the lighting is just a smooth gradient across the model.

I've tried messing with phong settings, but I'm kinda shooting blindly that way. It still seems like there's some sort of texture problem, not a settings issue. Any advice?

Oh, and because I know you'll probably ask for it, here's the .vmt:
Code:
"VertexlitGeneric"
{
	"$baseTexture" "models/player/items/sniper/Coonskin Hat/Coonskin Hat_color"

	"$bumpmap" "models/player/items/sniper/Coonskin Hat/Coonskin Hat_normal"

	"$yellow" "0"
	"$one" "1"


	"$phong" "1"
	"$phongexponent" "15"
	"$phongboost" "1"	
	"$lightwarptexture" "models/player/pyro/pyro_lightwarp"
	"$phongfresnelranges"	"[2 1 5]"
	"$halflambert" "1"

	// Rim lighting parameters
	"$rimlight" "1"												// To enable rim lighting (requires phong)
	"$rimlightexponent" "4"										// Exponent for phong component of rim lighting	
	"$rimlightboost" "2"										// Boost for ambient cube component of rim lighting

	// Cloaking
	"$cloakPassEnabled" "1"

	"Proxies"
	{
		"spy_invis"
		{
		}
		"AnimatedTexture"
		{
			"animatedtexturevar" "$detail"
			"animatedtextureframenumvar" "$detailframe"
			"animatedtextureframerate" 30
		}
		"BurnLevel"
		{
			"resultVar" "$detailblendfactor"
		}
		"YellowLevel"
		{
			"resultVar" "$yellow"
		}
		"Equals"
		{
			"srcVar1"  "$yellow"
			"resultVar" "$color2"
		}

	}
}

Thanks for any help.

Edit: On a side note, jigglebones are proving to be an absolute nightmare as well.
 
Last edited:

mikehall

L1: Registered
Mar 7, 2012
2
0
Success!!
LINK LINK

Turns out the problem the whole time was Blender's .obj files. I exported the hat as .smd and it works fine! Huzzah!