Search Unity

Foot-IK in Timeline

Discussion in 'Timeline' started by WoodlandFiend, Jul 9, 2019.

  1. WoodlandFiend

    WoodlandFiend

    Joined:
    Apr 19, 2018
    Posts:
    4
    Hello everyone!
    I am currently trying to create a Foot-IK behavior with the Timeline. For this I tried the new Animation Rigging package (which I know is currently in Preview) and some custom solutions for IK behavior. All of them worked fine with the Animator, but I just can't seem to get them working with the Timeline and Animationclips. Is there a workaround for this or something I just miss?
    What would be a correct approach?

    I am working with Unity 2019.1.2

    Kind Regards,
    Susi
     
  2. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hi,

    Animation Rigging can be evaluated with a Timeline in 2019.1, but there is currently no set order in which they are evaluated. You are guaranteed that state machine will always evaluate before timeline and before animation rigging, but the order in which timeline and animation rigging evaluate depends on when they were first initialized.

    We have taken that into account and introduced a sorting order in the Playable API in 2019.3 to let users better control when their Playable Graph will evaluate.

    As for now, the best way to go around it is to manually enable the animation rigging RigBuilder after Timeline has finished initializing to ensure animation rigging is evaluated after.
     
  3. WoodlandFiend

    WoodlandFiend

    Joined:
    Apr 19, 2018
    Posts:
    4
    Hi, thanks for your reply!

    I managed to get it to work by really manually activating the RigBuilder script - thanks for that!
    I tried to use a Signal for activating the script, but that did not work. It jumps to the IK handling but immediately reverts back to the normal animation. Do you have an idea why it behaves like that when the enabling comes from the timeline itself?
     
  4. WoodlandFiend

    WoodlandFiend

    Joined:
    Apr 19, 2018
    Posts:
    4
    Just managed to solve that on my own.
    I just created a signal before that deactivated the script and a signal that that activates it again. Animation Rigging works like a charm after that!
     
    simonbz likes this.
  5. JeromeHinds

    JeromeHinds

    Joined:
    May 13, 2017
    Posts:
    3
    This posted saved me !! I thought I was doing something wrong. Would be helpful to include this somewhere in some known bugs report or something.
     
  6. krystaljzy

    krystaljzy

    Joined:
    Apr 13, 2020
    Posts:
    4
    Hi,I am trying to use animation rigging with timeline. But i have a problem.
    I can adjust my character in play mode with animation rigging however timeline can't record any key frames in play mode.
    I tried to set key frames not in play mode but i can't see the animation i am doing (my character won't play the animation just animation rigging controllers do)
    I'd like to know is there anything i can do about it?
     
  7. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hi,
    What version of Unity are you using? We added keyframing compatibility in Timeline for the Animation Rigging package in Unity 2019.3, so you would need to update if you're using an earlier version.
     
  8. krystaljzy

    krystaljzy

    Joined:
    Apr 13, 2020
    Posts:
    4
    Thanks for reply
    i am using Unity 2019.3.4f1 Animation Rigging 0.2.6
    How should i do it?Any tutorial or document about this?
     
  9. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Here is everything we have right now as resources go for Animation Rigging: https://forum.unity.com/threads/compilation-of-resources-for-animation-rigging.852973/

    Also, https://forum.unity.com/forums/animation-previews.141/ is the better sub-forum to ask questions on Animation Rigging.

    Unfortunately, we haven't published much content up to now using Timeline, but we haven't seen any issue with the character rigs we have published up to now in a timeline setup.

    I would suggest trying out first with the animation rigging samples and see if these work well in a timeline in your project.
     
  10. m5813k

    m5813k

    Joined:
    Feb 24, 2019
    Posts:
    1
    Hi, I'm also facing a similar problem with Animation Rigging and Timeline.

    With Timeline and some walking animation, Two bone IK on arms are working well, but foot one doesn't work.
    https://gyazo.com/9daba8864901590e5078318e0de540b1
    Unity 2019.3.9f1, Animation Riggin 0.2.6, Timeline 1.2.14 (2019.3 verified)
    and when it is not Timeline but Animation controller, I found it works well.

    > As for now, the best way to go around it is to manually enable the animation rigging RigBuilder after Timeline has finished initializing to ensure animation rigging is evaluated after.

    I'm trying toggling the Rig Builder component, but it doesn't work.
    https://gyazo.com/26601bac58a0b2d07d1c6494b9a4d6f6
    Do I misunderstand something?

    And I want to know more about sorting order, where should I read the document?
     
  11. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hi,

    Toggling the RigBuilder was a workaround I suggested to force the sorting order for playable graphs prior to Unity 2019.3. You shoudn't need to do that in Unity 2019.3

    Here is the documentation about it: https://docs.unity3d.com/ScriptRefe...ations.AnimationPlayableOutputExtensions.html

    As to what's not working in your setup, it's difficult to tell with the videos you provided. From what I'm seeing, it looks like you have a TwoBoneIK set on the arm that works well. Is only the TwoBoneIK set on the foot not working?

    Is your character humanoid? Humanoid setups with IK goals and Animation Rigging will not play nice together as they're both trying to do the same thing. Also, make sure you don't have FootIK enabled if you intend to have TwoBoneIK constraints set on the feet.

    All in all, I would say having IK constraints on character feet if it's setup to use humanoid is a bad idea as humanoid retargeting already has foot IK built in.
     
  12. krystaljzy

    krystaljzy

    Joined:
    Apr 13, 2020
    Posts:
    4
    Thank you,that helps