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

$animblocksize

From Valve Developer Community
Revision as of 23:09, 1 October 2025 by Jakobg1215 (talk | contribs) (Adds more documentation for other command arguments.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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