$model: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (clean up)
No edit summary
Line 1: Line 1:
= VMT $model =
The <code>$model</code> command appears twice:
The [[VMT command]] [[$model]] flags this material for use on models rather than brushwork. It is necessary for all materials applied to models.
* Remember that the shader type for models is always [[VertexLitGeneric]], but [[UnlitGeneric]], [[Refract]] and some other shaders should work too.
* Note that [[VMT]]s for models should be placed in the <code>game_directory/materials/models</code> folder relative to <code>game_directory/models/your.mdl</code>.
: It's also good form to throw your .[[TGA]] in there as well, to make it easier for modders to create new skins for your model.
* Try to keep the skin for each model entirely in one texture; using multiple textures on a model is a resource hog.
* See also [[Materials for models]]


== VMT syntax ==
*[[$model (materials)|Materials]]
"$model" 1
*[[$model (QC)|Models]]


= QC $model =
[[Category:Disambiguation]]
The [[QC command]] [[$model]] specifies a reference [[SMD]] file to be used as part of this model.
* Used mainly for characters when the model needs complex parameters like eyes, flexes etc. In other cases, use [[$body]].
* See also: [[Qc eyes]] (helpful SDK tool) and [[Eye Position Setup]].
 
== QC syntax ==
 
$model "<name>" "<reference_model>.smd"
where
; <name>
: can be any thing as it is only used in [[HLMV]].
; <reference_model>
: is the path to a reference.smd, relative to the [[$cd|current path]].
 
== QC example ==
$modelname "weapons/shell.mdl"
$cdmaterials "models/weapons/"
'''$model "Shell" "shell.smd"'''
$sequence "idle" "shell.smd"
 
== QC $model options ==
{{stub}}
; [[eyeball]] "<name>" "<bone_name>" <X> <Y> <Z> "<material_name>" <diameter> <angle> "<iris_material>" <pupil_scale>:
:* '''<name>''' Name of eyeball, used to match eyelid rules.
:* '''<bone_name>''' Name of bone that the eye is parented to, typically the head.
:* '''<X> <Y> <Z>''' World location of the center of the ball of the eye.
:* '''<material_name>''' Material name to use when searching for vertices to consider as the "white" of the eye <used in dynamically texture mapping the iris and cornea onto the eye>.
:* '''<diameter>''' Diameter of the ball of the eye.
:* '''<angle>''' Default yaw offset from "forward" for iris. Humans are typically 2-4 degrees [[Wikipedia:Strabismus|wall-eyed]]. Not setting this correctly will result in either your characters appearing cross-eyed, or if you've compensated by misplacing the ball of the eye, them not tracking side to side. <iris material>Material to use as the iris texture.
:* '''<pupil_scale>''' World scale of the iris texture.
 
; [[eyelid]] "<name>" "<expression_file>" lowerer/neutral/raiser <frame> <height> split <distance> eyeball "<eyeball_name>":
:* '''<name>''' Base name of the eyelid flexcontroller. This is combined with the "lowerer", "neutral", and "raiser" options to build the piecewise blend positions of the eyelid.
:* '''<expression_file>''' The name of the file to find the morph targets.
:* '''lowerer/neutral/raiser <frame> <height>''' One of the three options, the frame number in the <expression_file>, and the distance above or below the center of the pupil that polygon edge of the eyelid crosses the white of the eye.
:* '''split <distance>''' Where to start, on the opposite side of the "0" line, for finding vertices that belong to this eyelid morph target.
:* '''eyeball <eyeball_name>''' Name of the eyeball that will drive this eyelid's flexcontroller.
 
; [[flex]] <name> <expression_file> :
; [[frame]] <frame> position split <distance>:
; [[defaultflex]]:
; [[flexfile]] <expression_file>:
; [[localvar]] <name> <name>:
; [[mouth]] <flexcontroller_name> <bone_name>:
; [[spherenormals]] <material_name> <X> <Y> <Z>:
 
[[Category:QC Commands]]
[[Category:List of Shader Parameters]]

Revision as of 09:26, 31 March 2008

The $model command appears twice: