This article relates to the game "Half-Life: Alyx". Click here for more information.
This article relates to the workshop tools for "Half-Life: Alyx". Click here for more information.
This article's documentation is for Source 2. Click here for more information.

Half-Life: Alyx Workshop Tools/Animgraph/Debugging AnimGraphs

From Valve Developer Community
Jump to: navigation, search

English (en)русский (ru)
... Icon-Important.png

The AnimGraph editor has support for debugging graphs, in addition to creating them.

Debugging AnimGraphs-128484257.png

AnimGraph Debug Replay

When the AnimGraph Editor is in Preview Mode, it saves a buffer of the last several frames. The bar at the bottom of the timeline control panel will fill up as the buffer fills, and at any time you can click on that timeline bar to see what the state of the graph was at that time.

Debugging AnimGraphs-128484258.png

Replay buffers are a fixed size, so they will not continue to use memory when used for a long time, but that means they only hold that last few seconds of data.

Replay buffers can be saved and loaded in the editor, and they can be recorded from entities during a running game. Note that these buffers are only suitable for debugging and not as a user-facing feature for a game, as tend to be large and they are not guaranteed to still work if the code for the animation graph changes.

To load a recording in the editor, click the Load Replay button (Load Replay) on the timeline control panel

Console Commands

  • ent_animgraph_debug, cl_ent_animgraph_debug: Displays the entity's current path and its forward, look, facing, and move directions
  • ent_animgraph_record, cl_ent_animgraph_record: Starts recording the animgraph of an entity on the server or client. Parameters can be the entity's ID or its class name. When used without parameters the entity selected is the one at middle of the screen.
  • save_animgraph_recording, cl_save_animgraph_recording: Saves all active recordings to disk on the server or client. Files are saved to game\<mod>\SAVE\animgraph with the type of the entity, the date and time.

Visualizing Replay Data

Most of the areas of the graph display some information about their status during replays and in preview mode.

Preview Window

Debugging AnimGraphs-128484279.png

Graph View

The graph view will highlight the active branches of the graph in blue. Nodes will light up orange when they are reset

Debugging AnimGraphs-128484265.png

State Machines

The State Machine Editor will highlight the current state and the transition from its previous state in blue

Debugging AnimGraphs-128484274.png

Inputs and Parameters

The values of the main inputs and the parameters will all reflect what their values were at the end of the current frame

Debugging AnimGraphs-128484275.png

Node Info

The Properties panel will include detailed information about the status of the selected node, including its cycle, the root motion it is producing, and the status of its foot motion (if configured)

Debugging AnimGraphs-128484267.png

Node Preview

The Properties panel will show a preview of the pose coming from the selected node, before it gets blended or changed by any of its parent. If you are seeing an error in the final animation of your graph, you can click on each node to see what its pose is and quickly identify the source of the problem.

Debugging AnimGraphs-128484272.png


The list of tags will show lights that are green of the the tag is active and green if it isn't

Debugging AnimGraphs-128484276.png