Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Interpolation between poses

Discussion in 'Animation' started by a-t-hellboy, Nov 8, 2018.

  1. a-t-hellboy

    a-t-hellboy

    Joined:
    Dec 6, 2013
    Posts:
    147
    Hey there,
    Recently I watched David Rosen GDC talk about Overgrowth animation system and it is interesting. Now I'm working a little on it.

    I've searched so much but there isn't enough information about it in Unity. (There are some links for UE but they were all done by blueprint and I think UE developers add this feature to their engine (I guess before this release UE had blending between poses as a model))

    My first try is using Blend Tree of Animator. Save each pose as 1 frame animation and blend between them and it works good but I'm absolutely sure, it's not a correct approach because the first problem is, I should export these poses as an 1 frame animation from another software like 3DMax or Maya.

    So for now I want to know do you guys have any idea how to interpolate or blend between 2 poses which they are created in Unity just by changing transform information of bones ? (Like making animation in Unity in Animation tab which we just make key frames and it is interpolating)
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    379
    If you want to make an animation by interpolating between two key frames, why don't you just ... make an animation with two key frames? That's like, the whole premise of keyframe based animation in the first place.
     
    leftshoe18 likes this.
  3. a-t-hellboy

    a-t-hellboy

    Joined:
    Dec 6, 2013
    Posts:
    147
    You mean by Animation window in Unity ? I guess there are some problems in it. I think I don't have a control on everything.
     
  4. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    379
    Max and Maya can export animations. Instead of exporting 2 separate poses, just export an animation with those as the two keyframes. I don't understand what you think you would gain by exporting the poses individually.
     
  5. a-t-hellboy

    a-t-hellboy

    Joined:
    Dec 6, 2013
    Posts:
    147
    Have you watched that talk ?
    Actually I don't want to use any 3rd party software for animations.
     
  6. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    379
    Not recently. I watched it years ago when it was first posted.

    If you don't want to use other software then don't. Unity's Animation window lets you edit animations too, it's just not as good as a program that has been developed for years with that purpose in mind.
     
  7. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    119
    After using Unity's built in animation editor, I thought there must be something better. I searched the Asset store and found Umotion. There is a free version to try out and see if you like it. It's much easier to work with and you're still doing it within Unity.
     
  8. a-t-hellboy

    a-t-hellboy

    Joined:
    Dec 6, 2013
    Posts:
    147
    Unity Animation window has many problems for this approach because I should have full control on every bones. I think I need to implement blending and interpolation by myself.
     
  9. a-t-hellboy

    a-t-hellboy

    Joined:
    Dec 6, 2013
    Posts:
    147
    It seems really good but guys do you know how blending works programmatically ?
     
  10. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    769
    you need a reference pose to lerp to
    I approached it like this:
    Code (CSharp):
    1. if (lBody.chest) cWalker.bones.Chest.rotation = Quaternion.Slerp (cWalker.bones.Chest.rotation, cWalker.comp.anibonesC.bones.Chest.rotation, coLerp.perc);
    and you'll find other things along the way, like when to switch back to animation, root position etc
     
    a-t-hellboy likes this.