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 /
avatar image
1
Question by mathmos_ · Sep 10, 2013 at 08:35 AM · animationmecanimfbxmayarigging

Animations become faulty when imported into Unity

Hello fellow game developers,

I just imported a bunch of animations into Unity and some of them act very strange when I apply the character avatar. It's only a handful of animations, and it appears that the problem is mostly only affecting the arms. We tried reexporting and importing the animations from maya, but it had no effect. The animations are baked and exported as FBX.

Any ideas what could be going wrong?

Arms!

fucked up arms 2.png (198.3 kB)
Comment
Add comment · Show 8
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 TonyLi · Sep 10, 2013 at 02:25 PM 1
Share

Looks like your avatar has an issue. Humanoid rig? On the Rig import tab, click on Configure... and make sure all the bones are mapped properly. Don't map to twist bones if you have any. From the screenshot, it looks like your model was exported 180 degrees from what Unity expects. I bet the limbs assignments are switched. The best solution is to rotate the model 180 in $$anonymous$$aya and re-export.

avatar image mathmos_ · Sep 11, 2013 at 07:44 AM 0
Share

If the arms were switched, wouldn't all my other animations be screwed up too? If the character is facing the forward direction, isn't it working, or is the problem in relation to something else?

alt text

bones.png (39.3 kB)
avatar image whydoidoit · Sep 11, 2013 at 08:17 AM 1
Share

Are the animations exported separately - if so, are the scales correct on all of the in the importer?

avatar image TonyLi · Sep 11, 2013 at 01:17 PM 1
Share

Do other arm animations work correctly? I ask because I have some older models where -Z is forward. $$anonymous$$ecanim's humanoid auto-mapping assumes +Z is forward, so it swaps the limbs and the result looks exactly like your screenshot.

I also have some old Biped models with twist bones that get auto-mapped, and they look similar, too.

If other arm animations do work correctly, then it's probably a scaling issue like @whydoidoit suggests.

Does the muscle preview work as expected?

avatar image TonyLi · Sep 11, 2013 at 03:18 PM 1
Share

Glad it's working at least. $$anonymous$$aybe your animator had some scaling on the arms of those animations. (BTW, you can check scale on the Import tab of the FBX Importer inspector, located to the left of the Rig tab.)

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by vonlindberg · Oct 27, 2016 at 02:53 PM

Hello! I know this issue is old and has been resolved for the original poster, but I had this same issue and managed to figure out the cause.

Unity's animation system applies constraints to the joints of an avatar, so that animations wont move the character in an unnatural way (for that character). I believe Unity does something approximately along the lines of clamping the f-curves to the allowed angles, and if you transgress the maximum angle for a joint too far, then it can end up getting clamped around to the minimum value, which results in a dislocated joint.

The fix for this is to apply proper constraints to your rig in your animation software, so that your joints work the same as those of the avatar in Unity. If you want your character to be able to bend some joint in an unnatural way, I believe you have to tweak the muscle settings in the avatar configuration.

The arms seem to be the general offender here, as it easily happens that you either roll the shoulder bone, or yaw the lower arm bone. Neither of these motions can happen in a normal human skeleton. It looks like the former is what was haunting the original poster, while I had problems with the latter.

Regards

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 theANMATOR2b · Oct 28, 2016 at 07:33 PM

"as it easily happens that you either roll the shoulder bone, or yaw the lower arm bone. Neither of these motions can happen in a normal human skeleton."

May consider explaining this a bit simpler instead of using camera movement terminology, so others - non-animators can comprehend.

As an animator myself - I translate the explanations to mean - rotate the shoulder bone around it's local axis = roll, and - I'm really not sure what yaw a lower arm bone means, since rotating a lower arm bone from its pivot point located at the joint of the parent bone is a proper animation process for FK/IK rigs. What type of translation/rotation does "yaw" represent?

Thanks for the clarification.

Comment
Add comment · Show 1 · 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 vonlindberg · Oct 28, 2016 at 10:13 PM 1
Share

$$anonymous$$aybe I was a bit fast in my choice of ter$$anonymous$$ology. As you interpreted correctly, by roll I mean rotations around the the bone's symmetry axis.

$$anonymous$$y usage of yaw was a bit ambiguous since it usually refers to a rotation around the vertical axis and it's not obvious which axis that is in the lower arm's reference system. To be more clear: the lower arm works like a hinge, it can rotate up towards the upper arm around one axis only. If you extend your arm forwards, with your elbow pointing downwards, you can not turn your lower arm to the left or right, because the joint does not allow it. Rotations around this axis is what I meant by yaw.

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

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

Related Questions

Animation Mecanim - Parts of model displaces after animating 0 Answers

FBXs geometry rendering in wrong place when re-exporting from Maya 1 Answer

Animations not appearing in the inspector. 1 Answer

Mecanim distorts 3D model 0 Answers

Mecanim animation importing 2 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