Wesley Tack Posted November 30, 2006 Report Posted November 30, 2006 Hi, I've made props with specular maps before, but up to this point I made the specular maps a separate file, like so: door_07.vmt door_07_spec.vmt With this for the door_07.vmt: (This shows my specular maps correct) "vertexlitgeneric" { "$baseTexture" "models\props/door_07" "$model" "1" "$envmap" "env_cubemap" "$envmapmask" "models\props/door_07_spec" } What I would like to do, is place the specular map in the base texture alpha channel. When I copy/paste that same spec map in the alpha channel and compile it, the whole model is being reflected. This is the code I use for when the spec map is in the base texture alpha channel: "vertexlitgeneric" { "$baseTexture" "models\props/door_07" "$model" "1" "$envmap" "env_cubemap" "$basealphaenvmapmask" 1 "$envmapcontrast" 1 "$envmapsaturation" 1.5 "$envmaptint" "[0.4 0.4 0.4]" } The door itself shouldn't reflect, only the window. But the whole door reflects. But it does work when I use a separate _spec file. Anyone know whats up? Or should I just keep using separate _spec files and don't bother? thanks!
PhilipK Posted November 30, 2006 Report Posted November 30, 2006 Well it works if you use the normalmapalphaenvmapmask (alpha in normalmap), so perhaps you need basemapalphaenvmapmask? Worth a try maybe I know I had this problem too but I just used the specs separately or in the normal alpha.
Wesley Tack Posted November 30, 2006 Author Report Posted November 30, 2006 why is this in wip model section? cause I got no place else to go! thx philipk, i'll try it and let you know *edit* nope, didn't work
FrieChamp Posted November 30, 2006 Report Posted November 30, 2006 It's usually a safe bet to post any technical questions in the "engine discussion" section, although the description doesn't really fit in this case. It should be changed actually and I've asked for it before, maybe if we all scream for it it will happen and I won't have to move threads all the time anymore
e-freak Posted November 30, 2006 Report Posted November 30, 2006 put it in the normal map - that's what im doing normally (wordjk ^^)
Wesley Tack Posted November 30, 2006 Author Report Posted November 30, 2006 It's usually a safe bet to post any technical questions in the "engine discussion" section, although the description doesn't really fit in this case. It should be changed actually and I've asked for it before, maybe if we all scream for it it will happen and I won't have to move threads all the time anymore Sorry, I wasn't sure where to post it, since its for a model I thought this was the best bet. I actually doubted between posting it in engine or modeling.. looks like I picked the wrong one e-freak: I dont have normal maps, where do I put it then ?
PhilipK Posted November 30, 2006 Report Posted November 30, 2006 Did you try what I said? If not you will have to use it in a separate file if you don't have a normal map.
Wesley Tack Posted November 30, 2006 Author Report Posted November 30, 2006 yea i did, i posted it, it didn't work. and since I don't use a normal map I'll just do as i did before and keep the spec map separate. Thanks for the help!
PhilipK Posted November 30, 2006 Report Posted November 30, 2006 Np, it's wierd tho they don't have support for spec in the alpha of the diffuse.
Wesley Tack Posted December 1, 2006 Author Report Posted December 1, 2006 There's so much stuff weird about how Valve makes stuff
Campaignjunkie Posted December 1, 2006 Report Posted December 1, 2006 This is kind of a weird quirky hack thing, but I think when you're using the base alpha as the spec, you have to actually invert the alpha channel in Photoshop. At least that's what I remember. I think.
PhilipK Posted December 1, 2006 Report Posted December 1, 2006 hmm the problem here tho is you need to specify that it will use the alpha channel in your diffuse map as specular in the shader.
Campaignjunkie Posted December 1, 2006 Report Posted December 1, 2006 Well that's what "$basealphaenvmapmask" 1 is for. So, I would just use seperate spec files to save time and headaches.
PhilipK Posted December 1, 2006 Report Posted December 1, 2006 so that actually does work? but you need to invert the alpha? weird shit.
Recommended Posts