Art Pipeline Roadmap

Overview

The Crytek Art Pipeline Chart shows the process to exported engine file formats from their source files; displays connections and dependencies among the various file types to give you a clear picture of the CryENGINE pipeline.

Art and Animation Asset Export Roadmap


Crytek Art & Animation Asset Export Roadmap
Hover your mouse over the file types to get more information.

File Dependency


Crytek File Dependency Roadmap
Hover your mouse over the file types or the circular icons to get more information.

Art Asset Pipeline

CGA and ANM Files

CGA files can only store one default animation. To add additional animations to a .cga file, the remaining animations are exported as .anm files and stored at same path as the .cga file. To associate these .anm files with a CGA file, they use the original .cga file's name as prefix.

Animation Pipeline

Animation Export

Please refer to Animation Startup Guide document for detailed explanation on exporting character animations from DCC and getting them in CryENGINE.

Mapping Animations to a Character

In CryENGINE 3.3.0, the .cal file, .ik file and .setup file have all been merged into a single more manageable file called the .chrparams file. If you are updating from an older CryENGINE Build to 3.3 version, please refer to Creating .chrparams file using Python Script.

Animation Playback

Since around CryENGINE 3.3.0, there have been some slight differences in the way animations are streamed. Assets stored in caf files are considered on demand assets, so they are streamed in when needed, and streamed out after a while of not being used (unleass ca_UnloadAnimationCAF is set to 0). Caf are normally used for animations that don't need their controllers all the time to be resident in memory (eg. one offs, cinematics...).

User can build track/controller information database files (dba files) that contain controllers for a set of animations. Dba files are obtained when running the rc over the cba file, and it is the preferred method of storage for groups of animations that may be requested at any time and require no latency when starting their playback ( e.g. The set of animations needed for character locomotion ).

When using dba files, the animation headers are usually stored in caf files and stored into .img files. Loading the caf file and getting the controller is how it used to work until an optimization was added to initialize the animation header information ( without the controllers ) from .img files when the model is loaded. The .img files should be generated in a pre-process stage from the RC, and loaded when the ca_UseIMG_CAF cvar is 1. Also, ca_UseIMG_AIM should be set to 1 to make sure that information is not missing in the user's build.

It is also important to check the output from the Resource Compiler after processing the cba file, as it will say if any animation could not be compiled into the dba file (the most common issue when animations that should be in a dba files cannot be played).

Characters can associate a dba file with them in the chrparams file, and when the character is loaded, the corresponding dba/s file will be loaded together with it. Also, specific dba's can be requested to be loaded or unloaded if the user knows when they are going to be needing the animations in them soon. For example, animations for specific weapons in Crysis 2 are stored in separate dba files. During the delay for picking up a weapon, the specific dba file for the animations of that weapon is streamed in so when starting to use it, all the animations for that weapon are in memory. When the weapon is discarded and no more animations are needed, the track database can be unloaded. Look for the following functions in CryAnimation: DBA_PreLoad, DBA_LockStatus, DBA_Unload.

Also, to precache a caf animation that you know is going to be played beforehand by increasing its reference count, so that it gets streamed in before starting to play. If not, when starting to play the animation will start streaming and then playing, which could cause some latency from when the animation request was issued to when it really starts to play.
gEnv->pCharacterManager->CAF_AddRef( animPathCRC );
and reduce the reference count to set it back to the real value, so that once that is not played any more its controller information can be unloaded from memory
gEnv->pCharacterManager->CAF_Release( animPathCRC );

In the animation system, the way an asset checks if it's streamed in is usually by checking the flags in the GlobalAnimationHeader for an animation. For outside system, you should be able to use the CAF_IsLoaded function to query for individual animations.

XML File Editing

A lot of the XML files can be easily edited in Notepad and modified by a Tech Artist. This gives the advantage of writing tools, scripts or modifying these XML files dynamically.

The XML files that can be modified using a Text Editor are:

  • .chrparams file.
  • Animations.cba file.
  • .fxl file.
  • .fsq file.
  • .cdf file.
  • .mtl file.
  • .animevents file.
  • LMG file.