CryENGINE uses a highly optimized and compressed animation format which requires additional information for pre-processing steps. The CBA file defines these parameters for animation file processing.
The resource compiler (RC) processing has three stages.
- The first stage is preparing the animation data: using locomotion locator data, transferring root data to the first child (for human), simplifying root path, calculating foot-plants information, etc.
- After this stage the data is in the proper format for compression/quantization stage. This stage prepares animation data in a highly compressed format which is saved as a .caf file.
- The last stage is database creation where a .dba file will be produced. The .dba file has all marked (not excluded from database) animations in one single file. Usually the .dba file is created by the build process.
For each three stages some parameters in the .cba file exist. Animation playback in the CryENGINE is designed to use initial bone transformation if specific controller information for the bone doesn't exist. That means that you can remove all unnecessary controllers that are identical to the bind-pose. This is first stage of the motion-compression pipeline and for this stage you need the base model (reference model) with the maximum number of bones.
The bind poses for all animations should have identical hierarchy inheritance and initial transformations. The .cba file is a regular XML-file. Each top-node called "\AnimationDefinition" is responsible for all animations per reference model. Each AnimationDefinition has default parameters and if need be, per-animation parameters.
Sample .CBA with descriptions
CBA Parameters Guide
Following is the CBA file organized in a table for easy reference:
Starts the node.
Defines the reference model.
The path where the animations of the character will be exported to. This path should be unique to distinguish among individual characters.
For all animations use compression level 2. This value is a multiplier for error threshold. Higher values reduce animation quality and lower the file sizes of the animation. If this value is less than 1 (0...1) then better animation quality output is possible, but at the cost of increased animation size.
<rootquality value="0.0" />
Value for root-path simplification. Change this value only if you have foot-sliding. Higher values increase simplification causing more sliding. Lower values decrease simplification and reduce foot sliding.
Name for compression preset. Not implemented yet.
Path to compiled .dba file.
If this value is 1, the RC can delete position information from an animation if the data is equal to the data from the reference model. Decreases the size of animation.
If this value is 1, the RC can delete rotation information from an animation if the data is equal to the data from the reference model. Decreases the size of animation.
Obsolete. Used to lock feet to the ground to prevent foot sliding.
This enables root-path simplification i.e. root to pelvis transfer, locomotion locator control and foot-plant calculations. The Locomotion Locator modification is just applied on BIP controlled characters.
Different modifications are applied to the weapons because of coordinate differences between first person weapons and characters. If all characters and objects are set up using the guidelines defined for CryENGINE, this should not be necessary.
Distance from the floor for foot-plant detection.
Speed for foot-plant detection.
Force files NOT to be saved to database.
A list of animations that need special handling. If you need to change the parameters for special animation(s), you should specify them here.
<Animation APath="cinematics" SkipSaveToDatabase="1" footplants="NO" DeletePosController="0" DeleteRotController="0" rootquality="0"/>
A path is a substring of animation name. Every animation which has this substring in the filename will use these settings. You can specify the part of the name (cinematics for example) or the full name. Warning! The Resource Compiler uses first strings coincidence. The names for setting are identical as defined above, but without value. Please see example.