class

AnimationSystem

System that updates all AnimatorComponents each frame Samples animations, computes bone hierarchies, produces skinning matrices

Module
Game
Header
#include "Animation/AnimationSystem.h"
Namespace
Mowo

Evaluation is two-phase: a serial gather pass resolves every animator's components and LOD interval, then the per-animator evaluation (sampling, blending, IK, motion matching, bone palette) fans out across the job system with per-thread scratch — each job writes only its own entity's components, so results are bit-identical to the serial order. Animation events are queued during evaluation and their callbacks dispatched serially afterwards in gather order, never from worker threads.

Public functions

ReturnsNameDescription
voidInitialize
voidShutdown
voidUpdate
voidSetLODFocusUpdate-rate LOD (EX6, UE URO analog): animators beyond a.LODNearRadius from the focus sample every a.LODNearInterval frames (a.LODFarInterval beyond a.LODFarRadius), banking the skipped dt so animation time stays continuous.
voidClearLODFocus
uint64_tGetLODSkippedCount
voidNoteRenderedUE's VisibilityBasedAnimTickOption input: the scene calls this for every skinned animator it draws inside the camera frustum.
uint64_tGetUpdateSerial
uint64_tGetOffscreenSkippedCount
uint64_tGetBudgetDeferredCountUE's AnimationBudgetAllocator: with a.BudgetMs > 0, the evaluation pass is held to that many milliseconds by deferring the lowest-priority animators (offscreen first, then by significance or focus distance) to a later frame with their dt banked.
doubleGetAverageEvalCostMs
voidSetAverageEvalCostMsForTest
voidResolveControllerAssetLoad the animator's authored .manim controller into controller, once.
voidResolveControlRigAssetLoad the component's authored .mcontrolrig into rig, once, off the VFS.
voidResolveRetargeterAssetLoad the component's authored .mretarget into options, once, off the VFS.
uint32_tHydrateAssetsEvery asset an animator in world will need — controller, montage document, control rig, retargeter, pose assets — read now rather than by the first Update that evaluates it, where the VFS reads ran on the game thread inside the frame.
uint32_tHydrateEntityTreeThe same for one spawned tree — the root and every descendant.
boolIsEvalDuringPhysicsEnableda.EvalDuringPhysics: UE's parallel anim evaluation beside the physics step.
voidDeferToPhysicsStep
voidKickDuringPhysics
voidJoinDuringPhysics
voidFinishAfterPhysics
uint32_tGetLastDeferredCount
uint32_tGetLastFootIkFinishCount
doubleGetLastJoinWaitMs

Function details

Initialize

C++
void Initialize(World* world) override

Shutdown

C++
void Shutdown() override

Update

C++
void Update(float deltaTime) override

SetLODFocus

C++
void SetLODFocus(const Vec3& position)

Update-rate LOD (EX6, UE URO analog): animators beyond a.LODNearRadius from the focus sample every a.LODNearInterval frames (a.LODFarInterval beyond a.LODFarRadius), banking the skipped dt so animation time stays continuous. Scene feeds the main camera position each tick.

ClearLODFocus

C++
void ClearLODFocus()

GetLODSkippedCount

C++
uint64_t GetLODSkippedCount() const

NoteRendered

C++
void NoteRendered(AnimatorComponent& animator)

UE's VisibilityBasedAnimTickOption input: the scene calls this for every skinned animator it draws inside the camera frustum. With a.OffscreenInterval > 0, an animator not drawn for two updates samples at least that coarsely (dt banked). Nothing changes until a renderer has noted something, so a headless server is never throttled.

GetUpdateSerial

C++
uint64_t GetUpdateSerial() const

GetOffscreenSkippedCount

C++
uint64_t GetOffscreenSkippedCount() const

GetBudgetDeferredCount

C++
uint64_t GetBudgetDeferredCount() const

UE's AnimationBudgetAllocator: with a.BudgetMs > 0, the evaluation pass is held to that many milliseconds by deferring the lowest-priority animators (offscreen first, then by significance or focus distance) to a later frame with their dt banked. An animator is never deferred more than a.BudgetMaxDeferFrames frames in a row.

GetAverageEvalCostMs

C++
double GetAverageEvalCostMs() const

SetAverageEvalCostMsForTest

C++
void SetAverageEvalCostMsForTest(double ms)

ResolveControllerAsset

C++
static void ResolveControllerAsset(AnimatorComponent& animator)

Load the animator's authored .manim controller into controller, once. Update() calls this itself, so hydration paths only need it when they want the controller live before the first tick. A failed load is not retried — it logs once and leaves controller null.

ResolveControlRigAsset

C++
static void ResolveControlRigAsset(ControlRigComponent& component)

Load the component's authored .mcontrolrig into rig, once, off the VFS. Update() calls this in the serial gather pass so the evaluation fan-out only reads the loaded rig. A failed load logs once and leaves rig null (the animator's pose passes through untouched).

ResolveRetargeterAsset

C++
static void ResolveRetargeterAsset(RetargetComponent& component)

Load the component's authored .mretarget into options, once, off the VFS. Update() calls it in the serial gather pass, so a scene, a prefab and a runtime spawn all pick the asset up without any of them knowing it exists. A failed load logs once and leaves the in-code options standing.

HydrateAssets

C++
static uint32_t HydrateAssets(World& world)

Every asset an animator in world will need — controller, montage document, control rig, retargeter, pose assets — read now rather than by the first Update that evaluates it, where the VFS reads ran on the game thread inside the frame. Called when play starts; anything still unresolved (a later spawn) falls back to the in-frame path. Returns how many animators it touched.

HydrateEntityTree

C++
static uint32_t HydrateEntityTree(World& world, EntityID root)

The same for one spawned tree — the root and every descendant. The sector streamer calls it per restored root inside its spawn budget, so a streamed-in character's assets are read under that budget instead of by the first Update that evaluates it.

IsEvalDuringPhysicsEnabled

C++
static bool IsEvalDuringPhysicsEnabled()

a.EvalDuringPhysics: UE's parallel anim evaluation beside the physics step. The scene arms the next Update with DeferToPhysicsStep when it kicks the step asynchronously; that Update then evaluates only the animators something reads before the step (root motion the character movement consumes, morph channels the morph pass samples) and leaves the rest. KickDuringPhysics gathers and fans those out with no wait, after the DuringPhysics tick group so no actor tick touches an animator a worker holds. JoinDuringPhysics waits for them before the step's write-back moves any transform. FinishAfterPhysics then runs what needs the stepped world — foot IK raycasts and the pose after them — and the serial post-pass (leader copies, sync phases, events). Without a physics overlap the scene never arms it and Update runs everything.

DeferToPhysicsStep

C++
void DeferToPhysicsStep()

KickDuringPhysics

C++
void KickDuringPhysics(float deltaTime)

JoinDuringPhysics

C++
void JoinDuringPhysics()

FinishAfterPhysics

C++
void FinishAfterPhysics()

GetLastDeferredCount

C++
uint32_t GetLastDeferredCount() const

GetLastFootIkFinishCount

C++
uint32_t GetLastFootIkFinishCount() const

GetLastJoinWaitMs

C++
double GetLastJoinWaitMs() const
Generated from Animation/AnimationSystem.h via game.json · Nov 5, 2026Version 1.0.0