Skip to main content

Getting Started

Prerequisites

To work with Rukhanka Animation System you need following:

  • Unity 2022.3.0f1+
  • Unity Entities package version 1.0.16 (installed automatically as dependency)
  • Unity Entities.Graphics package version 1.0.16 (installed automatically as dependency)
  • HDRP or URP as required by Entities.Graphics package
  • [Optional] Netcode for Entities package for network animation synchronization support

Animated Object Setup

To make animations work correctly there are some preparation setup steps are required.

Model Importer

Use standard Unity model importer confuguration page to setup required model properties:

  • Uncheck Optimize Game Objects checkbox. Rukhanka need all bone game objects in baking phase.

    Rig Importer

Rig Definition

Rukhanka can get all required information about skeleton rig structure from Unity Avatar. There are several required simple steps to populate Unity Avatar with all necessary rig data:

  1. In the importer window of your animated model switch Animation Type to the Humanoid and press Apply.

    Important

    You must do this for every model (even Generic). By switching to the Humanoid animation type Unity generates publicly available information about the skeleton rig structure that Rukhanka reads.

    You will get an error during the baking process if avatar rig information is not available to Rukhanka.

    Animation Type Humanoid

  2. For Humanoid models configuration process is ended already. For Generic models you need to switch Animation Type of model back to Generic and press Apply.

Authoring Object Setup

Final step is to create authoring GameObject inside Entities Subscene

  1. Place your animated object inside Entities Subscene. For detailed description of this step refer Entites Package documentation.

    Object On Scene

  2. Add Rig Definition Authoring component to newly created object.

  3. Create standard Animator Controller and fill it as you wish (one state with one animation will be a good start).

    Authoring Object Setup

Shaders And Materials

Rukhanka does not render animated objects. It only prepares skin matrices for skinned meshes that are entirely managed by Entities.Graphics package. To be able to render deformed meshes correctly it is required to make Entities.Graphics compatible deformation-aware shader. Read carefully Mesh deformations section of Entities.Graphics package documentation. Make compatible shader using Unity Shader Graph or Amplify Shader Editor as described in the Shaders with Deformation page of this manual. Make and assign all required materials to your animated model.

Material Setup

End Of Setup Process

That's all needed to make Rukhanka be able to convert Animator Controller, all required Animations and own Rig Definition into internal structures. After that runtime systems will simulate state machine behaviour and play requred animations.

IMPORTANT: There is not 100% Unity's Mecanim feature support. Please consult Feature Support Tables for complete information.

Here is video version of the entire Getting Started process