• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
4
Question by TheBigE · Dec 23, 2012 at 09:30 PM · mecanim

Root motion in mecanim

Hi All,

I watched Unity's mecanim tutorial and also read Root Motion - how it works

Can someone explain it to me in plain English? I just don't get it...what the "Root Transform Rotation" , "Root Transform Position (Y)" means? what "Bake Into Pose" means?

Any help will be appreciated :-)

Thank u in advance

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
9
Best Answer

Answer by dylanfries · Dec 23, 2013 at 12:19 AM

Hi,

I've been pulling my hair out about this as well, but your link led me to the Root Motion docs and I think I understand it now so I'll do my best to explain it. I'm referencing clips from the Mecanim Tutorial project found here: Mecanim Tutorial

To start, what was helpful was going to the Import Animation page and putting a preview clip on. If you look at the preview, theres a little circle under the previewed character. That is the Root Transform. If you adjust the Offset settings and turn things on and off, you'll see it update accordingly. Also, the average velocity and rotation are listed under the Mirror button and give you information about how your model moves over time.

Root Transform

Basically, its the position and rotation of the animation clip as a whole. The rest of the animation is stored relative to the Root Transform.

Root Motion -Unity Docs (the link you posted) says:

The Root Transform is a projection on the Y plane of the Body Transform and is computed at runtime

Think of it like a shadow cast by your character, from a light directly above them. Its the flattened position that Unity is using to anchor your animation in place.

The Body Transform and Orientation are stored in the Animation Clip (using the Muscle definitions set up in the Avatar). They are the only world-space curves stored in the Animation Clip.

As this says, your Animation Transform and Orientation is stored, everything else is relative to that.

From this, the Root Motion is how much your animation clip is moving relative to the world.

Root Transform Rotation

This is how much your animation clip turns over the course of the Animation. If you look at Average Velocity, and the x value is not 0, you can use the Offset to adjust how much the clip will rotate. For a clip like Run where the character should be in a straight line you would Bake this value so it doesn't drift to the side. You would not bake it for something like RunLeft where the whole animation transform needs to turn (and stay turned)

Eg. Open up a clip like RunLeft and Bake the Rotation to see what happens (in the preview window). You'll see the character no longer turns, but just runs in a straight line.

Root Transform Position (Y)

This defines the "floor plane" of the animation clip. Adjust the Offset to see what happens to the plane in the preview window.

Eg. You can see it break by previewing the "Run" clip and shutting the Bake off. You'll notice the model "sticks" to the ground rather then floating (when midstride).

You can select whether to use centre of the Character, the Original (from the animator) value or the Feet.

The docs suggest that most clips will use this setting to keep the animation stable, you would shut it off when using a clip like "Jump" that changes the GameObject height. They go over this in the Mecanim Tutorial video to jump over things properly.

Root Transform Position (XZ)

This controls how much to move in the X or Z directions. You would turn this on (Bake = true) for something like an Idle animation that you don't want to move at all. You can see with Idle if you turn it off that the velocity has a tiny value, which will cause the model to drift around over time. This is caused because the Root Transform is calculated as an average of the position of the model during the animation, so when the body leans over, the Root Transform interprets that as motion, even though the feet are stationary.

To see an example, open up the Run clip and turn this on. You'll notice the character no longer moves relative to the plane as you've overridden that movement.

I hope this helps, I've been struggling with this too and the documentation is rather obtuse on this. Thanks for posting the link, I'd somehow missed it and that really helped me understand things. Good Luck!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by charuwan.sari · Jan 24, 2013 at 04:26 AM

This explains a bit more about Root Transform Position (Y) http://forum.unity3d.com/threads/156596-Mecanim-and-Y-axis-Translation

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Swap Mecanim Layers in Unity 4.2 0 Answers

Use Mecanim Transition as Trigger 0 Answers

Mecanim transitions sometimes don't work 4 Answers

How to check if a specific animation is playing within mecanim 2 Answers

Change orientation / rotation of NavMeshAgent, Trig question? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges