Presentation is loading. Please wait.

Presentation is loading. Please wait.

CRYTEK CONFIDENTIAL © 2011 Crytek GmbH CryMannequin (working title) HIGH-LEVEL ANIMATION SYSTEM.

Similar presentations


Presentation on theme: "CRYTEK CONFIDENTIAL © 2011 Crytek GmbH CryMannequin (working title) HIGH-LEVEL ANIMATION SYSTEM."— Presentation transcript:

1 CRYTEK CONFIDENTIAL © 2011 Crytek GmbH CryMannequin (working title) HIGH-LEVEL ANIMATION SYSTEM

2 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL KEY REQUIREMENTS 2 Data-driven Animation Ease of adding assets o Animators should be able to insert new variations of animations easily and without coder intervention or knowledge of game-specific systems. Ease of adjusting playback o Animators should be able to have control over layering and biasing their base animation assets to produce a final look which is used directly in game. o Animators should be able to make use of a suite of procedural fragments as part of their toolkit in authoring an animation fragment. Ease of adjusting blends between assets o Very often animations look great when they are playing, but the transitions between them are poor. This makes the overall flow disjointed and greatly detracts from the look of the animations. o Animators should be able to control how different animations blend into each other and insert tween animations without coder assistance.

3 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL KEY REQUIREMENTS 3 Better Game Integration Ensure authored animation perfectly reflects in game results o We provide a structure such that the editor can be used to perfectly match the end result in game o Greatly simplified game-side control Provide helper control for coordinating animations with game specific effects o Framework ensures that the game code and animation system are always in synch o Assurance that the animation system is always doing what is asked of it Scalability – the level of impact on game code is the user’s choice o Minimal integration for pure animation control o Stronger integration for tighter management of actions

4 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL KEY COMPONENTS 4 Data-driven Animation The core animation system selects and sequences animations working solely from a database Fragments o Animators author fragments of animation. These are small graphs built from sequences and layers of raw animation assets to represent a specific animation state. Transitions o Animators author and edit specific transitions between animation assets. Transitions dictate the timing of blends and can include tween animations. Selection o Specific fragments are selected by a game-side identifier (the FragmentId) and a list of game-side tags that define the animation context (e.g. tired, scar, nervous). Sequencers o The core animation system is built around the sequencing of these animation fragments using the most appropriate transitions. o The sequencers take in FragmentIds and look up appropriate fragments and transitions.

5 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL KEY COMPONENTS 5 Better Game Integration An action based system provides the high level interface into the game and adds coordination via priority and splitting the character into parts Actions o Basic class used to control animation and synchronise with the game. Can combine game code with simple high level animation control by pushing FragmentIds onto owned sequencers. Scopes o Scopes represent a part of the animated character, typical examples being Base, Torso or Head. o Actions can have control of one or more scopes. o Scopes allow the coordination of animation across different entities be they a weapon or another character. Action Controller o A high level controller provides the ability to query scope availability and queue up actions.

6 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL CryAnimation Core animation processing Animation Sequencing DatabaseSequencers Action System ScopesAction Control Game/Sandbox Custom ActionsTagState 6 KEY COMPONENTS

7 CRYTEK DATA-DRIVEN ANIMATION 7

8 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 8 EDITOR COMPONENTS (KEY PATH) Timeline for manipulating and playing back fragment sequences. User places FragmentIds along a timeline. These are decomposed into a secondary track of Fragments and Blends which can then be edited. Sequence Analyser Simple graph edit pane for defining fragments from raw assets and procedural controllers. Fragment Editor Simple edit pane for defining transition blend times and tween animations. Transition Editor

9 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 9 EDITOR COMPONENTS (OCCASIONAL PATH) Edit the list of usable Tags and FragmentIDs. Taglist and AnimStateID Editor Edits the scopes exposed within the editor used by the SequenceAnalyser. Scope Editor

10 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 10 SEQUENCE ANALYSER PREVIEW REFINE DEBUG LoadSave StandMove Scar_StandIdleStand2RunScar_Move RecoilReloadIdle Scar_RecoilLoop Scar_RecoilExitScar_Reload Scar_Idle_01 An integral tool for authoring animation content. The Sequence Analyser sits on top of the core animation system and drives it in the same way as the game would.

