Rukhanka Runtime Architecture
Overview
A high-level overview of the runtime Rukhanka architecture looks as follows:
Controller
Animator Controller System
This system works with AnimatorControllerLayerComponent
and advances controllers baked from Unity's Animator Controllers
.
Fill Animations From Controller System
This system uses the output produced by the Animator Controller System
to fill the AnimationToProcessComponent
buffer with animations that need to be played in the current frame for a given entity.
The AnimatorControllerSystem
and FillAnimationsFromControllerSystem
are optional systems. They can (and should) be removed if your are using your own scripted animator.
Animation Culling System
If the entity bounding box outside configured frustums, skip animation processing for this entity.
CPU Animation Processing Path
CPU animation path is taken if the animated entity does not have GPUAnimationEngineTag
or has it disabled.
Animation Process System
Animation tracks for requested animations are sampled and blended to define bone positions for a given animation frame.
Animation Injection Group
RukhankaAnimationInjectionSystemGroup
is a predefined place for systems that want to alter bone poses before they will be applied to the corresponding bone entities and skinned meshes. All IK algorithms reside there.
Animation Application System
Animated bone poses are used to set the position/rotation/scale of corresponding bone entities. Also, skin matrices are created from animated bone poses and they are written into the SkinMatrix
buffer.
GPU Animation Processing Path
GPU animation path is taken if the animated entity has enabled the GPUAnimationEngineTag
component.
GPU Animation System
This is a combined equivalent of the CPU's Animation Process System
and Animation Application System
. GPU path does not have a special animation injection modification point (and, as a result, IK) and produces and writes skin matrices directly to the GPU buffer for later use by MeshDeformationSystem
.
Mesh Deformation System
After animation data has been calculated (either by CPU or GPU paths) it is used to deform skinned meshes. This process is always performed on GPU using compute shaders.
Through the documentation CPU and GPU animator differences are presented in tabs:
- CPU Animator
- GPU Animator
CPU Animator specific information
GPU Animator specific information