Please note that as of CRYENGINE 3.5, the CBA file is no longer used. See Transition from CBA to AnimSettings for more information.
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.
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.
<Definitions>
<Animation Definition> <!--starts the node.-->
<!--Defines the reference model. This is needed for removing unnecessary controllers which are identical to the bind-pose.-->
<Model File="/../Objects/Characters/Human/US/NanoSuit/nanosuit_us.chr"/>
<!--The path containing ALL animation we can use on this model.-->
<Animation Path="human/male"/>
<!--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.-->
<COMPRESSION value="2"/>
<!--Name for compression preset. Not implemented yet.-->
<PRESET name="UpperBody"/>
<!--Path to compiled .dba file.-->
<Database Path="human/male/male.dba"/>
<!--This enables root-path simplification i.e. root to pelvis transfer, locomotion locator control and foot-plant calculations. We apply the Locomotion Locator modification just on BIP controlled characters.-->
<LOCOMOTION_LOCATOR value="YES"/>
<!--A list of animations that need special handling. If you need to change the parameters for special animation(s), you should specify them here.-->
<SpecialAnimsList>
<!--Apath 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\! Resource compiler uses first strings coincidence. The names for setting are identical as defined above, but without value. Please see example.-->
<Animation APath="cinematics" SkipSaveToDatabase="1" footplants="NO" />
<Animation APath="Aim" SkipSaveToDatabase="1" compression="0"/>
<Animation APath="additive" Additive_Animation="1"/>
<Animation APath="nw" SkipSaveToDatabase="1"/>
<Animation APath="pistol" SkipSaveToDatabase="1"/>
<Animation APath="hmg" SkipSaveToDatabase="1"/>
<Animation APath="glide" SkipSaveToDatabase="0"/>
</SpecialAnimsList>
<!--End tag.-->
</AnimationDefinition>
</Definitions>
Following is the CBA file organized in a table for easy reference:
Parameter | Description |
---|---|
<Animation Definition> | Starts the node. |
<Model File="/../Objects/Characters/Human/US/NanoSuit/nanosuit_us.chr"/> | Defines the reference model. |
<Animation Path="human/male"/> | The path where the animations of the character will be exported to. This path should be unique to distinguish among individual characters. |
<COMPRESSION value="2"/> | 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. |
<AUTOCOMPRESSION value="0.1"/> | Deprecated. |
<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. |
<PRESET name="UpperBody"/> | Name for compression preset. Not implemented yet. |
<Database Path="human/male/male.dba"/> | Path to compiled .dba file. |
<DeletePosController value="1"/> | 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. |
<DeleteRotController value="1"/> | 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. |
<FOOTPLANTS value="YES"/> | Obsolete. Used to lock feet to the ground to prevent foot sliding. |
<HUMAN value="YES"/> | 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. |
<WEAPON value="NO"/> | 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. |
<FLOORDIST value="0.03"/> | Distance from the floor for foot-plant detection. |
<SpeedXY value="0.03"/> | Speed for foot-plant detection. |
<SkipSaveToDatabase value="1"/> | Force files NOT to be saved to database. |
<SpecialAnimsList> | 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. |
</SpecialAnimsList> | End tag. |
</AnimationDefinition> | End tag. |