$model: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(15 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<code>$model (name) (filename)</code>
{{disambig}}
 
<code>$model</code> is used differently in two contexts:
* Specifies the smd file to be load. Used mainly for characters when the model needs complex parameters like eyes, flexes etc. In other cases, use $body.
*See [[$model (VMT)]] for the $model [[VMT command]] used to flag a material as a model skin rather than a brush texture.
 
*See [[$model (QC)]] for the $model [[QC command]] used to specify a reference mesh when compiling models.
* Specifies a reference smd file to be used as part of this model.
 
==Description==
 
$model "name" "smd"
 
Used mainly for characters when the model needs complex parameters like eyes, flexes etc. In other cases, use [[$body]].
 
==Parameters==
* <code>name</code> can be any thing as it is only used in [[HLMV]].
 
* <code>smd</code> is the path to a reference smd, relative to the [[$cd|current path]].
 
==Example==
$modelname "weapons/shell.mdl"
$cdmaterials "models/weapons/"
'''$model "Shell" "shell.smd"'''
$sequence "idle" "shell.smd"
 
==$model options==
 
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 walleyed. Not setting this correctly will result in your either 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 (name)
* (name) Base name of the eyelid flexcontroller. This is combined with the "lowerer", "neutral", and "rasier" 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) that it can be found, 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 (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]]

Latest revision as of 17:34, 28 January 2024

Icon-disambig.png
This is a disambiguation page, a list of pages that otherwise might share the same title.
If an article link referred you to this title, you might want to go back and fix it to point directly to the intended page.

$model is used differently in two contexts: