$surfaceprop
$surfaceprop
is a QC command available in all Source games.
It is also available as a shader parameter. It links the surface of either a material or model to a set of physical properties, including:
- What sounds are emitted during collisions
- What effects are emitted when the surface is shot
- Mass, buoyancy, bounciness...
- The effect of the surface on nearby sounds (reverberation, echo, absorption...)
Contents
Syntax
Syntax is the same for both models and materials:
$surfaceprop <name>
Names are defined in <game>\scripts\surfaceproperties_manifest.txt
(and the files it references). For a list of Valve's stock props, see Material surface properties.
![Icon-Bug.png](/w/images/thumb/b/b4/Icon-Bug.png/10px-Icon-Bug.png)
![Left 4 Dead](/w/images/thumb/a/ad/Icon-L4D.png/16px-Icon-L4D.png)
$surfaceprop
to something else to fix it, such as concrete.![Confirm.png](/w/images/thumb/2/2e/Confirm.png/10px-Confirm.png)
![Left 4 Dead 2](/w/images/thumb/8/8b/Icon-L4D2.png/16px-Icon-L4D2.png)
In Materials
$surfaceprop
is not linked to any particular shader, so it can be used at any time.- Only brush based shaders require this parameter.
$surfaceprop
must always be defined within the collision property of the QC file if anything other than the default is to be used, however.
In Models
- It is unclear whether a model's mass is calculated from
$surfaceprop
orprop_data
. - Surface props can be defined for individual bones with
$jointsurfaceprop
. - A static prop can only have one $surfaceprop.