$surfaceprop: Difference between revisions
Jump to navigation
Jump to search
Bug:(in
) Not including a $surfaceprop in a vmt for brushes will cause the material to take on the sound (and perhaps the other properties as well) of whatever the last material that was interacted with which did have a $surfaceprop defined.
Workaround:Use $surfaceprop "default". [todo tested in ?]
Bug:
Left 4 Dead does not display bullet decals properly on brick surfaces. If you're okay with the decals and visual effects being inappropriate, you can change the
Note:This has been fixed in
Left 4 Dead 2.
No edit summary |
(→Syntax: confirmed, it has been fixed in l4d2) |
||
| Line 19: | Line 19: | ||
Names are defined in <code><game>\scripts\surfaceproperties_manifest.txt</code> (and the files it references). For a list of Valve's stock props, see [[Material surface properties]]. | Names are defined in <code><game>\scripts\surfaceproperties_manifest.txt</code> (and the files it references). For a list of Valve's stock props, see [[Material surface properties]]. | ||
{{bug|{{l4d|4}} does not display bullet decals properly on brick surfaces. If you're okay with the decals and visual effects being inappropriate, you can change the <code>$surfaceprop</code> to something else to fix it, such as concrete.{{ | {{bug|{{l4d|4}} does not display bullet decals properly on brick surfaces. If you're okay with the decals and visual effects being inappropriate, you can change the <code>$surfaceprop</code> to something else to fix it, such as <code>concrete</code>.<br>{{note|This has been fixed in {{l4d2|2}}.}}|only=l4d|hidetested=1}} | ||
== In Materials == | == In Materials == | ||
Revision as of 04:27, 22 November 2025
$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...)
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.
$surfaceprop to something else to fix it, such as concrete.In Materials
$surfacepropis not linked to any particular shader, so it can be used at any time.- Only brush based shaders require this parameter.
$surfacepropmust 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
$surfaceproporprop_data. - Surface props can be defined for individual bones with
$jointsurfaceprop. - A static prop can only have one $surfaceprop.