Search Unity

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

Resolved Bone transform offset and animation blending

Discussion in 'Animation' started by Kali2048, Nov 10, 2023.

  1. Kali2048

    Kali2048

    Joined:
    Oct 16, 2013
    Posts:
    69
    I'm sharing animations across many different quadruped characters using a Generic rig type.
    I have a source Animator Controller which has all the default shared animations, then each character is using an Animator Override Controller.

    All characters have slightly different proportions from each other, so each rig is different but maintain the same hierarchy. This creates problems when sharing animation as it does not use the correct resting position. To fix that, I calculate bone transform offsets at startup and apply those offsets during the Late Update call. It's not perfect but gives acceptable result.

    On top of that, each character has a unique animation created specifically for each rig.
    The problem is that those unique animations do not need any offset applied, but they get blended with the shared animations which do need an offset.

    How you would handle such situation?
    Is there a better way to handle resting pose offset to share animations?

    Any insights or thoughts about this whole process would be really appreciated.
    Thanks!
     
  2. Kali2048

    Kali2048

    Joined:
    Oct 16, 2013
    Posts:
    69
    I've managed to make it work by blending the transform offset based on the animation weight and layer using avatar masks.