Difference between revisions of "$surfaceprop"

From Valve Developer Community
Jump to: navigation, search
m
m (fixed that see also section, spelling isn't a common asset anymore i guess)
 
Line 30: Line 30:
 
* Surface props can be defined for individual [[bone]]s with <code>[[$jointsurfaceprop]]</code>
 
* Surface props can be defined for individual [[bone]]s with <code>[[$jointsurfaceprop]]</code>
  
 +
== See Also ==
 +
 +
* [[Material surface properties]]
  
 
[[Category:QC Commands|s]]
 
[[Category:QC Commands|s]]
 
[[Category:List of Shader Parameters|S]]
 
[[Category:List of Shader Parameters|S]]
 
== Addtion links ==
 
 
* [[Material_surface_properties]]
 

Latest revision as of 05:17, 4 April 2014

Русский 한국어

The $surfaceprop command 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.

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 $surfaceprop to something else to fix it.

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 or prop_data
  • Surface props can be defined for individual bones with $jointsurfaceprop

See Also