Presentation is loading. Please wait.

Presentation is loading. Please wait.

CRYTEK CONFIDENTIAL © 2011 Crytek GmbH CryMannequin.

Similar presentations


Presentation on theme: "CRYTEK CONFIDENTIAL © 2011 Crytek GmbH CryMannequin."— Presentation transcript:

1 CRYTEK CONFIDENTIAL © 2011 Crytek GmbH CryMannequin

2 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL WHAT IS IT? 2 A generic data-driven high-level animation system Replaces: AnimGraph Weapon animation All other custom animation systems Key Features: Clip sequencing and layering Advanced transitions o Blends, tween animation sequences and layering Coordinates animations across entities Procedural extensions o Coordinating code and animation Game-side action management

3 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL CryAnimation Core animation processing Animation Sequencing DatabaseSequencers Action System ScopesAction Control Game/Sandbox Custom ActionsTagState 3 WHERE DOES IT LIVE?

4 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL KEY REQUIREMENTS 4 Data-driven Animation Ease of adding assets Ease of adjusting playback Ease of adjusting blends between assets Better Game Integration Ensure authored animation perfectly reflects in game results Provide helper control for coordinating animations with game specific effects Scalability – the level of impact on game code is the user’s choice

5 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL CONSEQUENCES FOR CODE 5 No direct referencing of animations Game requests animation fragments by ID (FragmentID) and provides a State (tags) for selection o Required for editor/game parity o Required for data-driven sequences and transitions Hands off the animation control! Game does not directly manipulate animations o Required for editor/game parity o Required for data-driven sequences and transitions Manipulate animations via procedural clips and setting params o Actually results in simpler game-code and more code reuse o Allows for better threading of animation code

6 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL SAMPLE WORKFLOW 6 Animator Authors and exports animations Previews and hooks up new fragments in the editor o Potentially adds new FragmentIDs and Tags o Can setup custom blends if required Coder Creates new action to control animation o May inherit new class or use generic one for simple cases Sets the relevant FragmentID Sets any Fragment specific Tags Bugs Visual -> Animator Functional -> CoderMaybe

7 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL WHAT ARE FRAGMENTS? 7 Fragment == Layered animation sequence Layers of sequences of clips Clips are raw animation assets or custom coded effects Clips can be arranged sequentially and layered on top of each other The basic atomic animation unit Fragments are pushed on as a single element Support Procedural Clips Procedural clips are classes registered from within game-code o Inherit from IProceduralClip or the TProceduralClip<> helper template o Currently need to expose via Scripts\Mannequin\ProcDefs.xml They allow custom code effects to be sequenced and parameterised alongside the animations o Sound effects, entity position adjustment, IK controllers... Can receive inputs from the game via Action Parameters

8 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL ACTION CREATION 8 Action == Game-side class with a state-machine style interface for making fragment requests Create Create new action to control animation o May inherit new class or use generic one for simple cases o Inherit from the IAction interface or the TAction<> helper template Set the relevant FragmentID Set any Fragment specific Tags Set the action’s Priority o Used to manage overlapping actions

9 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL ACTION CREATION 9 Queue Push the action onto the target’s Action Controller o For actors this is accessible via the AnimatedCharacter o This will be pushed on and updated before the next batch of animations are sent off for processing Update The Action can switch Fragments and set Params for procedural clips The Action can do custom game-side work to assist co-ordinating animation and game state o Reload: Handle events to ensure that ammo is installed at the correct time o Locomotion: Changing the FragmentID based on player input

10 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL ACTION SCOPES 10 Scope == A high level animation channel A scope controls where the fragments are triggered Handles different part of the body (Base body, Torso, Legs) Handles different entities (Weapon, Attachments, Target Player) Actions control Scopes Each Scope can only be controlled by a single Action Multiple Actions can be active concurrently, each on different Scopes A single Action can be installed on multiple Scopes o Full body actions such as “Stamp Attack” tend to go across all scopes o Which Scopes an Action uses is generally set in data by which FragmentID is set, but can be specified in code by the Action itself

