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. Dba file has all marked (not excluded from database) animations in one single file. Usually 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 we can remove all unnecessary controllers which are identical to the bind-pose. This is first stage of the motion-compression pipeline and for this stage we need the base model (reference model) with 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.
Below is a sample cba file with descriptions.
<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 containing ALL animation we can use on this model.
<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, 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 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"/>
For all animations that need to detect footplants. Produces foot-plant information.
<HUMAN value="YES"/>
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.
<WEAPON value="NO"/>
We apply different modifications to the weapons because of coordinate differences between first person weapons and characters. If all characters and objects are setup using the guidelines defined for CryENGINE® 2, 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"/>
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.
</SpecialAnimsList>
End tag.
</AnimationDefinition>
End tag.