Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

Discussion in 'Animation' started by SRobidas, Nov 23, 2023.

  1. SRobidas

    SRobidas

    Joined:
    Sep 10, 2021
    Posts:
    5
    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.
     
  2. davehunt_unity

    davehunt_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    32
    Last edited: Nov 28, 2023
    tsukimi likes this.
  3. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,292
    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.
     
  4. SRobidas

    SRobidas

    Joined:
    Sep 10, 2021
    Posts:
    5
    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.