Skip to content

Animation Layers - Support for simultaneous skeletal animations with blending #833

Description

@Gopmyc

Problem this feature should fix

Currently, CSkinnedMeshRenderer can only play one animation at a time. This limitation prevents developers from:

  1. Layering independent animations: Cannot play multiple animation tracks simultaneously (e.g., base locomotion + upper body action, or idle + gesture)
  2. Reusing animation clips across contexts: Animation combinations must be pre-baked as separate clips instead of dynamically composed
  3. Smooth animation blending: No built-in support for weighted blending between multiple poses

This results in animation clip duplication, increased asset management complexity, and reduced runtime flexibility.

Expected solution

Implement an Animation Layers system in CSkinnedMeshRenderer:

Features:

  • Multiple simultaneous animation layers per renderer
  • Each layer operates independently with its own playback state:
    • animationIndex / animationName
    • currentTimeTicks (per-layer animation time)
    • playbackSpeed (per-layer speed control)
    • isPlaying / isLooping (per-layer playback mode)
    • weight (0.0–1.0, contribution to final pose blending)
  • Blend skeletal poses at the bone level using:
    • Linear interpolation (Lerp) for position and scale channels
    • Spherical linear interpolation (Slerp) for rotation channels
  • Automatic weight normalization (sum to 1.0)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions