How is the implementation of a 'pose' override on an animation usually done?

We are currently exploring different possibilities to include a ‘pose’ for a character, which involves modifying an animation (idle/jump/walk/etc.) to include a weapon in the hand. Despite trying various ways to implement this functionality, we haven’t been able to achieve the desired outcome.

Usage of Layer in the Animator:

  • Unfortunately, we’re unable to modify the weight of individual bones using this setup.
  • Based on our observations, it seems we cannot change the mask at runtime.

Modification of the resulting animation (change the transform once the animation is finished):

  • This is what we are currently doing
  • The challenging part lies in authoring the blending due to the decoupling of the Animator. We have to check which animation is being played or manage blending from our state machine (Attack Begin/Attack End).

Usage of Playable:

  • Using Playable, we would need to rewrite the entire Animator. This would allow us to have more control and achieve the desired outcome precisely. However, this is really extensive job and we do not have the required personnel to do it.

Usage of IK (Rigging Package):

  • We’re uncertain about how applying an IK could be used to create a specific pose.

Ideally:

  • Ideally, we would like to apply the pose to the idle animation before the blending between two states in the Animator occurs.

Currently, we are eager to learn about how other studios implement weapon animation overrides on idle or other animations, particularly in Unity. We aim to achieve a result similar to Elden Ring and other FromSoftware titles, considering we have approximately 50 weapon types, each with around 30 animations.

This is not our first title in the genre. The previous one had multiple flaws, and the animation was something that was brought up often.

I heard from one of our devs that it seems possible to solve this issue by writing your own mixer through animation C# jobs. Here is a sample demonstrating a WeightedMaskMixer that might help get you started with writing your own:

I also wanted to suggest the AnimatorStateInfo for when you need to blend-off the layer during attack states.

hope that helps!

1 Like

Might want to look at @Kybernetik 's Animancer for this approach.

When I use Animancer, I set up a stack of layers with different masks, and I can then blend in upper-body weapon-using animations over the walking legs, and even blend in a right-hand-only animation over that if I wanted to customize the grip. There's good examples and documentation throughout.

And IK can be used on top of it, to achieve head-looks-at-X, spine-bends-to-aim-gun-at-X, or foot-matches-terrain situational fine tuning.

Thanks to both of you !

It seem like the approach that would be the best for our usage would be to recreate our current setup with Animation Job. We will probably explore the idea of using animated weight for the pose instead of our current method of using the AnimationStateInfo which is hard to use in some case due to the blending of the different states.

Thanks again for the suggestion.