Skip to content

"Reflection Tint" material proxy

Vuthakral edited this page Jun 28, 2023 · 9 revisions

Raw Paste

In your VMT file of your object:

	$envmap		"env_cubemap"
	$envmapfallback "path\to\static\cubemap"
	$normalmapalphaenvmapmask	1
	$cmtint		"[ 1 1 1 ]"
	$cmpower	1
	$cmlightsat	1
	$cmmin		0
	$cmmax		1
	$cmldr		1
	$cmhdr		1

	Proxies
	{
		drc_ReflectionTint{}
	}

All values can be safely removed from your VMT if unused

Parameter explanations:

$envmap "env_cubemap" : The cubemap texture you are applying to your material. Leave as "env_cubemap" to use the environment maps used on a map.
$envmapfallback <cubemap> : The static cubemap vtf to use in the event a map does not have any envmaps, or a player has "AMD Accessibility" turned on. If left undefined, it will use the engine default cubemap.
$normalmapalphaenvmapmask : Makes the normal map function as a specular mask for Source's phong lighting. If you are using some unique material setup, you can alternatively use the basemap alpha, but generally you should be sticking to normal alpha.

$cmtint : Draconic Base parameter. Tints the channel of the respective value (xyz -> rgb). (Default: "[ 1 1 1 ]") (Multiplicative.)
$cmpower : Draconic Base parameter. General scale for the entire effect. Values above one are not recommended, but can be done. (Default: 1)
$cmlightsat : Draconic Base parameter. Scale value that determines how much the world lighting saturates or tints your cubemap. (Default: 1)
$cmmin : Draconic Base parameter. Minimum amount the cubemap can be scaled down to. Changing this value to anything higher than 0 can and will create cubemaps which appear even in pitch black spaces. I advise you do not use this for general objects and only use it when needed for objects with self illumination that is masked. (Default: 0)
$cmmax : Draconic Base parameter. Maximum amount the cubemap can be scaled up to, in light environments. (Default: 1)
$cmldr : Draconic Base parameter. Multiplier amount for cubemaps in an LDR map. (see below)
$cmhdr : Draconic Base parameter. Multiplier amount for cubemaps in an HDR map. Generally, you will only want to modify all above parameters BEFORE using either this or LDR mul. You should only use this & LDR mul to correct the cubemaps so they look similar between LDR & HDR maps. (The Draconic Base already tries to do this automatically but it may not be perfect.)

All parameters as well have a "fallback" variant, if the defined fallback needs special settings. Simply add _fb to any of the above to use those. I.e. cmpower_fb, cmtint_fb, etc.

All proxies:

drc_ReflectionTint : As shown above. Simply scales the cubemap with full control of tint in the VMT.
drc_ReflectionTint_EntityColour : ReflectionTint but the base tint is derived from the model's colour (toolguns can affect this.)
drc_ReflectionTint_PlayerColour : ReflectionTint but the base tint is derived from the player's set colour.
drc_ReflectionTint_WeaponColour : ReflectionTint but the base tint is derived from the player's set weapon colur.
drc_ReflectionTint_EyeColour : ReflectionTint but the base tint is derived from the player's set eye colour.
drc_ReflectionTint_PlayerTint1 : ReflectionTint but the base tint is derived from the player's tint1 colour.
drc_ReflectionTint_PlayerTint2 : ReflectionTint but the base tint is derived from the player's tint2 colour.

Clone this wiki locally