$ambientocclusion
Ambient occlusion is a shading method which helps add realism to local reflection models by taking into account attenuation of light due to occlusion [Clarify]. Unlike local methods like Phong shading, ambient occlusion is a global method, meaning the illumination at each point is a function of other geometry in the scene. However, it is a very crude approximation to full global illumination. The soft appearance achieved by ambient occlusion alone is similar to the way an object appears on an overcast day. It is globally supported on the EyeRefract shader. The IFM module, when loaded, makes the $ambientocclusion
parameter function on other shaders such as VertexLitGeneric as a means of controlling the intensity of SSAO.
$translucent
or $alphatest
, or all materials on a model where a transparent material has been used without compiling with either $Opaque
or $MostlyOpaque
in the QC file), $ambientocclusion
also causes the material to render the effect for any objects behind the material. (Tested in Source Filmmaker) [todo tested in?]Using Ambient Occlusion
Example VMT Syntax
The following example is taken from Left 4 Dead from the model material located in L4D root/materials/models/survivors/teenangst/teenangst_eyeball_l.vmt
VMT Parameters
$AmbientOcclusion <float>
- Controls strength of Ambient Occlusion. (1 = fully enabled, 0 = fully disabled)
$AmbientOcclColor "[.n .n .n]"
- Replacing n with a number of the color (RGB format)
$AmbientOcclTexture "path/to/vtf"
- Filename of the ambient occlusion texture to use
$ambientocclusiontexture
fit in with all of this?See also
- Phong Materials
- $phong
- $basetexture
- $envmapmask (specular mask)
- $envmap (environment map)
- $selfillum