11 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 11 SEQUENCE ANALYSER PREVIEW REFINE DEBUG LoadSave StandMove Scar_StandIdleStand2RunScar_Move RecoilReloadIdle Scar_RecoilLoop Scar_RecoilExitScar_Reload Scar_Idle_01 Insert FragmentIDs along the timeline 1 Sequence of assets and blends is generated below 2 Click play to see sequence in the character viewport 3

12 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 12 SEQUENCE ANALYSER PREVIEW REFINE DEBUG LoadSave StandMove Scar_StandIdleStand2RunScar_Move RecoilReloadIdle Scar_RecoilLoop Scar_RecoilExitScar_Reload Scar_Idle_01

13 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 13 SEQUENCE ANALYSER PREVIEW REFINE DEBUG LoadSave StandMove Scar_StandIdleStand2RunScar_Move RecoilReloadIdle Scar_RecoilLoop Scar_RecoilExitScar_Reload Scar_Idle_01 Load sequence information exported directly from game to fix glitches

14 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL FRAGMENT EDITOR 14 Fragments are specific animation states, they are effectively a fragment of a complete sequence. This is intended to complement core CryAnimation functionality and so complex asset mixing can be handled within it through the usage of parameterised animations. Stand_idle_01 LoadSave

15 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL FRAGMENT EDITOR 15 Create sequences by dragging assets onto the timeline. Stand_idle_01 IdleBreak_shiftFeet LoadSave Scrub time and playback in the same manner as the SequenceAnalyser.

16 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL Stand_idle_01 IdleBreak_shif... LoadSave FRAGMENT EDITOR 16 Create random variation by dragging assets onto existing entries. Right-click to tweak random timings and chances. AssetChance IdleBreak_shiftFeet01 10 IdleBreak_relaxStance01 50

17 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL FRAGMENT EDITOR 17 Directly edit blends to customise the default entry and exit blends for the sequence. Stand_idle_01 IdleBreak_shif... Insert default tween animations which can later be overridden. Stand_idle_01 IdleBreak_shif...IdleBreak_exit

18 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL FRAGMENT EDITOR 18 Layer animations by dragging assets into different layers. Stand_idle_01 IdleBreak_shif... RelaxArms01 LoadSave

19 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL FRAGMENT EDITOR 19 Layer procedural effects by dragging them onto layers. Stand_idle_01 IdleBreak_shif... RelaxArms01 Random look around LoadSave

20 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL PROCEDURAL FRAGMENTS 20 Data-driven procedural effects Layering procedural effects onto animations is another way to build up behaviours Procedural animation effects o Parameterised random look or aim arounds o Would typically work by applying and driving poseModifiers Parameterise existing procedural effects o Hook up of look IK and potentially aim IK animations o Allow per animation settings for the look/aim IK o Would typically work by adjusting parameters for existing poseModifiers Simple game extensions exposed to the editor o Would need to support extensions from game code for custom effects

21 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL PROCEDURAL FRAGMENTS 21 Data-driven procedural effects Layering procedural effects onto animations is another way to build up behaviours Manipulate animation playback o Sub-class of Manipulators to provide mapping from game-side parameter to specific animation effects o Example: a layer may wish to be driven from game from 0->1 (off to on) different manipulators could implement this in different ways, from changing additive factors to scrubbing time. o Could also parameterise interpolation rates, allowing animators to author heavy weapons with slower recovery rates. o Could also be used to drive the parameters for parameterised animations leading to a suite of adjustable manipulators to handle typical locomotion tasks

22 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 22 TRANSITION EDITING Transitions are key to smooth flowing animation. CryMannequin allows us to insert and edit blends directly on the Sequence Analyser. Example: Adding stand2Move transitions.

23 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 23 TRANSITION EDITING Right clicking on the target fragment allows us to override the fragment’s standard entry blend with an explicit transition. Transitions are filtered by tags in the same way as Fragments. This allows you to specify high level transitions to cover a whole range of contexts, or very specific ones.

24 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 24 TRANSITION EDITING A transition is inserted, inheriting the existing blend. The blend region can now be dragged to alter the blend duration. New keys can be added to specify tweening animation clips.

