Animation Blueprints & State Machines
🏃 Animation Blueprints, BlendSpaces & State Machines in UE5
An Animation Blueprint (UAnimInstance) controls the frame-by-frame skeletal deformation of a character in Unreal Engine 5. It separates variable processing (EventGraph) from pose evaluation (AnimGraph).
🏛️ EventGraph vs. AnimGraph
+-------------------------------------------------------------+
| 1. EventGraph (Thread: Worker / Game Thread) |
| - Reads character velocity, ground state, rotation |
| - Caches variables into fast primitive floats/bools |
+-------------------------------------------------------------+
│
▼
+-------------------------------------------------------------+
| 2. AnimGraph (Thread: Parallel Animation Evaluation Task) |
| - Evaluates State Machines (Idle -> Walk -> Run) |
| - Evaluates BlendSpaces & Layered Bone Blends |
| - Applies Control Rig IK foot solvers |
+-------------------------------------------------------------+
⚡ 1. Thread Safety & Property Access in UE5
To enable Fast Path evaluation and run animation calculations multithreaded across all CPU cores:
- Never call heavy functions (
GetActorLocation,Cast<ACharacter>) inside the AnimGraph. - Update pure variables in
NativeUpdateAnimation(float DeltaSeconds)in C++:
void UMyAnimInstance::NativeUpdateAnimation(float DeltaSeconds)
{
Super::NativeUpdateAnimation(DeltaSeconds);
if (APawn* Owner = TryGetPawnOwner())
{
GroundSpeed = Owner->GetVelocity().Size2D();
bIsFalling = Owner->GetMovementComponent()->IsFalling();
}
}
🔗 Related Notes
- 3D Animation & Rigging — Universal 3D animation logic and bone trees.
- Getting Started With 3D Animation — Animation fundamentals.
- Index for Unreal — Unreal C++ architecture.