Search Unity

Authoring Root Motion

Discussion in 'Animation' started by TobiUll, Mar 8, 2015.

  1. TobiUll

    TobiUll

    Joined:
    Feb 22, 2015
    Posts:
    73
  2. TobiUll

    TobiUll

    Joined:
    Feb 22, 2015
    Posts:
    73
    Hmmmmm.... so is that bug?
     
    Last edited: Mar 10, 2015
  3. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    201
    Same problem here, any solution, anyone?
     
  4. Jself

    Jself

    Joined:
    May 29, 2014
    Posts:
    56
    1. So you have a animation that translates in world space (walk forward cycle) exported out and in game?

    2. Then you selected your prefab in game with the Animator component and checked on the "Apply Root motion" check box?

    I am just rehashing the steps just in case you forgot one of them. It is possible that this is a bug and should be submitted.
     
  5. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    201
    No, its not exported, its an animation made in unity. Then i select the animation clip file, and there should be a "Generate root motion curves" button, but there isn't.
     
  6. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Please log a bug with your animation clip
    Best regards
     
    sami1592 likes this.
  7. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    201
    Ok, it might sound strange, but i think i understand why i misunderstood why was there no "Generate root motion curves". It is because all my animation clips, do not have any motions on the ROOT object, aka the object on which the animator component is located.
    Although i have animations that change position/rotation of the objects, none of them is for the root object.

    TL;DR
    To have a "Generate ROOT motion curves" button, the ROOT object must have any motion. It does not count for the child objects (obviously).

    PS I sometimes amaze myself :D
     
    sami1592 likes this.
  8. TobiUll

    TobiUll

    Joined:
    Feb 22, 2015
    Posts:
    73
    @iSinner Thanks. I thought that the "Generate root motion curves" button was to magically generate root motion for an animation that does not have Z-motion at all. Like a person walking in place. But obviously it isn't mean to for this purpose.
     
  9. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    @iSinner, you are right, if there is no animation curve on your root node we can't generate the root motion.
     
  10. Jself

    Jself

    Joined:
    May 29, 2014
    Posts:
    56
    Exactly. Which is why i mentioned step 1. :p

    You guys don't seem like animators, so I assumed that is what your problem is. You didn't have any animation for Unity to reference from and convert it.

    You need to animate the root node translating in world in your 3d package then export it out. Unity made the next step easier for us in 5. Instead of getting code support created to get this "working". You just press a button and it works.
     
    theANMATOR2b likes this.
  11. TobiUll

    TobiUll

    Joined:
    Feb 22, 2015
    Posts:
    73
    Can Unity not estimate the root motion automagically from the feet bones? :)
    Ok, I guess that is out-of-scope, but it would simply be amazing.
    ---
    It occured so often to me that after having purchased an animation from the asset store, the developer said that root motion was not included and that they wouldn't do it due to the lack of requests for it. Especially when it comes to an asynchronously moving zombie, this is utter nonsensense, but also for all other moving creatures because movement is never 100% synchronously.
     
    Last edited: Mar 14, 2015
  12. Jself

    Jself

    Joined:
    May 29, 2014
    Posts:
    56

    No. No engine can do that. since it is the user who needs to tell the engine what he/she wants. The engine isn't going to be able to guess what you want with no information.

    But this wasn't a problem in the past. Where most engines required you to animate all locomotion animations in place, rather than translating in world space down the Y axis. Which is something you can do in Unity with extra code support. But will be extra work, since most of the animation assets in the store are built for translating in world space in mind.

    It is nonsense for the animator not have have included the root node animation in his asset package. It takes little effort to animate it and gives your product another purpose in a system that utilizes different methods of translating the character in game. I would suggest keeping an eye out for those kinds of details when purchasing assets though.
     
    TobiUll likes this.
  13. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    As Jself stated most engines in the past required in-place animation creation. Root motion only came about (opinion) for the purpose to support humanoid (read mocap) motions for retargeting.
     
  14. sami1592

    sami1592

    Joined:
    Sep 18, 2013
    Posts:
    57
    only for Humanoids? can you explain this a little better?
    just curious :)
     
  15. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Mocap can only be used if the rig you are retargeting to is setup to use root motion. Root motion came about to support the ability to retarget mocap animations.
    This is only my opinion - there is no quotes from official sources I can reference.