Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Difference between animation curves betwee Generic and Humanoid. What is going on underneath?

Discussion in 'Animation' started by Evgeni_Incineration, Sep 14, 2022.

  1. Evgeni_Incineration

    Evgeni_Incineration

    Joined:
    Jul 4, 2022
    Posts:
    27
    Hello everyone,

    I am trying to do editor-time animation analysis for our custom IK tech we are working on. Unfortunately my knowledge of animations, their important settings and difference between different animation types, is lacking (to say the least).

    I want to go through animation's key-frames curves and find out about its feet position in different frames.

    When I import animation as Legacy I get the full information for each curve, with path and propertyName using AnimationUtility.GetCurveBindings().

    Example print of single EditorCurveBinding with Legacy animation:
    Code (CSharp):
    1. (Path: DummyRig/root/B-hips/B-thigh.R/B-shin.R/B-foot.R/B-toe.R) [propertyName: $m_LocalPosition.z]
    When I change animation back to Generic or Humanoid I get no path only propertyName.

    Example print of single EditorCurveBinding with Humanoid animation:
    Code (CSharp):
    1. (Path: ) [propertyName: $RightHand.Little.3 Stretched]
    Both curves should be the same, they are the last curve in the animation.

    I understand that Humanoid is about re-targeting to generic humanoid rig. Is that what is going on?

    Thank you,
    Evgeni
     
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    Yeah, a Humanoid animation is targeting the Humanoid bones, and has curves for those bones. A Humanoid model has a mapping from it's transforms to the humanoid transforms.

    Roughly.

    If you pass that EditorCurveBinding to AnimationUtility.GetEditorCurve, do you get out a sensible AnimationCurve?
     
  3. Evgeni_Incineration

    Evgeni_Incineration

    Joined:
    Jul 4, 2022
    Posts:
    27
    Hello Baste,

    Actually yes, there is sensible data inside. I just need to figure out how which property (Humanoid) matches the curves in the original animation.

    -Evgeni