This article's documentation is for anything that uses the Source engine. Click here for more information.

$animblocksize: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Adds more documentation for other command arguments.)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{LanguageBar}}
{{LanguageBar}}
{{tabsBar|main=$animblocksize}}
{{this is a|QC command|name=$animblocksize}} It changes how animation data is stored within the model.
{{this is a|QC command|name=$animblocksize}} It changes how animation data is stored within the model.


Line 7: Line 8:


==Syntax==
==Syntax==
  $animblocksize (size in K) [nostall] [highres] [lowres] [numframes] [cachehighres] [posdelta <[[float]]>]
  $animblocksize (size in K) [nostall] [highres] [lowres] [numframes <[[int]]>] [cachehighres] [posdelta <[[float]]>]


The optional commands are:
The optional commands are:
Line 19: Line 20:
: This disables high resolution animations.
: This disables high resolution animations.
: This makes animations data be compressed and not stored as frames.
: This makes animations data be compressed and not stored as frames.
; <code>numframes</code>
; <code>numframes</code> {{l4d2|since}}
: Specifies the max amount of zero frames each animation can store with a value between 1 and 4.
: The default is 3.
; <code>cachehighres</code> {{l4d2|since}}
; <code>cachehighres</code> {{l4d2|since}}
; <code>x_and_z_axes</code>
: Sets stored zero frame rotations to be stored in the highest quality.
: alike <code>rotate</code> but only Y axis remain at default value.
; <code>posdelta</code> {{l4d2|since}}
: {{todo|Need test. Why this exists? looks useless}}
: Specifies the range a bone location delta has to be moved to automatically have a [[$bonesaveframe]] created if none were specified.
: The default is 2.0.


==Example==
==Example==
Found in {{l4d2}}, "general_dest_plaster_set.mdl":
Found in {{l4d2}}, "general_dest_plaster_set.mdl":
  $animblocksize 32 nostall highres
  $animblocksize 32 nostall highres
To have the highest quality:
$animblocksize 32 nostall highres cachehighres


==See also==
==See also==
Line 36: Line 43:


[[Category:Modeling]]
[[Category:Modeling]]
[[Category:QC Commands|animblocksize]]
[[Category:Source]]
[[Category:Source]]

Latest revision as of 23:09, 1 October 2025

English (en)Translate (Translate)
edit

$animblocksize is a QC command available in all Source Source games. It changes how animation data is stored within the model.

Normally, all animation data is stored in the .mdl file. If this is specified, all the animation data will instead be written to a .ani file, and when sequences are needed, the data will be loaded on demand. This is helpful for streaming animation data of baked physics. The "size in K" is the block size the animations will be grouped into. Sizes between 4K and 64K are fine, though 16K or 32K has better memory fragmentation characteristics.

Icon-Bug.pngBug:In games with support for compressed (repacked) maps, the client will crash when attempting to load on-demand animation data if the content is packed into the BSP.  [todo tested in ?]

Syntax

$animblocksize	(size in K) [nostall] [highres] [lowres] [numframes <int>] [cachehighres] [posdelta <float>]

The optional commands are:

nostall
If the animation is splitted into sections the first section is saved in the .mdl file. This usually prevents a model from stalling when loaded mid-game, if it has particularly complex animations that otherwise might take some time to load.
highres (in all games since Left 4 Dead)
Animations are stored as frames if lowres is not specified.
This disables low resolution animations.
This makes position animation frames be stored as uncompressed vectors else the are compressed.
lowres (in all games since Left 4 Dead)
This disables high resolution animations.
This makes animations data be compressed and not stored as frames.
numframes (in all games since Left 4 Dead 2)
Specifies the max amount of zero frames each animation can store with a value between 1 and 4.
The default is 3.
cachehighres (in all games since Left 4 Dead 2)
Sets stored zero frame rotations to be stored in the highest quality.
posdelta (in all games since Left 4 Dead 2)
Specifies the range a bone location delta has to be moved to automatically have a $bonesaveframe created if none were specified.
The default is 2.0.

Example

Found in Left 4 Dead 2, "general_dest_plaster_set.mdl":

$animblocksize	32 nostall highres

To have the highest quality:

$animblocksize 32 nostall highres cachehighres

See also