$model: Difference between revisions
Jump to navigation
Jump to search
m (typo & tidy ("listified" attributes, for an easier read)) |
m (clean up) |
||
Line 1: | Line 1: | ||
= | = VMT $model = | ||
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. | * 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>. | * 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>. | ||
Line 8: | Line 7: | ||
* See also [[Materials for models]] | * See also [[Materials for models]] | ||
== | == VMT syntax == | ||
"$model" 1 | "$model" 1 | ||
= | = QC $model = | ||
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]]. | * 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]]. | * See also: [[Qc eyes]] (helpful SDK tool) and [[Eye Position Setup]]. | ||
== | == QC syntax == | ||
$model "name" "smd" | $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" | $modelname "weapons/shell.mdl" | ||
$cdmaterials "models/weapons/" | $cdmaterials "models/weapons/" | ||
Line 29: | Line 30: | ||
$sequence "idle" "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 | :* '''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 | :* '''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 <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:QC Commands]] | ||
[[Category:List of Shader Parameters]] | [[Category:List of Shader Parameters]] |
Revision as of 08:19, 31 March 2008
VMT $model
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 VMTs for models should be placed in the
game_directory/materials/models
folder relative togame_directory/models/your.mdl
.
- 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" 1
QC $model
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 current path.
QC example
$modelname "weapons/shell.mdl" $cdmaterials "models/weapons/" $model "Shell" "shell.smd" $sequence "idle" "shell.smd"
QC $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 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>