Skip to main content

Rukhanka Animation Runtime Architecture

Overview​

A high-level overview of the runtime Rukhanka Animation 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.

info

The controller and fill systems are optional for rigs driven entirely by a scripted animator. Keep them enabled if other rigs in the same world use Animator Controllers. Each rig's submission buffer should have one owner.

Animation Culling System​

If the entity bounding box outside configured frustums, skip animation processing for this entity.

CPU Animation Processing Path​

info

Baked rigs contain GPUAnimationEngineTag. Its disabled state selects the CPU animation path.

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 poses are created from animated bone poses and they are written into the SkinPose buffer.

GPU Animation Processing Path​

info

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 poses directly to the GPU buffer for later use by MeshDeformationSystem.

Mesh Deformation System​

After animation data has been calculated by either engine, skinning and blend shapes are applied on the GPU. With preskinning, compute shaders produce a deformed vertex buffer. With in-place skinning, deformation runs in each mesh vertex shader pass instead. Animation engine selection and skinning mode are separate choices.

info

Through the documentation CPU and GPU animator differences are presented in tabs:

CPU Animator specific information