Talk:$envmapmask

From Valve Developer Community
Jump to: navigation, search

I won't put this in the main article yet...

I created a Specular mask for my metal door texture, which was basically black (non reflective) apart from some outlines of the seams and around the lock part.

I used this syntax which caused my WHOLE texture to be reflective (very undesired result);

LightmappedGeneric 
{ 
	//Base Texture
	"$basetexture" 	"Toxis/Metal/sub_door_01" 
	"$bumpmap"	"Toxis/Metal/Shaded/sub_door_01_normal"
	"$translucent"	1
	"$alpha"	1
	"$surfaceprop" 	metal 
	
	//Specular stuff	
	"$envmapmask"	  "Toxis/Metal/Shaded/sub_door_01_spec"
	"$envmaptint"     "[ 0.25 0.25 0.25 ]"
	"$envmap"         "env_cubemap"
	"$envmapcontrast" 0 //1
	"$envmapsaturation" .1
}

Note that this is a WORLD MATERIAL not a Model material.

The ONLY way i got the specular mask to work was by copying it into the alpha channel of the Normal map and using "$normalmapalphaenvmapmask" 1

I must stress that this is a LightmappedGeneric material for a world brush. The main article says "Warning: $envmapmask will not work in model materials using $bumpmap."

When it should probably say "Warning: $envmapmask will not work with ANY materials using $bumpmap."

What i don't understand is Valve's textures are exceptions to this rule, i followed their format first, and then came here to see if i was correct in using an $envmapmask, which i wasn't. --Jenkins08 05:02, 23 October 2009 (UTC)