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
m (Fix first line to improve legibility & improved several lines.)
(Removing deprecated Category)
 
(6 intermediate revisions by 2 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.


Normally, all animation data is stored in the <code>[[MDL|.mdl]]</code> file. If this is specified, all the animation data will instead be written to a <code>[[ANI|.ani]]</code> file, and when sequences are needed, the data will be loaded on demand. This is helpful for streaming animation data of [[Cinematic 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.
Normally, all animation data is stored in the <code>[[MDL|.mdl]]</code> file. If this is specified, all the animation data will instead be written to a <code>[[ANI|.ani]]</code> 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.
 
The <code>nostall</code> option will embed the first [[$sectionframes|block]] in the <code>.mdl</code> 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.


{{bug|In games with support for [[BSPZIP#Compression|compressed]] (repacked) maps, the client will crash when attempting to load on-demand animation data if the content is packed into the [[BSP]].}}
{{bug|In games with support for [[BSPZIP#Compression|compressed]] (repacked) maps, the client will crash when attempting to load on-demand animation data if the content is packed into the [[BSP]].}}


==Syntax==
==Syntax==
  $animblocksize (size in K) ["nostall"]
  $animblocksize (size in K) [nostall] [highres] [lowres] [numframes] [cachehighres] [posdelta <[[float]]>]
 
The optional commands are:
; <code>nostall</code>
: If the animation is splitted into [[$sectionframes|sections]] the first section is saved in the <code>.mdl</code> 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.
; <code>highres</code> {{l4d|since}}
: Animations are stored as frames if <code>lowres</code> is not specified.
: This disables low resolution animations.
: This makes position animation frames be stored as uncompressed vectors else the are compressed.
; <code>lowres</code> {{l4d|since}}
: This disables high resolution animations.
: This makes animations data be compressed and not stored as frames.
; <code>numframes</code> {{l4d2|since}}
: {{todo|What Does this do?}}
; <code>cachehighres</code> {{l4d2|since}}
: {{todo|What Does this do?}}
; <code>posdelta</code> {{l4d2|since}}
: {{todo|What Does this do?}}


==Example==
==Example==
Line 22: Line 38:


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

Latest revision as of 21:03, 16 July 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] [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)
Todo: What Does this do?
cachehighres (in all games since Left 4 Dead 2)
Todo: What Does this do?
posdelta (in all games since Left 4 Dead 2)
Todo: What Does this do?

Example

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

$animblocksize	32 nostall highres

See also