11 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 11 BaseTorsoWeaponPriority Queue LocomotionIdle LocomotionIdleJump IdleLocomotion JumpIdleReloadLocomotion JumpReload Locomotion JumpReload StampLocomotion Stamp Locomotion Stamp Locomotion Example of scope usage by actions over time ACTION CONTROL

12 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 12 BaseTorsoWeaponPriority Queue LocomotionIdle LocomotionIdleJump IdleLocomotion JumpIdleReloadLocomotion JumpReload Locomotion JumpReload StampLocomotion Stamp Locomotion Stamp Locomotion Initial state. An action controlling basic locomotion holds the base scope and an Idle action currently has control of the torso. ACTION CONTROL

13 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 13 BaseTorsoWeaponPriority Queue LocomotionIdle LocomotionIdleJump IdleLocomotion JumpIdleReloadLocomotion JumpReload Locomotion JumpReload StampLocomotion Stamp Locomotion Stamp Locomotion Game updates and queues up a Jump action. It is on the same scope as the Locomotion but with higher priority so it will interrupt it. ACTION CONTROL

14 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 14 BaseTorsoWeaponPriority Queue LocomotionIdle LocomotionIdleJump IdleLocomotion JumpIdleReloadLocomotion JumpReload Locomotion JumpReload StampLocomotion Stamp Locomotion Stamp Locomotion Locomotion is interruptible and so is automatically added to the priority queue ready for reinsertion at the earliest opportunity. ACTION CONTROL

15 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 15 BaseTorsoWeaponPriority Queue LocomotionIdle LocomotionIdleJump IdleLocomotion JumpIdleReloadLocomotion JumpReload Locomotion JumpReload StampLocomotion Stamp Locomotion Stamp Locomotion Game updates and queues up a reload action. This moves straight to the head of the priority queue. ACTION CONTROL

16 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 16 BaseTorsoWeaponPriority Queue LocomotionIdle LocomotionIdleJump IdleLocomotion JumpIdleReloadLocomotion JumpReload Locomotion JumpReload StampLocomotion Stamp Locomotion Stamp Locomotion Action Controller updates and pushes the Reload onto the Torso and Weapon Scopes. This triggers the character and the weapon animations synchronously. The Idle action is not interruptible and so is terminated and deleted. ACTION CONTROL

17 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 17 BaseTorsoWeaponPriority Queue LocomotionIdle LocomotionIdleJump IdleLocomotion JumpIdleReloadLocomotion JumpReload Locomotion JumpReload StampLocomotion Stamp Locomotion Stamp Locomotion Game updates and queues up a stamp action. This is a high priority action which effects all the scopes. It goes straight to the head of the priority queue. ACTION CONTROL

18 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 18 BaseTorsoWeaponPriority Queue LocomotionIdle LocomotionIdleJump IdleLocomotion JumpIdleReloadLocomotion JumpReload Locomotion JumpReload StampLocomotion Stamp Locomotion Stamp Locomotion The Stamp is pushed on across all the scopes. The existing actions are all non-interruptible and so terminated and deleted. ACTION CONTROL

19 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 19 BaseTorsoWeaponPriority Queue LocomotionIdle LocomotionIdleJump IdleLocomotion JumpIdleReloadLocomotion JumpReload Locomotion JumpReload StampLocomotion Stamp Locomotion Stamp Locomotion The Stamp action hits the ground and pushes on its final FragmentID (StampLand). When we reach the most appropriate blend point the Stamp action is terminated and the Locomotion reinstalled. ACTION CONTROL

20 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL DEBUGGING DEMO 20 In-game debug Mn_debug o In-game display of current actions, fragments & clips o Very useful in conjuction with FRAPS Es_debugAnim o Low-level debug on the actual animation assets on the named entity Dumps Mn_dump o Duration is time in secs to dump, defaults to dumping the entire buffer o Sequence file is saved into Animations\Mannequin\FragmentSequences o Can be loaded into the Editor via the LoadSequence command

21 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL QUESTIONS ? 21 Mannequin’s home on confluence: http://confluence/display/C3/CryMannequin http://confluence/display/C3/CryMannequin


Download ppt "CRYTEK CONFIDENTIAL © 2011 Crytek GmbH CryMannequin."

Similar presentations


Ads by Google