Menu
Lumberyard
Developer Guide (Version 1.11)

Animation Debugging

Several tools are available for debugging animation issues.

Layered Transition Queue Debugging

You can enable on-screen debug information to see which animations are queued and playing, as well as information about the applied pose modifiers and IK.

Show Per Entity

To show the transition queue for all the character instances of a specified entity:

Copy
es_debuganim <entityname> [0 | 1]
<entityname>

Name of the entity to debug. In a single player game, the player is typically called "dude." Note that the GameSDK example player has both a first person and a third person character instance.

[0 | 1]

Specify 1 or no second parameter to turn it on for this specific entity. Specify 0 to turn it off.

Examples

To turn on debugging for a player with the entity name "dude":

Copy
es_debuganim dude 1

To turn off debugging for an entity called "npc_flanker_01":

Copy
es_debuganim npc_flanker_01 0

Show Per CharacterInstance

You can show the transition queue for all character instances or the ones that have a specific model name.

Copy
ca_debugtext [<modelname-substring> | 1 | 0]
<modelname-substring>

Shows information for all character instances whose modelname contains the specified string.

[0 | 1]

If 1 is specified, all character instances are shown. If 0 is specified, the debug text is turned off.

Examples

To show information on all character instances with "player" in their model name:

Copy
ca_debugtext player

To turn off all transition queue information:

Copy
ca_debugtext 0

Interpreting the Output

Each animation in the transition queue is displayed as in the following example. Key elements of this display are described following the example.

Copy
AnimInAFIFO 02: t:1043 _stand_tac_idle_scar_3p_01 ATime:0.84 (1.17s/1.40s) ASpd:1.00 Flag:00000042 (----------I-K----) TTime:0.20 TWght:1.00 seg:00 inmem:1 (Try)UseAimIK: 1 AimIKBlend: 1.00 AimIKInfluence: 1.00 (Try)UseLookIK: 0 LookIKBlend: 0.00 LookIKInfluence: 0.00 MoveSpeed: 4.49 locked: 1 PM class: AnimationPoseModifier_OperatorQueue, name: Unknown ... LayerBlendWeight: 1.00 ... ADIK Bip01 RHand2RiflePos_IKTarget: 0.24 Bip01 RHand2Aim_IKTarget: 1.00 Bip01 LHand2Aim_IKTarget: 0.00

Text Color

  • When an animation is not yet active, it is in black or green.

  • When an animation is active, it is in red or yellow.

Or in detail:

  • Red Channel = Animation Weight

  • Green Channel = (layerIndex > 0)

  • Alpha Channel = (Weight + 1)*0.5

AnimInAFIFO Line (one per animation)

Copy
AnimInAFIFO 02: t:1043 _stand_tac_idle_scar_3p_01 ATime:0.84 (1.17s/1.40s) ASpd:1.00 Flag:00000042 (----------I-K----) TTime:0.20 TWght:1.00 seg:00 inmem:1
AnimInAFIFO 02

Layer index (decimal, zero-based)

t:1043

User token (decimal)

_stand_tac_idle_scar_3p_01

Animation name (alias) of the currently playing animation, aim/look-pose or bspace

ATime:0.84 (1.17s/1.40s)

ATime:XXXX (YYYYs/ZZZZs)

  • XXXX = Current time in 'normalized time' (0.0...1.0) within the current segment

  • YYYY = Current time (seconds) within the current segment

  • ZZZZ = Expected duration (seconds) of the current segment

ASpd:1.00

Current animation speed (1.0 = normal speed)

Flag:00000042 (----------I-K----)

Animation Flags

Flag:XXXXXXXX (+ybVFx3nSIAKTRLM)

The first number is the animation flags in hexadecimal

Between parentheses you see the individual flags:

char

flag

value

+

CA_FORCE_TRANSITION_TO_ANIM

0x008000

y

CA_FULL_ROOT_PRIORITY

0x004000

b

CA_REMOVE_FROM_FIFO

0x002000

V

CA_TRACK_VIEW_EXCLUSIVE

