$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 [[$staticprop]] [[QC command]] specifies that the model being compiled does not have any moving parts.
The [[QC command]] <code>[[$staticprop]]</code> specifies that the model being compiled does not have any moving parts. Despite the name, it does ''not'' limit the model to use with [[prop_static]].


{{note|Despite the name, compiling with [[$staticprop]] does ''not'' limit the model to use with [[prop_static]].}}
The command:


[[$staticprop]] does apply several useful optimisations to the model, so it should be used whenever possible:
* Removes all bones except the root.
* Permits [[Vrad|VRAD]] to use the object's [[collision mesh]] to calculate [[lightmap]] shadows.
* Performs several other complex optimisations.


* It ''collapses all bones'' in the model into a single, rigid bone; so do not use for models with skeletal animation or ragdoll behavior.
== Example==
* [[Vrad|VRAD]] will use the object's [[collision model]] when calculating [[Lightmap]]s. <!-- surely this only applies when model is used as prop_static ? -->
* {{todo|Other?}}
 
== QC syntax example==


  [[$modelname]] "weapons/shell.mdl"
  [[$modelname]] "weapons/shell.mdl"
Line 17: Line 15:
  [[$sequence]] idle "shell-idle.smd" ''// A default animation is still required''
  [[$sequence]] idle "shell-idle.smd" ''// A default animation is still required''


Note how the command does not accept any parameters.
Note the absence of parameters.


{{otherlang:en}}
{{otherlang:en}}
{{otherlang:en:ru|$staticprop:ru}}
{{otherlang:en:ru|$staticprop:ru}}
[[Category:QC Commands|S]]
 
[[Category:QC Commands|s]]

Revision as of 06:39, 7 January 2009

The QC command $staticprop specifies that the model being compiled does not have any moving parts. Despite the name, it does not limit the model to use with prop_static.

The command:

  • Removes all bones except the root.
  • Permits VRAD to use the object's collision mesh to calculate lightmap shadows.
  • Performs several other complex optimisations.

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 the absence of parameters.

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