Legacy Reference

Streaming Character Animations

Animation can be a very memory-intensive resource. Limited memory budgets, a high number of animated joints and high animation quality requirements makes it undesirable to have all animations loaded in memory all the time. Lumberyard alleviates this issue by streaming asset files in and out as needed.

Animation data is divided into header data and controller data. Given the extreme size difference between controller and header data, only controller data is streamed in and out. The header data for all animations is kept in memory at all times.

Animation Header Data

The header contains generic information for an animation such as filename, duration, and flags. Header data is stored in .CAF files and in the animations.img file.

CAF files contain header information for a single animation, while the Animations.img file contains header information for all animations in the build. The Animations.img file is obtained as a result of processing all the animations using the Resource Compiler.

Animation Controller Data

The controller contains animation curves for each joint's position and orientation values needed to play the animation. Even when compressed, controller data can easily take up more than 95% of the total memory required for an animation.

The controller data for animations is stored in CAF files, which contains controller information for a single animation, and a DBA file, which contains controller information for a group of animations.