Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
2
Question by $$anonymous$$ · Oct 27, 2016 at 06:48 PM · animatormecanimhumanoidanimation clip

Can I create a humanoid animation through scripting at runtime?

I have a script that creates an AnimationClip and sets its curves (based on mocap data obtained at runtime). I was able to use it with no problem with a legacy Animation component on character that I created that has the same structure as the mocap data. Now I want to retarget it to a character using the Animator component that's been rigged with a humanoid avatar.

I tried something like this that I found in the Unity Manual (https://docs.unity3d.com/Manual/Playables.html)

 // Generate a clip on the fly
 AnimationClip clip = wrnch.GenerateClipFromMocap();
 
 // Wrap the clip in a playable
 var clipPlayable = AnimationClipPlayable.Create(clip);
  
 // Bind the playable to the player
 GetComponent<Animator>().Play(clipPlayable);

But it doesn't seem to animate the character at all. As far as I know, I haven't told Unity how to map my animation clip to a humanoid, so maybe that's why it doesn't work, but I haven't found anything in the docs or forums on how to accomplish this. Is what I'm trying to do even possible?

Comment
Add comment · Show 1
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 Cleverlie · Sep 19, 2017 at 03:49 PM 0
Share

this would be great, we need to record animations from mocap and translate at runtime to humanoid animation clips to be applied to any generic avatar which is already set to work with humanoid mecanim animations, there is no documentation about it at least so far I didn't find any.

any thoughts or ideas?

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by comtronic · Dec 05, 2016 at 03:08 PM

I'm also very interested in this and I've scanned the internet for solutions without success. I think the only solution would be to reverse engineer the codebase of animations in Unity.

The only solution so far is to export the animation to a 3d format (3ds or maya) and then import it back to Unity.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Apply an animation from BVH or data stream to a humanoid character at runtime 2 Answers

Parenting generic weapon to Humanod breaks Humanoid's animation 1 Answer

Replace Avatar in Animator at runtime to create character configurator 0 Answers

Mecanim - Bone Target Matching = Whole object translation! 1 Answer

Use Humanoid Animations with aditional bones 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