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

Setup Root Motion for a specific animation clip only

Discussion in 'Animation' started by Dan2013, Sep 25, 2016.

  1. Dan2013

    Dan2013

    Joined:
    May 24, 2013
    Posts:
    200
    I am trying to setup the appropriate Root Node for a specific clip contained in a FBX model.
    For example, I have a banshee FBX model containing animation clips.
    banshee.png

    I only want to use Root Motion for "jump_full" animation clip.
    Thus, I choose None in "Rig->Root node" in Rig tab.
    banshee_rig.png

    Then, I choose the appropriate tested root bone in "jump_full -> Motion -> Root Motion Node -> root_bone_tested_in_Rig_tab_for_all_clips_before"
    banshee_jump.png

    But this configuration does not work as I expected. There is no effect on jump_full clip at all. If Unity cannot set up specific Root Motion Node for a specific animation clip, why there is such an bone-selecting option for each clip?
     
  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Hi Dan2013,

    So this is not how it work.

    https://docs.unity3d.com/Manual/RootMotion.html
    You first need to setup the root node on your generic rig, this is mandatory to allow mecanim to compute all poses in the root referential, then per clip if you want you can define a root motion node, the animations will be extracted from this node and put in the root referential to move the whole rig.

    So Root node on the generic rig setup define which transform gonna be used as the root node to move your character around
    And Root motion node in the animation tabs define the animation curve used to move your character around.

    So in your case only the jump_full clip should have animation on this node.
     
  3. Dan2013

    Dan2013

    Joined:
    May 24, 2013
    Posts:
    200
    Thanks for your answering. I did read the documentation before.
    I also tried set Root Node on both generic rig tab and animation clip tab. But that setup leads very weird result, even I assign exactly the same bone into these two Root Node options. Thus, I cannot figure out a valid usage scenario that appropriately uses the Root Node option on animation clip tab. I think it may require the model and animations are designed to be used this way before importing to Unity? Would you give me an valid example about how to use this?
     
  4. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Of course, you should always setup your character rig first and then create animation based on this rig, changing the rig afterward is a time consuming operation as you would need to reupdate all animation file based on the same rig, otherwise you may get weird result in Unity.

    Which version? and could you send me your file with the avatar setup and animation?
    Best way to do this would be to log a bug with the bug reporter and once you get the confirmation e-mail send me a pm with your case number and I will take a quick look
     
  5. Dan2013

    Dan2013

    Joined:
    May 24, 2013
    Posts:
    200
    I am using the newest Unity5.4.1.
    The issue I mentioned can be easily reproduced by importing this Banshee asset into a new scene. Then, configure exactly the same Root Node in both Rig tab and jump_full tab.
    You will see the banshee model is rotated.
    Notice that if you only set the Root Node in Rig tab, everything works well.
    I am not sure if this is my misconfiguration, a Unity bug, or Banshee model issue...
    banshee_rig.png
    banshee_jump_full.png
     
  6. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Hi Dan2013,

    we are investigating this, it look like there is something wrong but i cannnot tell you what exactly for now
     
    Dan2013 likes this.
  7. Dan2013

    Dan2013

    Joined:
    May 24, 2013
    Posts:
    200
    Thanks for your updating.
     
  8. Petr-Sovis

    Petr-Sovis

    Joined:
    Feb 5, 2013
    Posts:
    10
    Hi, is there any solution / resolution of the problem yet ?
    With humanoid setup and version 5.4.0.p3 "Root Motion Node" changes all clips - there is no possibility to disable or set root motion independently per clip.
    Thanks
     
  9. Corpano

    Corpano

    Joined:
    Feb 5, 2017
    Posts:
    6
  10. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    The settings Corpano shows don't exist for generic clips. At least they are not showing on mine under 2018.4 and I did set the root node of the rig.
     
  11. RekDS

    RekDS

    Joined:
    Dec 27, 2020
    Posts:
    2