QC: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 2: Line 2:
:''To learn how to  '''compile a model''', see [[Compiling a model]].''
:''To learn how to  '''compile a model''', see [[Compiling a model]].''


A '''QC''' file is a script which controls the process of compiling [[Studiomdl Data|SMD]]s into a binary [[model]] that can be loaded into a game. The extension stands for [[Wikipedia:Quake C|Quake C]], the programming and scripting language from which the [[Valve Data File]] format was originally derived.
A '''QC''' file is a script which controls the process of compiling [[Studiomdl Data|SMD]]s into a binary [[model]] that can be loaded into a game. The extension stands for [[Wikipedia:Quake C|Quake C]], the programming and scripting language from which the [[Valve Data Format]] was originally derived.


A QC configures the model's location and name, which SMD files are used to provide geometry, [[collision mesh]]es and [[skeletal animation|animation]]s, how the model reacts when shot, and so on.
A QC configures the model's location and name, which SMD files are used to provide geometry, [[collision mesh]]es and [[skeletal animation|animation]]s, how the model reacts when shot, and so on.


{{tip|Shared QC files intended for use with <code>[[$include]]</code> are given the extension <code>qci</code>.}}
{{tip|Shared QC files intended for use with <code>[[$include]]</code> are given the extension <code>qci</code>.}}
== Example ==
Here is a very simple QC file for a solid model without any animation or special properties (click on each command for details):
[[$modelname]] "props_sdk\myfirstmodel.mdl"
[[$body]] mybody "myfirstmodel-ref.smd"
[[$staticprop]]
[[$surfaceprop]] combine_metal
[[$cdmaterials]] "models\props_sdk"
[[$sequence]] idle "myfirstmodel-idle.smd" loop fps 15
[[$collisionmodel]] "myfirstmodel-phys.smd" { $concave }


== See also ==
== See also ==

Revision as of 13:06, 9 January 2009

For a list of QC commands, see Category:QC Commands.
To learn how to compile a model, see Compiling a model.

A QC file is a script which controls the process of compiling SMDs into a binary model that can be loaded into a game. The extension stands for Quake C, the programming and scripting language from which the Valve Data Format was originally derived.

A QC configures the model's location and name, which SMD files are used to provide geometry, collision meshes and animations, how the model reacts when shot, and so on.

Tip.pngTip:Shared QC files intended for use with $include are given the extension qci.

Example

Here is a very simple QC file for a solid model without any animation or special properties (click on each command for details):

$modelname	"props_sdk\myfirstmodel.mdl"
$body mybody	"myfirstmodel-ref.smd"
$staticprop
$surfaceprop	combine_metal
$cdmaterials	"models\props_sdk"

$sequence idle	"myfirstmodel-idle.smd" loop fps 15

$collisionmodel	"myfirstmodel-phys.smd" { $concave }

See also

Template:Otherlang:en Template:Otherlang:en:jp