25 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 25 TRANSITION EDITING Additionally, new layers of animation can be overlaid. These additional layers can be extended to overlap the destination fragment allowing for more naturalistic transitions.

26 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 26 TRANSITION EDITING Transitions between fragments support procedural clips too and these can be sequenced and layered in the same way as anim clips.

27 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 27 EXAMPLE WORKFLOWS Problem o Under-barrel weapon attachments cause cut through on the fingers Solution o Add new tag UnderbarrelAttachment o Specify new fragments Copy existing fragments Layer on a new additive animation to shift the hand o Sequencer test -> Fail: not all animations work with the additive o Remove additive from these animations & tweak the specific blend on/off for the additive until the result is good for all animations o Sequencer test ->Success o Save and commit database o Coder adds the new tag into game

28 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 28 EXAMPLE WORKFLOWS Problem o Need to reflect AI being nervous Solution o Add new tag Nervous o Specify new fragments Copy existing fragments for Stand and Move Layer on a new additive animation to shift up the arms Layer on a procedural fragment to cause random look-around Tweak procedural parameters until the correct effect is reached o Sequencer test ->Success o Save/commit database o Coder adds the new tag into game

29 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 29 EXAMPLE WORKFLOWS Problem o Glitch in game going from scar grenade launcher recoil to reload Solution o Dump Sequence information from game o Load into Sequence Analyser o Playback and identify cause as a blend on a layer o Tweak blend o Playback and validate o Save and commit database

30 CRYTEK GAME INTEGRATION 30

31 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL In-Game Usage Query Action Controller for availability o The query takes the form of: can I play an action of a given priority on these scopes within n seconds? Often a single query can be used to early out on a range of potential actions. Create custom class or use generic action o This is dependant on the desired level of integration into game code and the complexity of the action. Assign FragmentId, priority and scopes to action o With a custom action these will typically be predefined by that class. Queue up action o Push action onto system. This will be processed on the next system update. o The action is queued up to play at the blend time dictated by the Transition Database, or triggered immediately if its priority trumps what is currently playing. 31

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

33 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 33 Action Controller 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.

34 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 34 Action Controller 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.

35 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 35 Action Controller 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.

36 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 36 Action Controller 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.

37 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 37 Action Controller 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.

38 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 38 Action Controller 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.

39 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 39 Action Controller 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.

40 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 40 Action Controller 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.

41 CRYTEK ALTERNATIVES 41

42 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL GRAPH BASED APPROACHES Size = Complexity o All graphs suffer from the same problem, the more you add the bigger they get & the harder to maintain & predict behaviour it becomes. Dual Control o Graphs have their own control system which then needs to coordinate with the game. This leads to: Added complexity in the graph Added complexity & bugs in game code to manage/track/generally interface with the graph Divided focus o Graph structure is dictated by control flow. This makes actual fine animation control difficult, adding links for blends & transition animations is generally difficult or not possible Exclusive ownership o Because of the complexity of the graph it typically becomes one man’s baby: Bottlenecks Worse integration of anyone else’s assets 42

43 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL 43 GRAPH BASED APPROACHES (CONT) One layer o A graph can only describe what happens on a single layer. To coordinate movement animations with torso actions a second graph is required & additional logic needed to bind the two together Excellent preview tool o A graph acts as a great previewing tool. Anything we do instead needs to be as expressive and visible in its results.

44 CRYTEK © 2010 Crytek GmbH CONFIDENTIAL AnimAction Concerns What chooses the specific AnimAction? o If each AnimAction is specifically setup with its own assets then we’ll need some higher level control to select which AA to use. Previously this was part of the role of AnimGraph or the Weapon Animation code. How do we blend between AnimActions? o No system in place for this and no clear route to extend it. Potential learning curve per AA type o Custom parameterisation could make the addition of new variant AAs non-trivial. How do we manage animations across layers? o Is the AA specifically tied to a single layer or is this something we explicitly parameterise? This also requires an additional system to coordinate. 44


Download ppt "CRYTEK CONFIDENTIAL © 2011 Crytek GmbH CryMannequin (working title) HIGH-LEVEL ANIMATION SYSTEM."

Similar presentations


Ads by Google