$staticprop: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
The [[QC command]] '''<code>$staticprop</code>''' specifies that the model being compiled does not have any moving parts. This allows several useful optimisations to take place, so should be used whenever possible.
The [[$staticprop]] [[QC command]] specifies that the model being compiled does not have any moving parts.  
{{note|Despite the name, a model compiled with [[$staticprop]] does ''not'' always need to be used as [[prop_static]]. It may be placed as [[prop_static]] entity, or as [[prop_physics]] (if it also has [[propdata]] and a [[$collisionmodel]]).}}


{{note|The command does ''not'' have anything to do with [[prop_static]].}}
* [[$staticprop]] does apply several useful optimisations to the model, so it should be used whenever possible:
 
** It ''collapses all bones'' in the model into a single, rigid bone; so do not use for models with skeletal animation or ragdoll behavior.
== Effects ==
** [[Vrad|VRAD]] will use the object's Collisionmodel when generating its Lightmap Shadows. <!-- surely this only applies when model is used as prop_static ? -->
 
** {{todo|Other?}}
* Collapses all bones
* Allows [[Vrad|VRAD]] to cast shadows using the collision model
* {{todo|Other?}}


== QC syntax example==
== QC syntax example==

Revision as of 04:31, 26 April 2008

The $staticprop QC command specifies that the model being compiled does not have any moving parts.

Note.pngNote:Despite the name, a model compiled with $staticprop does not always need to be used as prop_static. It may be placed as prop_static entity, or as prop_physics (if it also has propdata and a $collisionmodel).
  • $staticprop does apply several useful optimisations to the model, so it should be used whenever possible:
    • It collapses all bones in the model into a single, rigid bone; so do not use for models with skeletal animation or ragdoll behavior.
    • VRAD will use the object's Collisionmodel when generating its Lightmap Shadows.
    • Todo: Other?

QC syntax example

$modelname		"weapons/shell.mdl"
$staticprop
$cdmaterials		"models/weapons/"
$body		shell	"shell-ref.smd"
$sequence	idle	"shell-idle.smd"	// A default animation is still required

Note how the command does not accept any parameters.