Difference between revisions of "$surfaceprop"

From Valve Developer Community
Jump to: navigation, search
(Russian language link)
Line 26: Line 26:
 
* 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>
  
 +
{{otherlang:en}}
 +
{{otherlang:en:ru|$surfaceprop:ru}}
 
[[Category:QC Commands|S]]
 
[[Category:QC Commands|S]]
 
[[Category:List of Shader Parameters|S]]
 
[[Category:List of Shader Parameters|S]]
 
[[Category:VMT Common]]
 
[[Category:VMT Common]]

Revision as of 16:16, 2 November 2008

The $surfaceprop command is used to tell Source what set of properties a surface has. It is found in both materials and QCs.

The surface prop controls many aspects of simulation:

  • What sounds are emitted during collisions
  • What effects are emitted when the surface is shot
  • The surface's mass, buoyancy, bounciness...
  • The effect of the surface on nearby sounds (reverberation, echo, absorption...)

Syntax

Syntax is the same in either context:

$surfaceprop <surface prop>

Surface props are defined in scripts/surfaceproperties_manifest.txt and the files linked to from there. For a list of Valve's stock props, see Material surface properties.

In materials

  • $surfaceprop is not a shader parameter, so can be used on any material at all.

In models

  • A model's surface prop will override its material's
  • It is unclear whether a model's mass is calculated from it's surface prop or prop_data
  • Surface props can be defined for individual bones with $jointsurfaceprop

Template:Otherlang:en Template:Otherlang:en:ru