User Guide - Crowd Anim Blueprint

Setting up the Animation Blueprint (ABP)

To enable Crowd Anim Blueprint for your ABP, you must add the Crowd Animation Output node at the end of your ABP, typically before the Output Pose node, as shown below. Everything before this node will be compiled by Crowd Anim Blueprint automatically when the ABP is compiled. If there are no errors, this is all that is required and you’ll be ready to use your ABP with Crowd Anim Blueprint.

Typical usage of the Crowd Animation Output node to enable Crowd Anim Blueprint for an ABP

In some cases, you may have ABP nodes that apply unsupported logic to the final ABP pose, as shown below. In this case, make sure to put the Crowd Animation Output node before the chain of unsupported pose nodes, and Crowd Anim Blueprint will ignore them

The Crowd Animation Output node placed before the chain of unsupported nodes

Supported ABP Nodes

Not all ABP nodes are supported by the Crowd Anim Blueprint compiler. The reference page here lists nodes and features that are currently supported by Crowd Anim Blueprint. It also details any subtle behaviour differences there might be between an Unreal Actor's use of an ABP node and the crowd version of the same ABP node.

Resolving errors in the ABP

In some cases, your ABP may not compile anymore with Crowd Anim Blueprint enabled. When this occurs, you will get an error in the ABP compiler window with details on why. This will most likely be because you use a node or some configuration that is not supported by Crowd Anim Blueprint, as shown in the image below.

Example of an ABP that no longer compiles under Crowd Anim Blueprint due to the usage of an unsupported node

To work around the issue, you can of course simply stop using the offending node in your ABP. If however you'd still like to use the functionality on your Unreal Actors, but do something different for crowd members, there are a pair of nodes available for this purpose.

Using a Crowd Animation Switch (for AnimGraph errors) or Crowd Animation Value Switch (for transition logic errors) allows you to create two paths, one for the crowd and one for runtime.

  • You can then use the offending node as normal for the runtime route, which normal actors will use

  • In the Crowd Anim Blueprint route, you can then provide alternative ABP nodes that do not utilize offending nodes

  • The image below has an example of using this node to remedy the error

The ABP now compiles again under Crowd Anim Blueprint, thanks to the Crowd Animation Switch node

There may be cases where Crowd Anim Blueprint will compile your ABP correctly, but will ignore specific settings that it does not support, such as a custom crossfade duration on a transition. Since it would be annoying for Crowd Anim Blueprint to report these as warnings when there is nothing you can do to resolve them, they are instead reported as “verbose warnings” instead, which are hidden by default.

A verbose warning output by Crowd Anim Blueprint about the unsupported crossfade duration in the transition

Verbose warnings can be enabled with the command below

CrowdAnimBlueprint.VerboseCompilerWarnings 1

Optimizing the ABP for Crowd Anim Blueprint

While Crowd Anim Blueprint runs on the GPU and can execute at a much larger scale than a traditional ABP does, there is still a non trivial amount of work the system has to do. In some cases you may want to optimize your ABP to be more efficient for Crowd Anim Blueprint if you need to squeeze out some more performance.

These things will generally make your ABP slower to process by the system

  • Lots of outgoing transitions from a single state

  • Complex conditions in state transitions

  • Lots of unique parameters

  • Complex chains of pose blend operations

  • Frequent use of "Use Cached Pose" node

Last updated

Was this helpful?