$ambientocclusion: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Added a little on it to get it started, needs more.)
Line 1: Line 1:
{{todo|Add info on what it is, find out wether it is only for L4D or all Orangebox engine games?}}
{{stub}}
{{todo|Add info on what it is, find out whether it is only for L4D or all Orangebox engine games?}}
 
== Using Ambient Occlusion ==
 
=== Example VMT Syntax ===
The following example is taken from [[Left 4 Dead]] from the model material located in <code>L4D root/materials/models/survivors/teenangst/teenangst_eyeball_l.vmt</code>
 
<pre>
EyeRefract
{
$Iris "models/survivors/green_iris2"
$AmbientOcclTexture "models/survivors/survivor_eye_ao"
$Envmap "Engine/eye-reflection-cubemap-"
$CorneaTexture "Engine/eye-cornea"
$EyeballRadius "0.6"
$AmbientOcclColor "[.4 .4 .4]" Default 0.33, 0.33, 0.33
$Dilation ".5"
$ParallaxStrength "0.25"
$CorneaBumpStrength ".5"
$halflambert 1
$nodecal 1
$ambientocclusion 1
 
$RaytraceSphere 1
$SphereTexkillCombo 0
}
</pre>
 
=== VMT Paremeters ===
The following is a list of VMT parameters that are needed to enable the Ambient Occlusion:
<code>$AmbientOcclusion "0/1"</code> - Disable/Enable Ambient Occlusion. (1 = enabled, 0 = disabled)
<code>$AmbientOcclColor "[.n .n .n]"</code> - Replacing n with a number of the color
<code>$AmbientOcclTexture "path/to/vtf"</code> - Filename of the ambient occlusion texture to use
 


== See also ==
== See also ==

Revision as of 16:39, 26 November 2008

Stub

This article or section is a stub. You can help by expanding it.

Todo: Add info on what it is, find out whether it is only for L4D or all Orangebox engine games?

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

EyeRefract
{
$Iris "models/survivors/green_iris2" 
$AmbientOcclTexture "models/survivors/survivor_eye_ao" 
$Envmap "Engine/eye-reflection-cubemap-" 
$CorneaTexture "Engine/eye-cornea" 
$EyeballRadius "0.6" 
$AmbientOcclColor "[.4 .4 .4]" Default 0.33, 0.33, 0.33
$Dilation ".5" 
$ParallaxStrength "0.25" 
$CorneaBumpStrength ".5" 
$halflambert 1
$nodecal 1
$ambientocclusion 1

$RaytraceSphere 1 
$SphereTexkillCombo 0 
}

VMT Paremeters

The following is a list of VMT parameters that are needed to enable the Ambient Occlusion: $AmbientOcclusion "0/1" - Disable/Enable Ambient Occlusion. (1 = enabled, 0 = disabled) $AmbientOcclColor "[.n .n .n]" - Replacing n with a number of the color $AmbientOcclTexture "path/to/vtf" - Filename of the ambient occlusion texture to use


See also