Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by AlkisFortuneFish · Oct 24, 2013 at 10:26 AM · animationerrormecanimroot motionblend

Mecanim BlendTree non-linear behaviour?

We have been using Mecanim and root motion animation to move a generic rig character in predetermined paths around a world. In order to do that and get him to actually stop on the end waypoint, we have had to calculate the stopping/braking distance, given a set linear deceleration and the transition to idle at the end. The problem is, it would seem that the root motion resulting from the blends is non-linear, regardless of the blend type, resulting in quite a large positional error at the end of the movement.

To verify, we have created an animation clip of a cube sliding by 1 unit and set up a blend of that clip, with control points at 1, 2, 5 and 10, running the clip at 1x, 2x, 5x and 10x speed respectively.

The actual resulting speed of the root motion, as found by integrating animator.deltaPosition or the actual position in space, is pretty much spot on on the control points and pretty far out half-way between. I have attached a couple of graphs that illustrate the problem.

The question is, are we using this the right way or have we conceptually misunderstood something? We could discretise and calibrate the errors away but would this be the right way to go on about this?

Edit: Does anybody have any information about what kind of interpolation is applied to the animation curves between points on the different blend trees? This whole problem would be much easier to solve if it was not such a black box we have to calibrate errors away from and we seriously can't help but think that we are missing something!

Blending parameter vs Speed Blending parameter vs Relative Error

blendtreerelativeerror.png (11.1 kB)
blendtree.png (22.9 kB)
Comment
Add comment · Show 2
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 MartijnIvory · Jul 31, 2014 at 02:07 PM 0
Share

I'm running into the same problem, I'd be very interested if someone knows what's going on!

Trying to blend an 'idle' animation (speed 0) with a 'walk' animation (speed 1.6). At 0.8 input speed, the character is hardly moving at all. Only around 1.3 you get the impression that he is walking at half of his 'normal' speed of 1.6. Why isn't this blending linear?

$$anonymous$$artijn

avatar image meat5000 ♦ · Jul 31, 2014 at 02:13 PM 0
Share

At speed 0 the clip isn't playing. Hence you are blending 0 speed with your motion. This would also happen if the clip is playing, I assume, as your idle animation probably doesn't include any directional leg movement. You could place one of the animations on a higher level and use a Body$$anonymous$$ask to isolate the upper body for use with the idle, leaving the walk in control of the lower body.

1 Reply

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

Answer by AlkisFortuneFish · Sep 09, 2014 at 11:11 PM

The answer to this was given by Pierre-Paul Giroux, one of the Mecanim developers, on the "To Mecanim And Beyond" presentation at Unite 2014.

Apparently, the result of blending position-based root motion of two animations results in a non-linear blend and they are adding an option to make it linear in Unity 5.0... Some explanation of this somewhere in the documentation really would have been useful!

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.

Follow this Question

Answers Answers and Comments

16 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 avatar image avatar image avatar image avatar image

Related Questions

How to Properly use Root Motion for a rigged character? 0 Answers

Mecanim: 2D Blend Trees, Unable to Compute Positions. 0 Answers

Mecanim curve for move speed 0 Answers

Mecanim - how can I use traslation and rotation of Root from separate animation clips? 0 Answers

Mecanim errors after animation clip import 1 Answer


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