Search Unity

  1. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  2. Unity 2017.2 is now released.
    Dismiss Notice
  3. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  6. Unity 2017.3 beta is now available for download.
    Dismiss Notice

[Release][Free] Unity Sprites And Bones - 2D skeleton animation

Discussion in 'Assets and Asset Store' started by TheRealBanbury, Dec 29, 2013.

  1. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    Unity Sprites And Bones
    =======================

    If you have a problem using Sprites And Bones and want support from me, you have to provide a minimal sample project, that clearly shows your problem.

    16.08.2014: Version 1.2.2: More info
    14.08.2014: Version 1.2.1: More info
    20.07.2014: Version 1.2: More info
    01.03.2014: Version 1.1: More info
    01.03.2014: New version: Added features to name poses before saving and quick creation of IK target. (Contribution by TheValar)
    09.02.2014: A new version with a bugfix for the vertex weight colours.
    25.01.2014: A new tutorial and a new version.
    12.01.2014: A new tutorial and new version that supports flipping characters around the Y-axis.
    11.01.2014: A new tutorial and a new version with some bugfixes.
    08.01.2014: New version. Skinned meshes can now be saved as prefabs.
    07.01.2014: New version. Mesh deformation and bug fixes.
    31.12.2013: New version uploaded. New tutorial (see below).



    Video made by TheValar.

    $spritesnbones2.jpg

    This is an addon for Unity 3D to create 2D skeletal sprite animations. With the addon its possible to add bone hierarchies directly in the Unity Editor. Sprites can the parented to the bones. The bones can be animated like any other GameObject in the animator window. Inverse Kinematics is also available and animatable. The bones can also be used to animate any GameObject other than sprites like meshes or particle systems.

    ## Features

    * Skeletons and Bones.
    * Inverse Kinematics with targets.
    * IK Helper objects.
    * Bones and IK are fully animatable.
    * Bone splitting (Subdivision).
    * Mesh deformation
    * Weight painting
    * Bones can be added by holding Ctrl and left clicking.
    * Saving and loading of poses. Poses are saved as assets.
    * Fully integrated in the Unity Editor.
    * Undo-Support
    * Lots of gizmos!
    * Did I mention Inverse Kinematics?
    * Free and Opensource

    ## Planned features
    https://github.com/Banbury/UnitySpritesAndBones/issues?labels=enhancement&page=1&state=open

    Homepage: http://banbury.bootes.uberspace.de/blog/
    Twitter: https://twitter.com/TheRealBanbury
    Download: http://dl.bintray.com/banbury/unity/SpritesAndBones-1.2.2.zip
    Older versions: http://dl.bintray.com/banbury/unity/
    Source: https://github.com/Banbury/UnitySpritesAndBones
    Tutorial files: http://banbury.bootes.uberspace.de/downloads/tutorials.zip

    New tutorial by @adjnor:



    Tutorials: (no longer up to date)
    Tutorial: Using Sprites And Bones and Mecanim to animate a bird by stereoK
    More tutorials here.

    I have been asked multiple times to accept PayPal donations. Among other things I'm not doing this mainly for tax reasons.
    Small private gifts are generally tax free, though. So for those, who want to show their appreciation of Sprites And Bones this way, I assembled a small wish list:
    * An Android Store publisher account in my name. (I would pay for this myself, but I have no credit card.)
    * Comic Life 3
    * MotionArtist
    * Anime Studio Pro (If you feel especially generous)
    * A copy of a game you made with Sprites And Bones.
     

    Attached Files:

    Last edited: Oct 6, 2015
    Linc1987, Gozdek, Karth and 5 others like this.
  2. softwizz

    softwizz

    Joined:
    Mar 12, 2011
    Posts:
    794
    Looks awesome. will give it a go later.

    thanks for giving it away for free.
     
  3. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    697
    Wow cool I can't wait to play around with this! Any plans to add mesh deformation in the future?

    Anyway this looks great and the fact taht it's free is even more awesome!
     
  4. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    I'm glad you like it.

    Yes, mesh deforming is something I want to add in the future. Right now I'm thinking about 2D polygons. But maybe 3D meshes are possible, too. I will have to see about that.
     
    LongJohn likes this.
  5. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    I have added new features for poses and a new tutorial to show how they are used. There are also some bugfixes.

    Please redownload the Unity package, if you have already downloaded it before.
     
  6. msbranin

    msbranin

    Joined:
    Jan 19, 2009
    Posts:
    104
    very nice.
     
  7. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    697
    Also fun fact, the orc used in the tutorials was drawn by Chris Hildenbrand, but is a modification of something I originally drew! It's always fun to see stuff from opengameart.org pop up in the Unity community
     
    theANMATOR2b likes this.
  8. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    BTW I'm busy working on the mesh deformation. I have made good progress and hope to finish a first version soonish.

    Sadly I have to go back to work in two days, so I'm not sure how much I can work on this for the next months.
     
  9. outtoplay

    outtoplay

    Joined:
    Apr 29, 2009
    Posts:
    740
    This is really cool. Thanks for all the effort you've put in. And the vids are spot on!
     
  10. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    Here is a little teaser of what I'm developing right now.



    It's not quite finished yet. But it's already working better than I thought it would.
     
  11. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    697
    Mesh deformation is looking good. If you get that working it will be killer. The only solution I know of now for 2d mesh deformation is Uni2d which costs $90. Of course even without that the IK feature makes this more useful than anything I've seen so far for Unity.

    Basically you rock :D
     
  12. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    Thanks!

    One of the reasons I started this thing, is that there is virtually no free solution for 2D bone animation.

    I hope to finish the mesh deformation by next weekend. Using the SkinnedMeshRenderer made the whole thing much, much easier.
     
  13. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    I have uploaded the mesh deformation stuff to Github and compiled a new package. There are also some bugfixes.

    Please redownload, if you have already downloaded it before.

    The package contains two scenes (skintest, sintel), that show how the mesh deformation is used. I'm planning to create a tutorial next weekend.
     
  14. Phelioz

    Phelioz

    Joined:
    Nov 25, 2013
    Posts:
    7
    Seriously great stuff mate, was just about to buy Uni2d just for the bone feature, keep up the great work. This shouldn't cause any problems with 2d toolkit right?
     
  15. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    Thanks!

    I wouldn't think so. But honestly there is no way I can test against every addon on the asset store :). If you find any incompatibilities, report them on Github, and I'll see what I can do about it.
     
  16. nodoxi

    nodoxi

    Joined:
    Feb 27, 2013
    Posts:
    7
    man, this is awesome!
     
  17. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    I have uploaded a new version. The Skin2D component has now a save button. This will save the whole gameobject with the skeleton as a prefab.

    Please redownload the Unity package, if you have already downloaded it before.
     
  18. outtoplay

    outtoplay

    Joined:
    Apr 29, 2009
    Posts:
    740
    You sir, are terrific. I really believe your hard work will come back to you 10 times. And if you're ever in the NYC area...the beer and burger are on me!
     
  19. DevKirbyrawr

    DevKirbyrawr

    Joined:
    Jul 23, 2012
    Posts:
    917
    Thanks for this asset, even if i work with 3D things, it's free and i needed to say thanks for your work.

    Cheers!
     
  20. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    697
    Just started messing with the asset this weekend and all in all once you get past the learning curve it's sweet!!! Really awesome especially for a free product. I am however having one issue.

    Is there a way to face the character in another direction and still have the animation work? I've tried setting x scale to -1 and rotating around the y axis 180 degrees but it seems that not all the elements want to move so things get really messed up.

    Any easy way to solve this?
     
  21. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    I have to admit, I haven't tried mirroring the bones yet. That's why it's so important, that someone is actually using it.
    The problem lies with all the scripts, that are influencing the position and rotation of the bones. I will try to find a solution. Maybe I can write a script, that flips all the gameobjects at once. Mirroring the animation should be possible, too. Sounds like a challenge. I like challenges :).

    Do you have any suggestions, what could help with the learning curve? Sadly, I'm not that good at writing documentation in English. The tutorials are time-consuming to make, but still easier than writing. I'll make the skinning tutorial right away.

    If you have any ideas for new features, don't hesitate to ask.

    And thanks for using Sprites and Bones. It makes the whole effort worthwhile.
     
  22. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    And here is the latest tutorial and also a new version with fixes for some bugs I found while making the video. Please redownload if you have already downloaded it.

     
  23. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    697
    As far as the learning curve, it might be helpful to just have one long video of you doing a simple character from scratch. Also whatever you are currently using for screen captures seems to skip ahead whenever you drag objects which makes it a tad hard to follow. At the end of the day though I was able to figure it out with very little knowledge of how animation works so they were apparently good enough :D
     
  24. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    Well, the first tutorials were made of screenshots. I have now switched to video capture. I hope Tutorial 4 is an improvement. I'll probably redo the first tutorial.

    I have also made advances with the character flipping. Rotating by 180° should work, when I'm finished. But negative scaling will probably never work, thanks to the way child transformations are calculated in Unity.

    So, with some luck I'll release a new version and a short video tomorrow.
     
  25. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    697
    Downloaded the latest version today and still can't rotated. Has that update gone live yet? If you want me to post screenshots of what's happening on my end let me know.

    also the new videos look much better now that there in full motion!
     
  26. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    Sorry for the delay. I have uploaded the new version just now. So please redownload.

    There's also a short new video, that shows how to rotate a character. For best results with IK only 0° or 180° rotation should be used. The IK algorithm is purely 2D along the X-Y axes and cannot cope well with rotation around the Y-axis.

     
  27. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    697
    Just saw the update, testing now :D I don't see why anyone would need rotations on the y axis other than 180 degrees.

    Once I get a test scene working I'll post a video here.

    Side note, you should consider submitting this to the asset store. Recently a paid asset with similar functionality was submitted http://forum.unity3d.com/threads/220203-Puppet2D-An-advanced-skeletal-animation-tool and there seems to be a fair amount of interest.
     
  28. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    I am considering submitting it to the Asset store. But I wanted to wait until it's reasonably bug free. On the other hand, this thread has almost 1000 views and you seem to be the only one interested. People seem to think, that just because it's free, it can't be any good.

    I watched the Puppet2D video and Sprites And Bones can do almost everything Puppet2D does. The only thing missing is the weight painting. But that's something I want to add, too. I seriously should make a better showcase video. But Tutorial 4 took 4 hours to make. 4 hours for an 8 minute video.

    Anyway it's a lot of fun programming this stuff. And I'm happy that at least you see some value here. If you're missing any features or have any ideas, how to make it easier to use, I'll see what I can do.

    And I can't wait to see your video.
     
  29. peXed

    peXed

    Joined:
    Oct 7, 2013
    Posts:
    3
    I think he is not the only one interested in it! :D

    Took me a couple of google searches to find your awesome work! Will give it a try soon, because it is exactly what I was looking for and even for free!

    Would be great if you can also submit it to the asset store! People will love it (and find it more easily).
     
  30. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    Thanks! I hope you have fun with it.

    I will try to submit it to the Asset Store next weekend.
     
  31. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    697
    Ok I think I found another bug. Tried to build a webplayer and I got a bunch of errors about the namespace UnityEditor. After some quick research I think it may fix it to wrap the editor code in #if UNITY EDITOR (or something like that).

    Once I can build I'll post a little web player that shows the animations I've done so far.

    p.s. don't get discouraged if it seems like there's not too much interest, not everyone will comment. There is obviously demand for this sort of thing with how popular the smooth moves plugin is. Besides this really is a slick tool and much better than I would have expected from a free plugin :D
     
  32. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    I have to admit, I haven't tried building a standalone programm :oops:. If you have any experience with Git and Github you can fork the project, fix the bug and then make a pull request. Or just attach the changes to this thread.

    And thanks for the encouragement :).
     
  33. mrmdesign

    mrmdesign

    Joined:
    Apr 18, 2013
    Posts:
    179
    This looks amazing!

    Thanks for all your hard work. I will give it a try later on.
     
  34. peXed

    peXed

    Joined:
    Oct 7, 2013
    Posts:
    3
    After playing around with your amazing software (really easy to use), the only thing I'm missing at the moment is the baking of the animation (but you work already on that, right?) and it would be really nice to have a value on the IK to blend between IK and FK.

    Good work and please keep it going!
     
  35. Kelde

    Kelde

    Joined:
    Feb 28, 2012
    Posts:
    629
    NOOOOOOOOOOOOOOOOOOOOOO!!!! not more skeletal based tools!!!!!

    I cant decide anymore...this looks great aswell....Uni2D, Puppet2D, Spine, Spriter..and now this.....im doomed.
     
    theANMATOR2b likes this.
  36. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    I have tried to bake the animations, but I haven't found a feasible way to do it. There seem's to be no way to simulate playing an animation in the editor. Do any of the other tools have this ability?

    Blending of IK and FK is definitely on my TODO list. But this requires some rethinking of my IK solution. There are some things I would like to do before that. How necessary is this feature for you?

    That's easy! Use Sprites And Bones. It's the best. Not that I'm biased or something. :D
     
  37. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    697
    Hopefully I'll have some time to fix this tonight. I'm eternally ashamed to say that although I have a GitHub account I've never really been able to figure it out :( but I'll get the code to you one way or another.
     
  38. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    697
    It's great that there are finally some choices for this!

    Spine/Spriter: I personally lean away from these as they aren't Unity specific and I feel like getting them to work is less than straightforward, but if you bounce around between different game dev environments it might be ideal

    Uni2D: I used this in my last project because it was the only thing I could find that easily did mesh deformation but since this does that along with IK I think it's a better option. Especially since for me personally I favored 2dtoolkit for all of Uni2d's other functionality.

    Puppet2D: Discovered it literally the same day as this thread lol. I haven't tried it but it looks pretty darn polished and the automatic bone assignment seems nifty but at the end of the day it doesn't have anything too important (to me) that this doesn' t do and it costs $30 vs. free. Of course Puppet2D also wins major points for videos narrated in a british accent.

    For me personally this is the best solution currently. It has all the features I need (although I haven't tested mesh deformation) and it's open source so yeah... just my 2 cents :D
     
  39. 3D Omelette Studio

    3D Omelette Studio

    Joined:
    Oct 1, 2013
    Posts:
    130
    @TheRealBanbury

    thank you for this wonderful plugin,

    I am new to the 2D area, was wondering if you plugin can support 2.5D world, well let me elaborate:
    my intended use for this plugin is for a 2D character as a player in a 3D world with a third person controller, some sort of Isometric/top down kinda game
    so my aiming is for a character controller that can support the 2D Character with right-left/front-back and angles aswell movements, also being able to switch 2d meshes for like weapon slots in ie: hands etc...

    how would I go and do such a thing with your plugin?
    -create several 2d character animated meshes like front/back/left/right/left angle/right angle etc...... then switch at runtime depending on keyboard inputs?

    does your plugin handle such a thing already and perhaps you can provide an example?

    or am i complicating myself by doing it the hard way?

    please your expertise on the matter are very welcome.
     
  40. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    Sprites And Bones is focused on sprite animation with bones. It doesn't offer any specific features for any game type. But it doesn't restrict you to any game type either. If you know some programming in C#, you should have no problem creating a 2.5D solution.
    Mecanim is especially good at switching animations according to a gameobjects state. So I would suggest to create animations for every direction the character should face and then use Mecanim to switch them.
     
  41. 3D Omelette Studio

    3D Omelette Studio

    Joined:
    Oct 1, 2013
    Posts:
    130
    ok, thanks,
    was just hoping you already had a 2D char controller example that could support that.

    thanks again
     
  42. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    697
    I'm not sure this type of animation really lends itself well to what you are talking about. Can you give an example of a game that has an effect similar to what you want?
     
  43. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    697
    So bad news... I spent a couple hours trying to wrap all code that's dependent on the UnityEditor namespace in an #if UNITY_EDITOR selector. I basically took stuff one method at a time but when I finally got it to build the animations did not work. So evidently something I put in those selectors is important to the functionality of the plugin. I felt like I took out the absolute minimum though and most of it was methods like create() and savePose() stuff like that.

    EDIT:
    AHA!!!! VICTORY!!!!!!!!!!!
    The solution was in the method EditorUpdate() which is responsible for executing the inverse kinematics solving. It was assigned to EditorApplication.update so when it was not in the editor it wasn't firing

    I added EditorUpdate() to the normal update loop in the Skeleton component and it seems to be working fine :D
     
    Last edited: Jan 15, 2014
  44. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    697
    Ok here's an example of some animations I've been working on using this tool

    [video=youtube;ct9v55Aaloo]https://www.youtube.com/watch?v=ct9v55Aaloo"]https://www.youtube.com/watch?v=ct9v55Aaloo
     
  45. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    Yeah, that makes a lot of sense. I should have been more careful with the the editor stuff. Thanks for testing and finding a solution. I will try to fix this as soon as I can.

    And this is a really nice movie. It's good to see, that Sprites And Bones is actually useful. Will this be a full game or is it just a test? Can I link to the video for 'promotion'?
     
  46. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    697
    Yes I do plan for it to eventually be a full game. I have a WIP thread at http://forum.unity3d.com/threads/221826-Feeble-(A-platformer-with-quot-kirby-like-quot-mechanics) and I'll probably put stuff up on my blog as well.

    Use the video however you see fit. My primary goal was to just get an example use case of your plugin out into the world :)

    Also if I have time after work today I'll see if I can figure out the whole GitHub thing and post my changes.
     
  47. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    Using Github is quite easy. Just click the 'Fork' button and you get an independent copy of the repository. Then you can clone the repository with a git client. If you're on Windows, I suggest TortoiseGit/. Once you made your changes, you add, commit and finally push your changes. After that you can make a pull request in Github. I will get a message and can then merge your changes with my repository.
     
  48. Kelde

    Kelde

    Joined:
    Feb 28, 2012
    Posts:
    629
    Valar thats really cool stuff, funny animations:D I see this tool is capable of some nice stuff!
     
  49. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    697
    Sounds straightforward, expect something from me tonight

    EDIT: OK hopefully I did that all right. Pull Request is sent. One word of caution I don't know if skinned meshes work with my changes but at the very least everything will work in the editor as it always has.
     
    Last edited: Jan 16, 2014
  50. TheRealBanbury

    TheRealBanbury

    Joined:
    Dec 15, 2013
    Posts:
    248
    Congratulations! You made the first step into a new world! :D

    I will have a look at it, as soon as I can. This stuff has to be fixed, before I can submit it to the Asset Store. So this has top priority right now.

    If you find other bugs, you can open issues (one per bug) in Github. It makes it easier for me to track them.