Menu
Lumberyard
Legacy Reference

Character Animation Files

To create character animation files, you start by animating character skeletons and hierarchies in a DCC tool. You then use your DCC tool to export these elements to the intermediate .i_caf file format. They are then compressed and optimized to the .caf before Lumberyard can use them.

Lumberyard's animation system uses the following files to create animations for your characters.

Character Asset File (*.chr)

The character used for animations is defined in a .chr file. For animation, the two important aspects of a character are the morph targets and the skeleton.

Character Definition File (*.cdf)

Characters are usually combinations of a primary model and several attachments. In particular, the head is often considered a skin attachment that is a separate model attached to the body. This composite model is defined in the .cdf file and contains a reference to the .chr file and its attachments.

Intermediate Character Animation File (.i_caf)

The intermediate character animation file contains the animated bone data for a specific character. This file can be used with multiple characters with similar bone structures. The file is created by a DCC tool and stores animation data in uncompressed format. It is usually used with a skinned mesh.

Animation Settings File (.animsettings)

The animation settings file contains per-animation compression settings. This is a sidecar file that is stored next to the .i_caf file and describes how it should be compiled by the Asset Pipeline. This file is created using Geppetto for importing animations.

Skeleton Alias File (SkeletonList.xml)

This file provides a table that maps skeleton aliases used in the .animsettings file to skeleton file names. This file contains skeleton structure information that is needed during animation compression.

Character Animation File (*.caf)

Assets, such as bones, are stored in .caf files. Because they are considered on demand assets, these files are streamed in and out as needed. This file is the compressed version of the intermediate .i_caf file and uses lossy compression. Character animation files are created by Lumberyard Editor during the asset build, and are loaded by the game at runtime.

Character Parameters File (*.chrparams)

Skeletal character parameters are defined in the XML .chrparams file. This file has the same name as the .chr character file to which it refers.

Animation Database (.dba)

A .dba file consists of multiple animations (character, player, AI, weapons) that are streamed in and out together. These files are typically smaller and take up less memory than individual animations (.caf files). Single .caf files are no longer needed unless they are on-demand assets.

If an animation is in a .dba file, it will not be available anymore as an individual .caf file. If the game tries to play one of these animations, the database containing that animation loads instead. As this can take a while, make sure the .dba is preloaded.

When two animations in the same .dba file have exactly the same animation for a joint, the data for that animation is stored once. This can provide significant memory savings.

The .dba files are created by the Resource Compiler after compressing the individual animations (.cafs), according to the DbaTable.xml file. The .dba file must be defined in the .chrparams file.

Typical animations that get stored in the .dba include:

  • Animations that need to be individually loaded and unloaded.

  • Animations that need to be accessed once on demand, such as track view (cinematic) animations. These animations are preloaded a couple of seconds before starting.

Note

Aimposes, Lookspace, .bspace, and .comb files cannot be stored in a .dba database.

Animation Database Table (DbaTable.xml)

The animation database table contains a list of .dba files, which the resource compiler uses to determine which .caf animations to put in which .dba files. Here is an example:

<DBAs> <DBA Path="Animations\human\male\hits_1p.dba"> <Animation Path="Animations\human\male\hits\1p\stand_tac_hit_generic_add_1p_01.caf"/> <Animation Path="Animations\human\male\hits\1p\stand_tac_hit_knockDown_1p_01.caf"/> <Animation Path="Animations\human\male\hits\1p\stand_tac_idle_reactExplosion_3p_01.caf"/> </DBA> <DBA Path="Animations\human\male\locomotion.dba"> <Animation Path="Animations\human\male\locomotion\kneel\kneel_tac_AimPoses_idle_01.caf"/> <Animation Path="Animations\human\male\locomotion\kneel\kneel_tac_death_01.caf"/> <Animation Path="Animations\human\male\locomotion\kneel\kneel_tac_idle_01.caf"/> <Animation Path="Animations\human\male\locomotion\kneel\kneel_tac_stepRotate_90_lft_01.caf"/> </DBA> </DBAs>
Animation Events Database (.animevents)

This database stores a list of assets with timed event markups. For example, it might store footstep sounds. You use the Geppetto to create this database, which gets mapped to the .chrparams file.

Blend Space (.bspace)

Blend spaces (Bspaces) define how multiple animation assets are blended together. Blend spaces are parameterized at runtime with movement parameters such as movement speed, movement direction, turning angle, or slope.

BlendSpace Combination (.comb)

This file combines multiple blend spaces into one, usually of a higher order, and represents a multidimensional blend space.

Group Files (*.grp)

Group files are exported animation sequences in XML format that are used for track view animation sequences. Data stored in a sequence includes everything from audio positions to skeletal animations and camera paths used.