0x001000

F

CA_FORCE_SKELETON_UPDATE

0x000800

x

CA_DISABLE_MULTILAYER

0x000400

3

CA_KEYFRAME_SAMPLE_30Hz

0x000200

n

CA_ALLOW_ANIM_RESTART

0x000100

S

CA_MOVE2IDLE

0x000080

I

CA_IDLE2MOVE

0x000040

A

CA_START_AFTER

0x000020

K

CA_START_AT_KEYTIME

0x000010

T

CA_TRANSITION_TIMEWARPING

0x000008

R

CA_REPEAT_LAST_KEY

0x000004

L

CA_LOOP_ANIMATION

0x000002

M

CA_MANUAL_UPDATE

0x000001

TTime:0.20

Transition Time

Total length of transition into this animation in seconds (this is static after pushing the animation)

TWght:1.00

Transition Weight

Current weight of this animation within the transition (0 = not faded in yet, 1 = fully faded in)

seg:00

Current segment index (zero-based)

inmem:1

Whether or not the animation is in memory (0 basically means it's not streamed in yet)

Aim/Look-IK Line

Copy
(Try)UseAimIK: 1 AimIKBlend: 1.00 AimIKInfluence: 1.00 (Try)UseLookIK: 0 LookIKBlend: 0.00 LookIKInfluence: 0.00
(Try)UseAimIK: 1

Whether Aim IK is turned on or not (set using PoseBlenderAim::SetState)

AimIKBlend: 1.00

Weight value requested for Aim IK (could go up and down based on fade times, etc.)

AimIKInfluence: 1.00

Final influence weight value of AimIK (== smoothed(clamped(AimIKBlend)) * weightOfAllAimPoses)

(Try)UseLookIK: 0

Whether Look IK is turned on or not

LookIKBlend: 0.00

Weight value requested for Look IK (could go up and down based on fade times, etc.)

LookIKInfluence: 0.00

Final influence weight value of LookIK (== smoothed(clamped(LookIKBlend)) * weightOfAllLookPoses)

Parameter Line(s) (only for blend spaces)

Copy
MoveSpeed: 4.500000 locked: 1 TravelAngle: 0.000000 locked: 0
MoveSpeed: 4.500000

Value for the specified blend space parameter (MoveSpeed in this case)

locked: 1

Whether or not the parameter is locked (= unable to change after it is set for the first time)

PoseModifier Lines (if running)

Copy
PM class: AnimationPoseModifier_OperatorQueue, name: Unknown

Displays which pose modifiers are running in this layer. Shows the class as well as the name (if available).

LayerBlendWeight Line (not on layer 0)

Copy
LayerBlendWeight: 1.00

The weight of this layer (0.00 - 1.00)

ADIK Line(s) (only if animation driven IK is applied)

Copy
ADIK Bip01 RHand2RiflePos_IKTarget: 0.24 Bip01 RHand2Aim_IKTarget: 1.00 Bip01 LHand2Aim_IKTarget: 0.00

Displays a list of the animation driven IK targets and their current weight. For more detailed position/rotation information, use the separate cvar ca_debugadiktargets 1.

CommandBuffer Debugging

At the lowest level, the animation system executes a list of simple commands to construct the final skeleton's pose.

These commands are, for example, "sample animation x at time t, and add the result with weight w to the pose". Or "clear the pose".

To enable on-screen debug information to see what is pushed on the command buffer (for all characters), use the following command:

Copy
ca_debugcommandbuffer [0 | 1]

Warning Level

To control when the animation system produces warnings using the ca_animWarningLevel cvar:

Copy
ca_animWarningLevel [0 | 1 | 2 | 3]
0

Non-fatal warnings are off.

1

Warn about illegal requests.

For example, requesting to start animations with an invalid index.

2

Also warn about things like 'performance issues.'

For example, animation-queue filling up. This might 'spam' your console with a dump of the animation queue at the time of the issue.

3 (default)

All warnings are on. This includes the least important warnings; for example, a warning when playing uncompressed animation data.