• 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
0
Question by phxvyper · Aug 31, 2013 at 08:57 PM · animationmodelruntimefile

Choreography of Model-Animation stored in a file

I need to be able to store all of the data of an animation of a model in a file (Similar to how Source-Engine games store the animations for models in a vcf, or Valve Coreography File)

I load in OBJ files and Materials associated with those OBJ files at runtime. These are the models that i need to be able to attach a choreography file (script) to. Is there an easy way to do something like this?

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

1 Reply

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

Answer by TonyLi · Aug 31, 2013 at 09:18 PM

You're probably going to hate this answer at first, but I strongly feel the best approach is to give yourself a little time to research how animation works in Unity, rather than trying to fit it into a Source Engine mental model.

In many ways, especially with the introduction of Mecanim in Unity 4.0, Unity's animation system is much stronger than Valve's.

Some good first reads would be:

  • High level overview: https://unity3d.com/unity/animation/

  • Technical overview: https://docs.unity3d.com/Documentation/Manual/MecanimAnimationSystem.html

Comment
Add comment · Show 4 · 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 phxvyper · Aug 31, 2013 at 11:03 PM 0
Share

Thank you for the links. I'm checking them out. However, i'm not looking for a system by which i have to compile an animation within the editor. The OBJ models that i load in at runtime will have animations (choreography files) that won't necessarily be found in my game (The player has the ability to create custom animations, essentially).

avatar image TonyLi · Sep 01, 2013 at 05:51 PM 0
Share

In that case, it's still entirely possible, but a bit complicated. I'd recommend using the legacy animation system. You can load the animation data from files at runtime and manually create a Unity AnimationClip composed of AnimationCurves.

FaceFX (a third party facial animation product) does this very thing in this Unity demo project: http://files.facefx.com.s3.amazonaws.com/unity-demo/unity-demo-facefx.zip

The forum thread for that project is here: http://forum.unity3d.com/threads/78076-New-FaceFX-Integration-With-Unity

Look in the file Editor/FaceFXControllerScriptGUI. It converts X$$anonymous$$L animation data that was generated by FaceFX into Unity animation clips. It works at edit time, but there's no reason why you couldn't do the same thing at run time.

Then again, if the tool that your players will use to create custom animations can create Unity-format AnimationClips, you can just read them and add them to the character's Animation component.

avatar image phxvyper · Sep 02, 2013 at 11:16 PM 0
Share

Thank you for your help TonyLi! Thanks for all of the references, i'll check them all out.

avatar image TonyLi · Sep 03, 2013 at 12:27 AM 0
Share

I hope they point you in the right direction. If so, please consider accepting the answer in case it can help others searching on the same question.

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

17 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

Related Questions

3ds max chariter texture and animation problem 1 Answer

Load model & animation during runtime 1 Answer

Reading anim files at runtime 0 Answers

MMD How to export model and animations to Unity as 3rd person controller? 2 Answers

Make mesh collider constantly change 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