Git Product home page Git Product logo

animationcurvetools's Introduction

AnimationCurveTools

Tools for copying and pasting Unity3d AnimationCurves, and for extracting AnimationCurves from imported Animations

I use AnimationCurves for a lot of things ( specifically tweens, changing colors, simulating root motion without Mecanim, faking physical interactions between adjacent pieces in a game I'm working on ) and sometimes it's really helpful to be able to copy and paste a curve from one prefab to another. Unity left out this feature, so here's a hand project that supports it. With this custom AnimationCurve inspector, you can right click on the name of an AnimationCurve field in the inspector and select "Copy Animation Curve":

Then you can click on any other AnimationCurve field and paste that data in using the "Paste Animation Curve" option and the curve will be copied over for you to edit or use how you please.

You may have noticed that there's a third option in the popup menu- "Extract From Animation..." Instead of copying and pasting, this will let you take data from an Animation imported as part of an FBX and copy it into your AnimationCurve. I wrote this for Max Axe because, for performance reasons on old hardware, we had to switch from Mecanim back to legacy animation and didn't want to lose the root motion built into the main character's animation. So, I extracted the root motion channel from Max's run animation and used that to offset his position in the world after the artists had nulled the track back out. To extract an animation, simply choose the top option from the popup menu:

This will open up a new Animation Curve window, waiting for you to select an Animation. This can be any animation- either a standalone .Anim or an animation embedded in an .fbx. After you've done that, you can select the transform and channel you'd like to extract, from a nicely hierarchical menu setup that mirrors your skeleton.

In this case I'm just grabbing the m_LocalPosition.z from the C_Global_ctrl since that has Max's root motion translation in it ( he doesn't move form side to side )

After that, you'll see the Data from that curve nicely display in the Data field, so you can make sure you selected what you thought you selected and not just some similarly named controller left in the exported art file.

Finally, press Extract and the data will get copied into your curve!

There you go, ready to rock with your Animation Curve Tools and your awesome new Animation Curve data. Cheers!

animationcurvetools's People

Contributors

joshuaglazer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.