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
(Removing deprecated Category)
(Adds more documentation for other command arguments.)
 
Line 8: 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 21: Line 21:
: 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> {{l4d2|since}}
; <code>numframes</code> {{l4d2|since}}
: {{todo|What Does this do?}}
: 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}}
: {{todo|What Does this do?}}
: Sets stored zero frame rotations to be stored in the highest quality.
; <code>posdelta</code> {{l4d2|since}}
; <code>posdelta</code> {{l4d2|since}}
: {{todo|What Does this do?}}
: 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==

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