CryMannequin is a high-level animation system. The main goals of the system are:
The CryMannequin editor builds an animation database which is then queried by the game code whenever an animation is requested. This query process will then select the best match based on additional context information (character stance, health, equipment, etc).
CryMannequin relies on the following concepts. It is important to understand this naming convention to avoid confusion when using the system.
The following screenshot shows where these elements appear within the CryMannequin editor UI.
To create a new fragment ID, just click the "New ID..." button and enter the name you wish to create.
To bind some scopes to a fragment, first select the fragment ID you wish to update and then click the "Edit ID..." button. In the window that pops-up, you can check the scopes you'd like your fragment to work on. You can also assign a fragment specific tag definition file.
You can create a new fragment from scratch or copy/paste an existing one. To create a new fragment, just select the appropriate Fragment ID in the Fragment Browser window and click the "New" button. To copy an existing fragment, drag and drop with a right click the fragment you'd like to duplicate.
Animation and procedural clips are sequenced using animation and procedural layers. You can create a new layer by right-clicking on a scope in the Fragment Editor window and the selecting "Add Track". To add a new entry inside a layer, you just need to double-click in the track-view where you want the clip to be created. Selecting a clip lets you then edit its properties.
To create a synchronized combat animation, you first need to make sure that the FullBody and at least one Slave scope are active for the Fragment ID you want to work on. Then, just create one animation layer on each scope and pick the appropriate animation from the list. This will take care of playing both attacker and target animations simultaneously.
To setup the character alignment for the attack, you need to add a "CombatAlignment" procedural clip or edit the existing one. In the properties of this clip you can setup an ideal attack range for the target. The game will then make sure that the target slides in position within this range. The following screenshot shows a typical setup for a synchronized melee attack with character alignment:
The min and max distance to target parameters are used to find out whether character sliding is necessary or not. The "turnAngle" and "selectionWeight" parameters aren't used yet. The "slideDistribution" parameter determines whether the player should slide towards its target (value of 1), whether the target should slide (value of 0), or if both characters should slide (any value in between). 0.5 is a good default value for this setting as it implies that both characters are going to slide equally.
By default, both the attacker and the target are going to spawn at the exact same position in the preview window and then they are going to slide so that the ideal target distance is reached. You can however change the initial target position for preview/debugging purposes by creating a new parameter called "targetStartLoc" on the "Params" track. Make sure that this parameter is located on the first frame of your fragment and use the gizmo in the 3D view to move it around. You can hit "e" and "w" in the 3D view to toggle between the translation and rotation gizmos. The following screenshot shows up the proper setup for this feature:
When using parametric animations for melee attacks, please make sure that all the animations within the same blend-space are indeed blendable (i.e.: they share the same properties, such as number of foot plants). This is crucial as breaking this rule will prevent sound designers to properly setup footstep sound effects and will generate incorrect blended results. Footstep timing does not have to be strictly identical across all the animation clips though: animations can be broken down into individual segments to deal with this type of complex scenarios.
CryMannequinForProgrammers.ppt