Search Unity

Smooth Moves - 2D Skeletal Animation

Discussion in 'Assets and Asset Store' started by echo17, Feb 20, 2012.

  1. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Hi everyone,

    2D ColliderGen is now Permanently Reduced -50% (15$ instead of 30$)!
    If you don't already know, it officially supports the SmoothMoves framework to automatically generate polygon colliders for your sprites!

    If it has been too expensive for you at 30 bucks and you've missed the Daily Deal, maybe you want to give it a chance now..

    View attachment 69164

    Short Trailer:


    Visit the Asset Store page: [link]
    Website with Documentation and Video tutorials: [link]

    And thanks so much again to all of you who have already purchased it! You guys rock! :)
    Cheers, Harald
     
  2. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Hi there,

    I'm not sure what the issue might be exactly, but you might try to zip up your entire project on your laptop and unzip it to your computer (instead of packaging). I've had so many issues with Unity's packages that I usually just give up and move entire projects. If that doesn't work, you can try sending me a simplified version of your project that demonstrates the issue. See this FAQ for more information:
    http://www.echo17.com/forum/index.php?topic=247.msg800#msg800
     
  3. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    This is optional in the latest release of SmoothMoves, version 2.3.4.
     
  4. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Sounds like fun!

    The difficulties of creating 2D animations in Maya was the reason I decided to create SmoothMoves for my own games. Selling the SmoothMoves plugin wasn't even on the agenda at the time, I was just looking for a simpler, more direct interface at the time and could not find anything I liked, so I wrote my own. I used to spend hours setting the uv coordinates, creating mesh quads, etc etc in Maya. In the SmoothMoves I could do the same thing in minutes, depeding on the complexity.


    This would be really tricky with SmoothMoves. the plugin's primary purpose is precalculated animations that can be blended, mixed, queued, etc. There is the possibility of overriding an animation, giving you freedom over some physical interactions, but this would require your own custom coding. Have a look at this FAQ on how to override animations:

    http://www.echo17.com/forum/index.php?topic=247.msg347#msg347

    Yes, this is one thing that SmoothMoves excels over Spine is in events. At least at the time of Spine's launch, there was no event system in place, so you would have to code all triggers yourself. SmoothMoves comes with a trigger system that lets you fire events on any frame of any bone of any animation clip. You can also toggle colliders on and off, swap out textures (like sprite animations), and change the depth of bones dynamically.

    Not a problem. SmoothMoves creates a 3D mesh that just happens to be flat (all in the same z plane) so it looks 2D. You can offset the bones in the z direction if you wish for parallax effects on perspective cameras, but most of the ordering is done with a depth setting that tells the mesh how to render the bone order.

    Overall, SmoothMoves may be what you are looking for. It is meant as a 2D plugin, so complex 3D interaction will be difficult to achieve without some effort.
     
  5. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Not currently, but I have it on my list of items to consider (long list :) )
     
  6. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Very awesome! Thanks for sharing, I've put a link on the first page of this thread in my showcase.

    SmoothMoves creates one set of normals facing along the negative z axis (sticking up from the textured side of the quads). Unity's mesh structure does not allow two sets of normals per vertex, so to have back normals, a second set of vertices would need to be added to the mesh (doubling all memory and processing requirements). I've tried to do this myself several times, but it was difficult to come up with a universal solution that wouldn't impact 99% of users who only need the front facing normals.

    I'm still noodling on this and it's still on the todo list, just don't have a solution that will work as of right now. FYI, if you are code savvy, you might try digging into the build and runtime source, adding an extra set of vertices (wound the opposite direction of the front vertices with normals facing the other direction) wherever the mesh is built. I'll warn you, though, it won't be trivial. You will also need an extra set of triangles, to render as well.
     
  7. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252

    Nice job guys! Very cool plugin
     
  8. iEpic

    iEpic

    Joined:
    Sep 29, 2013
    Posts:
    119
    This question is for you echo17, before I purchase Smooth Moves…

    I'm new to 2d and game developing, and before discovering your plugin I was going to use Flash for my animations and generate sprite sheets, then use the 2d toolkit to put the sprites together to animate them.

    Is there any benefits to using your plugin for animations, instead of using flash.
    Will the game run better? I'm just starting out so I would like to know why I should use Smooth Moves over other animating programs.
     
  9. zoukka

    zoukka

    Joined:
    Sep 27, 2013
    Posts:
    3
    That's too bad, I strongly recommend to go for this feature since I would think it would benefit many people. Sprite sheets are universally used and I'd imagine that the feature would bring a lot of extra value to smooth moves just for the fact alone that you wouldn't necessarily need any other animation program/tool.

    EDIT: another question, is there any way to utilize animations created in smooth moves in other programs like 3Dsmax?
     
    Last edited: Sep 30, 2013
  10. danthat

    danthat

    Joined:
    Aug 1, 2012
    Posts:
    25
    Thanks Echo17. I guess the sensible thing is to look into the child rotation bug and simply flip the X scale +ve and -ve after all :)
     
  11. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    I have not used Flash for game development, so I can't really give you a fair comparison of features / ease of use. I know that Flash is on its way out which is why Unity dropped support for the product earlier this year. I would hesitate to invest a lot of time in a product that may not be around in the next few years.

    SmoothMoves / Unity are platform independent so if you make your game using these technologies, you could easily port your work over to other platforms with little change. Flash on the other hand will only work on a few platforms, with iOS being the most glaring omission.
     
  12. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Not as it is. I imagine if you were code savvy, you could probably come up with a translator that converted the keyframe data of SmoothMoves to another format. I don't think you would get much benefit from this however, because SmoothMoves does a lot of extra stuff that most modelling software will not be able to handle, such as: texture changes (sprite animation), colliders and collider toggling, dynamic depth changes (quad sort order).

    SmoothMoves is highly tuned to work with Unity, so the data structures are geared toward making it work within a game engine over just a 3d modeler. If you are willing to just have the mesh and keyframe information it might be doable.
     
  13. AntFitch

    AntFitch

    Joined:
    Jan 31, 2012
    Posts:
    243
    Hi echo17! I have a quick question about the future of SmoothMoves. With Unity 4.3 on the horizon, do you foresee SmoothMoves changing how it juggles draw calls?
     
  14. danthat

    danthat

    Joined:
    Aug 1, 2012
    Posts:
    25
    Hello! More lighting issue I'm afraid.

    I've got two BoneAnims, set to TransparentVertexLit. I have a Spotlight facing them dead-on.

    The first is lighting as a whole - the circle of the spotlight lights all bones equally as you'd expect. The second is a mess. Each bone is dark and visible, seemingly lit individually. Some bones are darkened, some aren't.

    I've worked out the problem - the first bone's Atlas was built months ago, using an old version of SmoothMoves. When I rebuilt the Atlas, it started showing the same problems.

    So, what changed? And is there anything I can do about it?

    EDIT: by way of a better explanation.... looks like bones with a lower Depth are being lit at different levels to those bones beneath. Where before they were accepting lighting as though the bone anim were one single, flattened texture.

    How it should look:



    How it looks when lit:



    I've re-checked with my old boneAnim and this definitely wasn't the case. Any suggestions would be much appreciated :)

    EDIT 2: bah, looks like I can recreate the same issue with TK2D sprites, so must be a Unity/ shader thing. Odd that it wasn't happening on my old BoneAnims though. I'm guessing this isn't a smoothMoves issue, but if you've got any advice as to why the disparity between old new I'd love to hear it!
     

    Attached Files:

    Last edited: Oct 3, 2013
  15. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    I've been toying with writing my own mesh renderer that skips the skinned mesh renderer entirely. In my tests I have been successful and I can batch animations that only have a single atlas. The downside to this is that it is a HUGE rewrite of the entire plugin, so it will be a while before you'll see this in effect.
     
  16. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    I'm not really a shader guru, so I don't have much advice on lighting 2D animations. I generally stick with the particles/alpha blended for a non-lit look. You might try opening the question up to the community at large either on the Unity answer forum or starting a new thread in these forums.
     
  17. AntFitch

    AntFitch

    Joined:
    Jan 31, 2012
    Posts:
    243
    If you were to do this, would you leverage Unity's new atlas system for 2D images?
     
  18. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    I would certainly look at their atlas system and see what might be used. I don't have the specs on the new system, so I can't say for sure what might be salvageable. I currently use Unity's atlas system for SmoothMoves, so I would certainly try to keep that tight integration throughout my updates.
     
  19. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Last edited: Oct 7, 2013
  20. hollycq

    hollycq

    Joined:
    Sep 20, 2012
    Posts:
    14
    I am glad that I can load TextureAtlas from "Resources" or "Assetbundle" dynamically, and exchange the TextureAtlas and texture in BoneAnimation by the ReplaceBoneTexture function. But I recently found that the ReplaceBoneTexture function is legacy!
    Why? Are there other functions supporting this?
    thanks
     
  21. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    It is legacy because I had originally made texture swapping pretty complicated. You had to set up your swaps in the inspector and create custom classes just to handle it. I later upgraded my code to just allow a user to swap with a single line of code, no inspector set up, no custom classes. I left the replace functions in case someone was using them in their project already. You can still use them since I won't be getting rid of them.
     
  22. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    SmoothMoves 2.3.6 Approved and in the Asset Store

    Download here: https://www.assetstore.unity3d.com/#/content/2844

    Be sure to back up your work and download the update into a new project. You can copy the code over into your current projects using your OS's file system to ensure no import errors occur. See this FAQ for more information on upgrading:

    http://www.echo17.com/forum/index.php?topic=247.msg361#msg361

    Check out this link for a complete list of changes:

    http://www.echo17.com/forum/index.php?topic=2.0

    FYI, you can follow these updates on my Facebook, Google+, and Twitter feeds as well (links in my signature)
     
  23. hollycq

    hollycq

    Joined:
    Sep 20, 2012
    Posts:
    14
    I have released my app. Now I just want to add new weapons, but not upgrade my app. So I need to load new TextureAtlas dynamically, and swap weapon in BoneAnimation like this,

    TextureAtlas new_atlas =Object.Instantiate(www.assetbundle.mainAsset) as TextureAtlas;

    bone_animation.ReplaceBoneTexture("weapon", original_atlas, original_atlas.GetTextureGUIDFromName("sword"), new_atlas, new_atlas.GetTextureGUIDFromName("knife"));

    So I want to say that the ReplaceBoneTexture has the features other functions do not have. It should not be legacy...

    I misunderstand something ??
     
  24. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    You are correct, in that sense the function itself is not legacy. It was more of the old process of setting up swaps in the inspector, creating custom classes, etc. that I considered legacy.
     
  25. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Valhalla: A Viking's Beard - Kickstarter Campaign

    Hey everyone! "Valhalla: A Viking's Beard" is now officially on Kickstarter. Show some support for cool swag and help support Flood Entertainment's dream :)



    Kickstarter link: http://kck.st/16fZ1fT
     
  26. Rick74

    Rick74

    Joined:
    Jun 7, 2013
    Posts:
    40
    I hate to be a jerk here, and I'm not sure if it's been mentioned in this thread yet...but the elephant in the room (at least from my POV and limited knowledge/experience) is how does this stack up to the next Unity update?
     
  27. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    From what I've seen of the videos, the skeletal animation component in Unity 4.3 is pretty limited. You can do parenting of sprites and such, but it actually uses the z offset to fake a depth of bone. This would be bad if your characters are going to be in a 2.5D environment because body parts could be rendered behind other objects in the scene. SmoothMoves uses true depth in that it orders the triangle rendering so that all the body parts come out into one plane. You won't get any interference with other 3D objects. Keep in mind that you can choose to use z offsets in SmoothMoves if you wish, but the depth ultimately determines the order of the drawing.

    Also, I didn't see any way to fire off user events, toggle colliders during an animation, or hide bones dynamically (all of which SmoothMoves does). It seems they are just taking their sprite animation and attaching it to a transform system to get a very rudimentary result that appears like skeletal animation if you don't go too deep. I created SmoothMoves for very complex 2D animations where you can go through entire pose changes midstream of an animation if you choose. If your animations will be simple enough, I would imagine 4.3 would be sufficient for you.
     
  28. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Check out Bitse game's first foray into SmoothMoves. Cool animations guys!

    [video=youtube_share;yZK4hGBtbOM]http://youtu.be/yZK4hGBtbOM
     
  29. Rick74

    Rick74

    Joined:
    Jun 7, 2013
    Posts:
    40
    Are you telling me that they haven't been in contact with you or anyone making 2d animation tools for unity??? I figured they would have at least looked into the popular addons like they did with NGUI and adapted or hell, HIRED the people responsible.

    Correct me if I'm wrong, but I could have sworn that I saw a glimpse of smooth moves as a reference in one of their 4.3 features videos when they mention the popular unity addons that help unity to create 2d games...
     
  30. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    No contact with me at least. I did see the mention of SmoothMoves in one of Unity's videos. There must be something in the asset store license that allows them to use marketing materials of assets on the store. In any case it was a nod towards my product, so I'm happy :)
     
  31. sanjodev

    sanjodev

    Joined:
    May 29, 2012
    Posts:
    63
    Hey echo, I just started playing around with the SmoothMoves Sprite objects and noticed you can't really using Unity's Animation editor to create animations for the SmoothMoves Sprite object in real time. There area performance issues, and then the Unity Animation editor ultimately bugs out when adding key frames. The Unity Animation editor works fine when not editing a SmoothMoves Sprite object though. Any ideas whats going on?

    I was planning on using Sprite objects for the batching support, and wanted to animate real simple things like scale, and coloring without having to use more complex object like BoneAnimation.
     
  32. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    I haven't messed around with Unity's animation editor, so I haven't come across this issue. If you want to send me an example project showing the issue (along with a list of steps to reproduce), you can follow the guidelines in this FAQ:

    http://www.echo17.com/forum/index.php?topic=247.msg800#msg800
     
  33. sanjodev

    sanjodev

    Joined:
    May 29, 2012
    Posts:
    63
    Test project sent to your email address for support.
     
  34. sanjodev

    sanjodev

    Joined:
    May 29, 2012
    Posts:
    63
    echo, I got another issue with using the Sprites. When creating new sprites and adding textures to my 1 Atlas all sprites are sharing, the SmoothMoves auto update control panel doesn't seem to be updating them. Just by reading the progress of the update, it seems to only update BoneAnimations and not Sprites as well. The result is that my sprites are using the wrong texture coordinates to render. My current workaround is to just drag my sprites to my scene, let it auto update, and then hit the Apply button to update the prefab. Although this can be a time consuming workaround since I plan to heavily use sprites more.

    Also, will Sprites need to be root nodes similar to BoneAnimations to be updatable correctly? My sprites are currently root nodes, and they still didn't update automatically.
     
  35. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    The auto-update is only for bone animations at this time.
     
  36. sanjodev

    sanjodev

    Joined:
    May 29, 2012
    Posts:
    63
    Any timetable of when it can be implemented?
     
  37. mmagginnis

    mmagginnis

    Joined:
    Oct 27, 2013
    Posts:
    2
    Hey Echo,

    Been using your product and love it man. Awesome job! Got a question for ya. Is there a way to overlay a background image in the editor so that when creating key frames it can be used as a guide for creating animation? We have animation sequences done in set positions and it would be helpful to be able to have these as a backdrop that we can use as a guide for positioning key points of the animation.

    Thanks!
     
  38. Rick74

    Rick74

    Joined:
    Jun 7, 2013
    Posts:
    40
    Hey started toying around with this, and I have a few questions.

    - is there a better way to scale things down? Things come in at a scale of 1, which is extremly large. Much larger then I want the game to be. If I jack down the scale in the smooth moves animation editor to something like .005 I'm getting really funky results in the smooth moves animation editor window.

    - another thing I'm noticing is the animation plays much faster in game then in the editor. Why is that?

    - is there any documentation for those of us that want to use this in conjunction with java script? I'm sorry if this is an obvious question, I admittingly haven't dug around yet on the interwebs for anything smooth moves and java script related.

    edit:

    after digging around a bit, I discovered a few methods of how to scale...the first is answered in your FAQ, the second method that I tried was to simply parent the animation underneath an empty game object, then scaled down that gameobject. Don't know if that's the best way of doing it though? What do you think?

    The second thing I discovered was that my animation was set to "additive" instead of "blend". this calmed everything down, and gave me a 1:1 representation of what I was animating in the editor.

    The only question I have now before I buy this, is how easy is this package to work with in Unity Script? This is a big deal for me as I'm just starting out learning how to code and I'm already knee deep with Java. To have to relearn everything again in C# would be a set back I would rather not deal with until the next game.

    I still haven't found much online with people using this addon with Java, although I'm sure it's possible.
     
    Last edited: Oct 28, 2013
  39. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Thanks!

    You could set up another bone, one that you won't use at runtime, for the background. Just attach it to the root and set it as an image type. Before you build your animation click twice on the eyeball next to the bone until you see a red "X". This will tell the builder not to include the bone in the runtime animation.
     
  40. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    I don't have much experience with Unityscript or Javascript, so I can't say how easy it would be to port. There shouldn't be anything overly difficult in using SmoothMoves in these other scripts. The examples are all written in C#, but if you can read both that and Javascript, it should be fairly straightforward to translate.

    You might make a general query to the Unity public on these forums or my forum (link in my signature). Someone might have already brewed up some examples using these scripting languages.
     
  41. Rick74

    Rick74

    Joined:
    Jun 7, 2013
    Posts:
    40
    With limited experience, I did notice while using NGUI (which was coded in C#), I had to make a bit of a folder structure switch...

    http://www.tasharen.com/forum/index.php?topic=6.0

    $nguijs.jpg

    I'm assuming this allowed my Javascript files to have access to his C# files so that I can call on functions and what not. Do you think this would be an issue that I would have to address with SmoothMoves?
     
    Last edited: Oct 28, 2013
  42. mmagginnis

    mmagginnis

    Joined:
    Oct 27, 2013
    Posts:
    2
    Thanks! This worked great!
     
  43. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    SmoothMoves is already embedded in Plugins and Editor folders, so it should be good to go. SmoothMoves uses a compiled dll implementation which frees up having to worry about script locations. The plugin comes with the source code for the build and runtime, but that is separate from the project and can be compiled outside.

    I know that my SimpleSQL plugin will work with Javascript (also a compiled plugin). For that plugin, you just have to make sure the C# ORM definition scripts are located in the "Assets/Standard Assets" folder. See this FAQ for more information on that:

    http://www.echo17.com/forum/index.php?topic=257.msg431#msg431
     
  44. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Good deal, glad it worked out for you!
     
  45. Rick74

    Rick74

    Joined:
    Jun 7, 2013
    Posts:
    40

    Hey thanks for the info! I'll give er a test run tonight and if all goes well, I'll snatch it up. Out of curiousity, with the addition of Unity's new 2d system creating sprites with the simple drag and drop method, how will this effect smooth moves?
     
  46. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    I seem to always forget to tell people that want to try out SmoothMoves, that there is a complete minigame called "Rise of the Dough" available on the asset store for FREE. You can test out the animations and code as much as you want, you just won't be able to modify or create new animations.

    The game scripts show how to use the animations at runtime (this is what you would want to try to translate to javascript or unityscript). The runtime dll is compiled and the source is not included with the game. You'll need the SmoothMoves plugin for that.

    Check it out here:

    https://www.assetstore.unity3d.com/#/content/5162

    This shouldn't affect SmoothMoves. The new 2d system is mostly a sprite editor (like for sprite sheets). It has some limited skeletal capabilities, but more for a casual animation that isn't very complex. If you need to move bones up and down in depth dynamically (like pose shifts which can make a 2D animation look very 3D), or change colliders mid-animation, you'd probably be better off with SmoothMoves.

    FYI, you can use both in conjunction, like SmoothMoves for skeletal animation and the unity 2d for the sprites. I currently do something similar in my projects with SmoothMoves and 2D toolkit.
     
    Last edited: Oct 29, 2013
  47. Rick74

    Rick74

    Joined:
    Jun 7, 2013
    Posts:
    40
  48. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
  49. Rick74

    Rick74

    Joined:
    Jun 7, 2013
    Posts:
    40
    Ok I'm sold! This is working for me pretty damn good. Only issue I have right now is when I'm using trilinear, or bilinear filtering, I get the white lines on my textures. I've tried every darn fix that's out there, but the only sure fire way to insure they are not there is to use point filtering. Hopefully those white lines on image import will be resolved in the next unity update.

    Quick question; While animating, if you want to squash or stretch the texture, would you prefer to use the image scale, or the local scale? (I've been using image scale) However with point filtering on, it can look rather...fugly.

    Also, what issues will I have once I update to the purchased smoothmoves?
     
  50. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Have a look at this FAQ for tips on removing artifacts and white outlines:

    http://www.echo17.com/forum/index.php?topic=247.msg349#msg349

    The local scale and the image scale do essentially the same thing. The only difference is that the local scale will also affect the child bones if there are any. Image scale only affects the texture that you are modifying, but not its children.

    You shouldn't experience any issues. Try to follow the guide in this FAQ to ensure no errors:

    http://www.echo17.com/forum/index.php?topic=247.msg361#msg361