Search Unity

Transitioning from baked rootmotion to non baked

Discussion in 'Animation' started by 00christian00, May 19, 2018.

  1. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    I'm going crazy trying to fix this, it seem way more complex than it should be.
    I'm sure there is some simple way to do it, but I can't find it.
    I have a wall jump animation that use the baked root translation Y for the initial jump, then I wish to use regular root motion in the subsequent jumps.
    Problem is Mecanim fade from the current hips translation which is relative the ground to the new hips position which is in place.
    Isn't there any way to make the switch between the two spaces? I can't relocate the hips because it's controlled by the animator.

    @Mecanim-Dev Is there any built in feature?
     
  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    could you build a small project showing the issue?

    it's hard to tell exactly what is going on
     
  3. eobet

    eobet

    Joined:
    May 2, 2014
    Posts:
    176
    I'm keeping an eye on this forum now, so, isn't this basically the same issue that I encountered here:

    https://forum.unity.com/threads/why...cording-to-the-root-bone.530199/#post-3496530

    That for some reason, Unity finds it useful to take the actual last frame rotation/translation of the root bone, and create a whole local world geometry from that, and translate all subsequent animations according to that new orientation, even though your original animation was .

    I can understand it if you put a root bone on the ground, pointing in the direction of the character that it would be useful to base something off that (yet you can do that with en encapsulating gameobject), but the hip bone is constantly rotating all over the place, and to offset all subsequent coordinates according to the arbitrary last position of the hip bone, is something I find utterly perplexing.

    But since everyone on the forum seems to be cool with it, I guess it's just something I have to get over? (No idea how to properly work around it, still, though, since Blender behaves like "I thought an animation system would behave".)

    EDIT: If it isn't the same issue, I'm sorry I let my frustrations spill over into this thread. :)
     
  4. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    The behaviour I believe it's normal, It's just that I don't know if there is workaround.
    See the attached animation. The first part is using baked rootmotion, the second part is using animator rootmotion.
    See the animator component is moving to the new hips translation(I speed it up to make it more obvious) and there is no way in code to adjust the hips translation to stay in place, because the Animator component will simply blend using the animation data and ignore the translation in the gameobject hierarchy.
    I just purchased some animation assets to see how others solve it and it seem they are using a rootmotion node, but this also mean redoing all the animations to include rootmotion data.
    Isn't there a way, to let the animator stay in place ignoring the previous hips translation?
    I can prepare a simple project, but there isn't much more than what you see here as I all the trials I did with the code have failed.

    rootmotion.gif