$surfaceprop: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
TomEdwards (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
The [[$surfaceprop]] command is used to tell Source what set of properties a surface has. It is found in both [[material]]s and [[Qc|QC]]s. | |||
The [[$surfaceprop]] is used to | |||
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 <code>scripts/surfaceproperties_manifest.txt</code> and the files linked to from there. For a list of Valve's stock props, see [[Material surface properties]]. | |||
== In materials == | |||
* <code>$surfaceprop</code> 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 <code>[[Prop Data|prop_data]]</code> | |||
* Surface props can be defined for individual [[bone]]s with <code>[[$jointsurfaceprop]]</code> | |||
[[Category:QC Commands|S]] | [[Category:QC Commands|S]] | ||
[[Category:List of Shader Parameters]] | [[Category:List of Shader Parameters|S]] | ||
[[Category:VMT Common]] | [[Category:VMT Common]] |
Revision as of 03:04, 13 July 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