$scale: Difference between revisions
Jump to navigation
Jump to search

Note:
Note:
Note:$definebone will cause the defined bone, and the vertices assigned to it, to be scaled from their defined local position instead of the model file's origin.
Warning:
Warning:Negative values cause the prop to become upside-down and flips the textures to the opposite side of their mesh.
m (fixed "$sequence scale" highlighting a curly braclet, rather thsn the $scale command) |
m (Okay ThunderSkill, I'll move the SI information to other pages. Sorry for what happened in the Dimensions article.) |
||
Line 1: | Line 1: | ||
{{lang|$scale|$title=$scale}} | {{lang|$scale|$title=$scale}}__NOTOC__ | ||
The {{ent|$scale}} [[QC command]] multiplies the size of all subsequent model files. it does ''not'' affect values defined in the QC itself (e.g., {{ent|$attachment}} locations). | The {{ent|$scale}} [[QC command]] multiplies the size of all subsequent model files. it does ''not'' affect values defined in the QC itself (e.g., {{ent|$attachment}} locations). | ||
Line 13: | Line 13: | ||
== Example == | == Example == | ||
=== | === {{MdCode|oneclick|$scale}} === | ||
<source lang=php highlight=4> | <source lang=php highlight=4> | ||
$modelname "weapons/shell.mdl" | $modelname "weapons/shell.mdl" | ||
Line 23: | Line 23: | ||
</source> | </source> | ||
=== | === {{MdCode|oneclick|$sequence}} {{MdCode|scale}} === | ||
<source lang=php highlight=3> | <source lang=php highlight=3> | ||
$sequence spin fan_spin.smd { | $sequence spin fan_spin.smd { | ||
Line 30: | Line 30: | ||
} | } | ||
</source> | </source> | ||
==Values for International System of Units== | |||
Values for scaling meshes if the model was based on SI. Unscaled models may have incorrect dimensions. | |||
{| class="standard-table" | |||
! colspan="8" | 1 foot = 16 units | |||
|- | |||
| Millimeters || {{MdCode|oneclick|<nowiki>0,05249</nowiki>}} | |||
|- | |||
| Centimeters || {{MdCode|oneclick|<nowiki>0,5249</nowiki>}} | |||
|- | |||
| Meters || {{MdCode|oneclick|<nowiki>52,496</nowiki>}} | |||
|- | |||
| Kilometers || {{MdCode|oneclick|<nowiki>52496</nowiki>}} | |||
|} | |||
{| class="standard-table" | |||
! colspan="8" | 1 foot = 12 units | |||
|- | |||
| Millimeters || {{MdCode|oneclick|<nowiki>0.03937</nowiki>}} | |||
|- | |||
| Centimeters || {{MdCode|oneclick|<nowiki>0.3937</nowiki>}} | |||
|- | |||
| Meters || {{MdCode|oneclick|<nowiki>39.37</nowiki>}} | |||
|- | |||
| Kilometers || {{MdCode|oneclick|<nowiki>39370</nowiki>}} | |||
|} | |||
==See Also== | |||
[[Dimensions]] | |||
[[Category:QC Commands|scale]] | [[Category:QC Commands|scale]] |
Revision as of 14:32, 21 January 2023


The $scale QC command multiplies the size of all subsequent model files. it does not affect values defined in the QC itself (e.g., $attachment locations).

$scale
only affects model files that come after it in the QC. Specify it before any file references!
$scale
also accepts negative values. This can be used to flip/mirror animations or models if the compiled model is then decompiled. Note that the model's normals will be inverted and will be rotated 180 degrees backwards, this can be easily fixed in a Source engine compatible model editor or by using the angles
parameter in a $sequence block.

$scale
prevents flex animation from working when using the VTA format. This limitation can be bypassed by using the DMX format.
Sequences or animations can be scaled individually by specifying the "scale" option, see below for an example.
Confirm:Does $scale influence this?
Example
$scale
$modelname "weapons/shell.mdl"
$cdmaterials "models/weapons/"
$scale 3 // before any model files such as SMD or DMX)
$body shell "shell_ref.smd"
$sequence idle "shell_idle.smd"
$sequence
scale
$sequence spin fan_spin.smd {
fps 30
scale 3
}
Values for International System of Units
Values for scaling meshes if the model was based on SI. Unscaled models may have incorrect dimensions.
1 foot = 16 units | |||||||
---|---|---|---|---|---|---|---|
Millimeters | 0,05249
| ||||||
Centimeters | 0,5249
| ||||||
Meters | 52,496
| ||||||
Kilometers | 52496
|
1 foot = 12 units | |||||||
---|---|---|---|---|---|---|---|
Millimeters | 0.03937
| ||||||
Centimeters | 0.3937
| ||||||
Meters | 39.37
| ||||||
Kilometers | 39370
|