You should use
$blendmodulatetexture wherever possible, as the improvement in visual quality is immense!
- Incompatible with $normalmapalphaenvmapmask (use $envmapmask instead).
- In Source 2006/2007, incompatible with $basetexturetransform and $detail.
- In Source 2006, incompatible with $envmaptint and $envmapmask.
- Does not work underwater; when viewed through water, the textures will blend as if $blendmodulatetexture were not used.
- Does not display correctly when illuminated with player's flashlight in Half-Life 2.
- Bug:In Alien Swarm, modulation textures are not aligned correctly. Use
$blendmasktransform "center .5 .5 scale 1 -1 rotate 90 translate 0 0"to fix them up.
- Path to a blend modulate texture. See below for more details.
- Transforms the modulation texture before use in the material. Requires DirectX 9.
- The default position is
"center .5 .5 scale 1 1 rotate 0 translate 0 0".
centerdefines the point of rotation. Only useful if
rotateis being used.
scalefits the texture into the material the given number of times. '
2 1' is a 50% scale in the X axis.
rotaterotates the texture anti-clockwise. Accepts any number, including negatives.
translateshifts the texture by the given number of heights/widths. '
.5' will shift it half-way.
- Note:All values must be included!
- Bug:Scaling the texture may cause odd issues where the Texture Lock tool in Hammer will not actually lock the texture in place.
Blend modulate textures
Only two colour channels are read from the texture:
- Biases in favor of
$basetexture; high-value areas will be the most resistant to modulation. 128 is normal.
- The idea is to paint noise and patterns into this channel, so that the edge between the two textures becomes irregular. Valve's snow texture (see right) has lots of ragged edges in the green channel, and even some bootprints. There are also lines painted along the edges of the albedo's bricks that give them a tendency to have snow along their edges.
- Sharpens. 0 makes the transition binary, 255 effectively disables modulation.
- The red channel of Valve's snow modulation texture is a constant 99, which produces a fairly sharp falloff. Using different values in different places has the potential to produce a more complex effect.
There is not always a need for the texture to be high resolution - high frequency blends can be produced from low-res textures.