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

mNo edit summary |
mNo edit summary |
||
Line 7: | Line 7: | ||
{{ModernNote|{{Code|style=3|$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 <code>angles</code> parameter in a {{Ent|$sequence}} block.}} | {{ModernNote|{{Code|style=3|$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 <code>angles</code> parameter in a {{Ent|$sequence}} block.}} | ||
{{ModernNote|{{Command|$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.}} | {{ModernNote|{{Command|$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.}} | ||
{{ModernWarning|{{Code|style=3|$scale}} | {{ModernWarning|{{Code|style=3|$scale}} does not affect [[flex animation]] when using the [[VTA]] format. You have to change the size of the model to match {{Code|style=3|$scale}} value, and then export your [[VTA]] file. This limitation can be bypassed by using the [[DMX]] format.}} | ||
{{ModernWarning|{{Code|style=3|$scale}} does not affect {{Ent|$proceduralbones}}.}} | |||
{{ModernWarning|Negative values cause the prop to become upside-down and flips the textures to the opposite side of their mesh.}} | {{ModernWarning|Negative values cause the prop to become upside-down and flips the textures to the opposite side of their mesh.}} | ||
Sequences or animations can be scaled individually by specifying the "scale" option, see below for an example. | Sequences or animations can be scaled individually by specifying the "scale" option, see below for an example. | ||
:{{ | :{{ModernNote|{{Code|style=3|scale}} option will be multiplied with {{Code|style=3|$scale}}. If you make {{Code|style=3|$scale}} 0.5 and {{Code|style=3|scale}} value in {{Ent|$sequence}} 0.5, the final result will be 0.25 from the original size.}} | ||
== Example == | == Example == |
Revision as of 19:21, 18 December 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).
Template:ModernNote Template:ModernNote Template:ModernNote Template:ModernWarning Template:ModernWarning Template:ModernWarning
Sequences or animations can be scaled individually by specifying the "scale" option, see below for an example.
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 |