Animation Startup Guide

Overview

The Animation Startup Guide is intended to serve as a roadmap providing comprehensive and easy to use information on creating and exporting animation assets for new users of CryENGINE 3. It also includes numerous links for additional information.

There are three main types of animated data used in CryENGINE:

  • AnimatedHardBodyGeometryData - It only supports directly linked objects and does not support skeleton based animation. It's composed of two filetypes - .cga (Crytek Geometry Animation) and .anm (Additonal Animation).
  • AnimatedCharacterData - It supports positional and rotational data on bones for a specific character. It's stored as a .caf (Character Animation File) file.
  • AnimatedFacialSequence - It supports keyframe animation data for a specific facial animation sequence. It's saved as a .fsq (Facial Editor Sequence) file.

For an overview of the types of files and their functions can be found in the Art Asset File Types document.

Animated Hard Body Geometry Data

An animated hard body geometry data is stored as a .cga file. This file contains a hierarchical hard body geometry with one animation sequence. If you want to have more than one animation sequence for this object, you need to export the additional animations as .anm files.

The .anm files need to be exported in the same path where the corresponding .cga file exists with the cga filename used as a prefix.
Example: If the .cga you exported was named windmill.cga, the additional .anm animation exported should be named windmill_nameoftheanimation.anm.

CGA files must use a TCB controller for both rotation and position tracks.

For more detailed information, please refer to Exporting CGA and ANM documentation.

Animated Character Data

Exporting Character Animation assets involves a bit more steps than exporting animated hard body geometry data.

This startup guide will make it easier for you to export character animation data. It is recommended to follow the following sequence of steps when exporting character animation.

Important

With the release of SDK 3.3.0, Character animations are mapped in a single XML format text file called .chrparams file (this file is a combination of the .cal, .setup and .ik files). CAL and IK files will not be supported anymore with the new and following releases of 3.3.0.

If your build is a version prior to 3.3.0, you can click here to read the old documentation that explains the setup using CAL and IK files: 4C Steps before SDK 3.3.0.

4C Steps

If you are exporting character animation for the first time, following the 4C steps helps you avoid any mistakes and makes it simple to get your custom made animation in game. The chr and cba setup is required only once per character.

1. Exporting the character's chr

Before exporting a character's skeleton animation, make sure you have exported the character's chr. This .chr file will be used as a reference during the exporting process.

If your character is composed of multiple .chr files, you can use any skeleton as a reference for the animation. For the SDK Character, we use the skeleton_character.chr as the reference model.

For more information, please refer to DCC Setup (animated) documentation.

Make sure your .chr file is exported properly and facing Y-positive in the Character Editor.


If you notice any anomalies here, you should debug and re-export your chr before you proceed to the next step.

2. Adding an entry for your character in Animation.CBA file

Once you have exported your .chr file and previewed it in the Character Editor that it conforms to all the rules, you can add the reference to your .chr file in the Animations.cba (Resource Compiler Settings) file.

For more information on Animations.cba file, please refer to The CBA File documentation.

If the character's animation you are exporting has same skeleton to another character that has already been defined in the Animations.cba file, you don't need to add a new entry in that case. Just export your animation to the corresponding character's animation path.

However, if your character is a new character, you need to add an animation definition for your character.

Animations.cba file is located in Game\Animations folder.

Here is what a sample animation definition looks like:

3. Exporting the CAF file

After adding an entry in the Animations.cba file, you are now ready to export your character animation.

For more information on exporting animation assets from your respective DCC tool, please refer to the documentation links below:

Make sure you export your animation to the animation path you specified in the Animations.cba file. You can nest the animation into several folders further but the root folder has to be the one specified in animation path.

4. Adding the CAF file in your Character's CHRPARAMS file

Once you have exported your animations, you need to add an entry for your caf files in the .CHRPARAMS (Character Parameters) file.

A .chrparams file can be easily created using a notepad. It has to have the same name as the .chr file you want to associate it with.

Please refer to the Character Parameters File (.chrparams) documentation for more information.

Here is how your sample entry in a cal file would look like:

You can also use wildcards to avoid adding each animation entry manually:

Great! You have completed 4C step to export your new character animation to CryENGINE. You can now open the Character Editor and preview the animation.

Once you are satisfied, you can check in (if you are using Perforce) your animation asset and ready to test it in game.

Animated Facial Sequence

A facial sequence file stores the animation curves of the expressions over time, as well as an associated sound filename and various other data. Facial Sequences are created in the Facial Editor and saved as .fsq file.

You can learn more about Facial Sequence files here.

To create facial sequence animations, you need to have a character with facial rig or morph expressions setup.

Here are few documentation links to get you started:

And some additional documentation related to facial animation: