Smooth Moves - 2D Skeletal Animation

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

  1. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Last edited: Jul 24, 2014
  2. robin_notts

    robin_notts

    New Member

    Joined:
    Apr 7, 2010
    Messages:
    84
    Watched a few videos. Looks really user friendly and useful. Good job.
  3. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Thanks Robin
  4. DavidB

    DavidB

    Member

    Joined:
    Dec 13, 2009
    Messages:
    530
    This definitely looks pretty slick. Great job. If I go down the 2d route, I'll be looking at this one for sure. Seems really easy to use :D
  5. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Thanks David. Ease of use was my primary goal. I created Smooth Moves out of frustration at all the hoops I had to jump through in 3d animation packages to get a 2D animation. Just seemed like way to much work for something so simple. I hope the Unity community finds it as useful as I do.
    Last edited: Feb 20, 2012
  6. jesta

    jesta

    Member

    Joined:
    Jun 19, 2010
    Messages:
    260
    When is it going to be available? I see no links to the asset store in your first post and I'm very interested.
  7. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Hi Dwarfius. Thanks for reminding me about the link. I had forgotten to provide that after Unity approved my code. You should be able to link to the store from the original post now.
    Last edited: Feb 21, 2012
  8. hima

    hima

    New Member

    Joined:
    Oct 1, 2010
    Messages:
    179
    Looks very interesting and I'll probably buy this soon. One question, does this work with Flash target in Unity 3.5?
  9. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Hi himatako,

    Looks like Smooth Moves won't work in Unity's current Flash setup due to the fact that I use AnimationEvents to trigger changes in the textures, user triggers, colliders, depth changes, material changes, etc. Looking at this thread from the person that is writing the flash exporter, it appears that AnimationEvents will be available for Flash in the future, however:

    http://forum.unity3d.com/threads/116534-Flash-Player-AnimationEvent

    Not sure when or if this will happen, but I'll look into some possible alternatives to using AnimationEvents.
  10. hima

    hima

    New Member

    Joined:
    Oct 1, 2010
    Messages:
    179
    Ah, that's too bad. One requirement for my next project is Flash target, and I'd love to use this with Unity in order to save memory instead of going with frame-by-frame animation. I'll wait until it fully functional with Flash target then :)
  11. nab477

    nab477

    New Member

    Joined:
    Jun 14, 2011
    Messages:
    46
    Hi echo17.

    just bought the plugin, amazing work.
    I was hooked the moment I saw the workflow in your tutorials.

    I'm especially amazed at the ease of mixing the animations textures.

    I liked it so much, now I'm porting my project over to use it (still using placeholder assets, I'm integrating it before the work gets tough)

    anyway, just found a bug (simple one) wanted to let you know (not sure if there's another place for it, so I'll just add it here)

    if you add a keyframe for the shield at frame 3,
    a keyframe for the Arm_R on frame 4
    then select the shield,
    then point the mouse on the keyframes use the scroll wheel to move the currently selected frame
    the shield is still moveable even though the currently highlighted frame is frame 5 if you move the shield, frame 3 gets updated.

    I'm still trying the plugin, but I think if I'm to request anything, it would be some keyboard shortcuts for renaming the bones animation clips.
    that after clicking "rename" all of the current text should be highlighted so I can type right away.
    if possible, let scrolling on the bones actually scroll the bones list :)

    EDIT:
    also, one of the positive side effects of allowing changing the texture in each frame, is that it can actually have Sprite Animations (like in the other 2D packages), however, in order to do that, it would help greatly if you can sort the textures in the atlas by name.
    (example, I have the animations "BloodSplatter000" through to "BloodSplatter029" (a particle effect), if I add them one by one, they remain sorted, so that when i set them in the animation editor, I know which one goes where, however, if I select all of them in the editor drag drop them on the atlas editor, I lose their sorting then lose track have no ability to actually set them up in the animation editor (this is especially hard for particle effects))

    so, if possible, when dragging many sprites to the atlas editor, sort them by name before adding them.
    Last edited: Feb 24, 2012
  12. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Hi nab477,

    Thanks for purchasing Smooth Moves. I'm glad you find it helpful.

    The ability to modify the last set keyframe of a bone, even when the timeline cursor is over another frame was actually by design. That is how I prefer to animate, but I can see your point in how it can be confusing. I'll look into adding an update to change this behaviour.

    Good idea, I'll add that to my list.

    I actually tried to do this, but Unity doesn't have a way to set the GUI textbox's selection, at least none that I could find. I'd rather not create my own textbox just for this feature, but I'll see if there are any other alternatives.

    If you are referring to the scroll wheel of the mouse scrolling the bone list, I tried that too. The problem is that I'm using a GUI scroll view for the actual visible bones. so that if the bone hierarchy gets too deep you can scroll left and right. I use a horizontal slider on the left so that you can move the bones up and down and the timeline keyframes will follow. Since the scroll view is there, it takes over the scroll wheel and won't allow you to trap the event for the horizontal slider. I toyed with that for about a day before I just decided that moving the mouse with the slider would be acceptable for the first release. I'll definitely revist this for future releases, however.

    Great idea, I'll definitely add this to my list. Yeah, one of the great things about Smooth Moves' texture switching mid-animation is that you can achieve classic sprite frame animation inside of a skinned mesh. I really need to make a tutorial on that since it would certainly be a great selling point.

    Thanks for your comments and detailed descriptions.
  13. mplaczek

    mplaczek

    Member

    Joined:
    Feb 13, 2012
    Messages:
    14
    Hi echo17,

    I sent a PM, but thought this would be a far better to post a little bug I encountered...

    Firstly, this is a fantastic plugin. I have had a number of problems with a 2D model I created and imported from Maya... Making this a lifesaver! Just thinking about the problems I will avoid down the line puts a smile on my face!

    I'm recreating this asset with Smoothmoves and am really happy with the speed I have been able to recreate my model. This is a great timesaver!

    However, I encountered a little problem that I was hoping you would be able to help with.
    I was recreating my 2d cat's walk cycle. I had done one of the rear legs and was copying the keyframes to the other rear leg albeit staggered by a couple of frames so the legs move independently. I had copied almost all the keyframes successfully and finally had to copy the last keyframe and paste it over keyframe 0 so that it would loop. When I hit paste, it asked whether I wanted to overwrite the keyframe to which I said yes. Then most of the interface vanished leaving only the window's frame and the grid. When I restart Unity, and reopen the animation editor, my other animations are still there, however, when I select the walk cycle, everything vanishes again leaving only the frame and grid.

    Any thoughts or suggestions as to how I may repair this file would be greatly appreciated!

    [​IMG]

    [​IMG]



    Thank you for your time in this matter,
  14. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Hi mplaczek,

    Fantastic cat model!

    I just sent a reply to your PM, but am copying here. I had email notifications turned off on my private messages, but that is fixed now. If you could send me your project as a Unity package, I'll take a look at the files and see what I can do.

    [EDIT]
    I think I might have found the problem. It looks like the bug occurs when you paste over the first keyframe. The first keyframe of every bone has to have all of it's properties set for the editor to use as a basis. By copying over the first keyframe it is overwriting some of these properties and causing the editor to fail when trying to render the animation clip.

    I've made a modification to the editor dll that will only copy and paste position, rotation, and scale properties of a keyframe. That will eliminate this problem in the future. I'll get this published today, but it could take a while for Unity to approve the update.

    If anyone wants the latest editor build, you can send me your invoice # from your purchase email to:

    support@echo17.com

    I'll verify the invoice and email you back the updated dll so you can avoid having to wait on an approval.
    [/EDIT]
    Last edited: Feb 24, 2012
  15. mplaczek

    mplaczek

    Member

    Joined:
    Feb 13, 2012
    Messages:
    14
    Fantastic,

    Thanks for the quick reply! (oops, I had my PM notifications turned off too!) And an even bigger thanks for getting a fix sorted out in practically no time at all :eek:

    I can only take half the credit for the model, my wife did the artwork... I just chopped the thing up and stuck it all back together to animate :)

    ...this is going to be fun!
  16. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Hello all,

    I've just submitted my latest update to Unity for Smooth Moves. Among the fixes / changes are:

    1.3.0 Updates:

    Bug Fixes:
    -Copying keyframes now only copies the position, rotation, and scale so that other keyframe data is not lost when copying over frame zero of a bone.
    -When using the mouse wheel to scroll in the timeline, the gizmos will only show if the timeline cursor is over the currently selected frame.
    -When previewing an animation, the ability to select bones in the animation window is disabled.
    -Prefabs will now regenerate animation states when instantiated
    -Labels can now be seen in Unity Pro due to new color theme.

    Features:
    -"R" keyboard shortcut for renaming bones and animation clips.
    -When renaming bones and animation clips the item name is selected for easy replacement.
    -Bones and animation clip lists now scroll with the mouse wheel
    -Textures are shown in alphabetic order in the texture atlas editor and the texture selector window inside of the animation editor.
    -Texture names are displayed beneath textures in the atlas editor and the texture selector window inside of the animation editor.
    -Dark theme to match Unity Pro
    -Contrast button that will toggle the darkness of the background of the animation and pivot windows.
    -Z position with animation curves. Depth still determines the draw order, but z position can be used to interact in three dimensions with other 2D objects. z position also allows perspective shifts to give your animations more depth if using a perspective camera. The pos-rot set keyframe shortcut still only sets the x y positions along with the rotation without setting a z position.
    -Bone animation data stats in the inspector.

    If anyone wants the new dll's now instead of waiting for Unity's review process, you can send me an email to:

    support@echo17.com

    Be sure to include your order / invoice number so that I can verify your purchase. The invoice number should be somewhere in the subject or body of the email depending on which method of payment you used.
    Last edited: Feb 29, 2012
  17. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Hi All,

    I went ahead and sent in version 1.3.0 to Unity for approval. The list of features can be seen in the previous post.

    I will be increasing the price of Smooth Moves to $75 with the next release, so if you are interested, now is the time to buy!
  18. OmniverseProduct

    OmniverseProduct

    New Member

    Joined:
    Feb 26, 2012
    Messages:
    1,569
    This looks amazing. The first 2D game I develop will definitely make use of this.
  19. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Thanks OmniverseProductions!
  20. RandAlThor

    RandAlThor

    Member

    Joined:
    Dec 2, 2007
    Messages:
    810
    Just bought it and i am half thrue the tutorial videos and have to say that this is a great 2d animation kit that is well made.
    You have thought about so many things and it feels easy too.
    Happy that i spend money for such a good thing :)
  21. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Thanks M_Stolley!

    I was asked a question about redistributing assets created with Smooth Moves, so I thought I'd post my answer here in case anyone else is interested.

    Smooth Moves relies on SmoothMoves_Runtime.dll during runtime for the animations to work properly. You may redistribute this dll with your assets. It was actually one of the reasons I chose to use a compiled library versus open code.

    The SmoothMoves_Editor.dll may NOT be restributed, however. It contains the code that actually creates the animations and should be considered proprietary.

    One other caveat: I won't provide support for parties that purchase your assets, even though Smooth Moves is powering them. I will, however, support you if you have any questions or suggestions.

    I'll put a tutorial together to show all the necessary steps for this sometime in the near future.

    Hope this helps!
    Last edited: Mar 1, 2012
  22. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Unity has published my latest update (1.3.0), so head over to the asset store to pick it up!

    Here are some features I'm working on for my next release:

    - Replacing the AnimationEvents with a custom built event watcher. This will free up Smooth Moves to work in Flash, iOS, and other platforms that don't play nice with these events. It should also improve performance since AnimationEvents use SendMessage which can be costly on mobile devices.
    - More shortcuts for adding keys, navigating the timeline.

    I'll also be working on more tutorials to show some of the newer features and explain some processes that will help in optimization.
    Last edited: Mar 1, 2012
  23. RandAlThor

    RandAlThor

    Member

    Joined:
    Dec 2, 2007
    Messages:
    810
    I thought it will work on ios, a main reason to buy it too besides that this tool is great :)
    Will these kinds of bones be fast on ios, faster then unitys own?
    How many bones can i use? I mena can i use many (i.e. 10 or 20) characters on the screen on an ipad 1 or just 2 or 3?
  24. jusamobile

    jusamobile

    New Member

    Joined:
    Oct 1, 2011
    Messages:
    21
    I watched the tutorials and its looking great but there are few things I didnt see for sure and they are in a way important for mobile devices. Is there a color tint support per bone or only for the whole group? I mean like with your knight he has a green tunic and a shield that you variate by switching atlas or can generally with other textures.

    With color tint support you could have them as white and just change the color having like 10 different colored knights. This is important when working with a limited amount of memory. Color is also useful for effects if you can tween or animate it from one color to another between frames for example having angry knight animation when his face turns red ;)

    If you already have this or maybe planned(?) another question is related to it. Again shield as a example. Yours currently has a nice white stripe on it and if it would be all white and tinted to red the stripe would also turn red. This can be avoided visually by making it seperate "Emblem" sprite and bone (also could be a picture of lion or a tower). The problem is that as it being a bone it does probably have some impact on performance. What about support for marking bones as static in the editor meaning it will never rotate, change position and not be created as a bone runtime but a static sprite supporting only color (and maybe scale).

    In short these static bones could be a scar on a face, emblem on a shield or bracelet on a hand.
    Last edited: Mar 1, 2012
  25. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    My original design for Smooth Moves did work on iOS, but I discovered a bug in Unity that would not allow bone animations to be stored on prefabs without losing the animation clips. Very odd. To get around this, I regerate the mesh upon startup of the bone animation if necessary. This requires that I set AnimationEvents in the runtime code, which iOS and flash do not like.

    I'm scrapping the AnimationEvents and coding a custom event system that will work across all platforms. I'm hoping it won't take too long, but it is a major rewrite.

    As far as limitations, they will be the same as any skinned mesh limitations on a mobile device. I can't tell you what those are off-hand, but I believe there are lots of threads and docs about this somewhere in these forums. Since the skinned meshes are 2D, that cuts down on the vertex count, so you can probably get away with more than 3D skinned meshes, but I haven't tested the limits yet.
  26. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Currently, smooth moves just changes the color of the whole mesh. I had experimented with per bone color and it was working nicely, but the problem came when multiple animations mix on top of each other. The blending code was getting a bit difficult to keep in line with the expected behavior. I may revisit per-bone color down the line, but it is not in my immediate plans.

    As far as using bones to do decals, that is perfectly alright in smooth moves. Check out the tutorial on "Mixing Textures" on my website. It will give you a taste of how you can use "static" bones for decaling. That particular tutorial focuses on swapping out a texture on the knights face for blinking, but you could also just have a bone with a texture on a higher gui depth for a scar just as easily.

    Unity suggests limiting bones in skinned meshes, but that is also because the 3D animation bones are affecting dozens if not hundreds of vertices, where smooth moves' bones just affect 4 vertices exactly. I haven't created an animation with an enormous amount of bones, so I can't say what the limitations of the bone count would be.
    Last edited: Mar 1, 2012
  27. jusamobile

    jusamobile

    New Member

    Joined:
    Oct 1, 2011
    Messages:
    21
    Would it help if the supported coloring would be static only meaning it wouldnt be blended/mixed between animations but remaining the same as in the main animation? I'm asking this cause the coloring allows more customiation for characters like skin tone, hat color, etc.

    Doing the variation with textures will raise draw calls because the art would have to be split in different atlases due mobile texture size limits. I'm not that worried about draw calls or bone performance since memory usage seems to be the problem that comes before them when doing 2D games for mobiles. Also depending of the used art style the texture compression might not be usable due artifacts and meaning even less memory available :(

    Anyways I'll keep this bookmarked for possible purchase for my next 2D project since it looks to be the most polished package among these other 2D motion system at the asset store :)
  28. robin_notts

    robin_notts

    New Member

    Joined:
    Apr 7, 2010
    Messages:
    84
    Do you have any plans to add animation data export functionality? XML for example?

    Kinda regretting not picking it up at the lower price. :)
  29. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Hi Robin,

    Can you give me an example of how you would use the data export? I'm just curious because I can't think of any way it could be used except in a Smooth Moves animation. The data structure I created to house the smooth moves information is something I built from scratch. It ultimately generates a Unity skinned mesh, but outside of that it doesn't have much meaning.

    Sorry about that. I figure I'd give a discount to launch and then raise the price up to where I feel it belongs after a bit. If you can imagine this tool saving you at least two or three hours of work, then it's easier to see the return on the expense... if that helps :)
    Last edited: Mar 1, 2012
  30. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Static coloring might work. I had not thought of it from that approach. I was trying to keyframe color so that you could modify the color over time, which introduced all sorts of problems with the mixing of animations.

    Smooth Moves is pretty unique in that you can mix textures and not just transforms, allowing you to play different sprite animations on top of each other, like the knight from my demo, whose face blinks while he performs other tasks. This mixing introduces all sorts of color puzzles that I was trying to work through, but just couldn't complete before my initial release.

    Static coloring might be the best option. I'll definitely add it to my list of things to look into.

    Thanks for the suggestions!
    Last edited: Mar 2, 2012
  31. soldmeadow

    soldmeadow

    Member

    Joined:
    Jun 23, 2011
    Messages:
    42
    @echo17 - any support for colouring the mesh would be good from my perspective. For my immediate requirements all I need is the ability to exclude certain bones from being tinted i.e. I have a character that the user can customise the colour of but I want the eyes and the teeth to remain white.

    However, iOS support is more important. I can't use the product without support for iOS.

    Edit: I'm also getting this error trying to do a standalone build for MacOS. I am using SmoothMoves 1.3 and the latest version of Unity.
    Last edited: Mar 2, 2012
  32. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Yeah, this is the issue I am addressing with the AnimationEvent rewrite. Since the mesh is recreated upon startup if the data has changed, I have to recreate the animation events too. The animation events are set with an editor script which doesn't play nice during runtime.

    My custom event manager won't have this limitation so it will work on all platforms.
  33. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Hello all,

    I wanted to let everyone know that my rewrite of the AnimationEvent system was a success. I have built and tested a new watcher class that will manage the events that Smooth Moves produces (like texture switches, collider toggling, user triggers, depth changes, etc). Smooth Moves now builds again without the dependency on UnityEditor.dll, which means it will build on iOS. I'm having other errors when trying to build for Flash, so Flash is still a no-go at this point.

    If anyone wants this updated package, please send an email with your invoice number to:

    support@echo17.com

    I will release this package soon on the Asset Store, but the approval process can take a while.
  34. robin_notts

    robin_notts

    New Member

    Joined:
    Apr 7, 2010
    Messages:
    84
    The reason I asked about XML export was because I use other tools apart from Unity. I wanted to be able to import my animations into my Html5 canvas games, and possibly into Flash 2d. I can think of other uses, but I'm also a little nervous about investing too much (money time) in closed systems. I hope you understand.
  35. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    I see. Well, the data is pretty cryptic outside of a Unity context. It contains information on how to set up animation curves, triggers, bones, etc, but I don't know how useful that would be outside of a skinned mesh in Unity. I will certainly add it to my list of items to consider, but if this is your main requirement for purchase, then I'd hold off until I have something more definite for you.
  36. dasbin

    dasbin

    Member

    Joined:
    Jan 14, 2012
    Messages:
    248
    How does this compare to UMotion 2D and Easymotion 2D?
    Both are existing products which claim to do about the same thing, with some extra features, for about half the price.
  37. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    I actually tried the free version of Easymotion 2D, but I haven't tried Umotion 2D. Easymotion was OK, but it is actually what prompted me to create Smooth Moves in the first place. I didn't see anywhere that I could change textures within an animation or turn colliders on and off for things like weapons. I also needed user triggers for my sound effect. I could have done all that in code, but the whole point for me was to eliminate all the "extra" work of animating after I animate. Also, Easymotion's final format is not a skinned mesh so I was having to rewrite my code to conform to that format.

    [EDIT] I must emphasise that I only tried the free version, which was before any of the newer features were added, so take my evaluation with a grain of salt [/EDIT]

    It's not a bad product by any means, it just didn't suit my purposes.

    I might be looking in the wrong place for price comparison, but it looks like those two products are around $50 (UMotion = $49, Easymotion 2D = $55), which is closer to 65% and 73%, respectively, than 50%. I guess, ultimately you just have to weigh the cost of the features that you need and how much time / money it will cost you to add others. That goes for my product as well. I will continue to expand the features, but not all of them may be relevant to you as an animator or developer.
    Last edited: Mar 3, 2012
  38. nab477

    nab477

    New Member

    Joined:
    Jun 14, 2011
    Messages:
    46
  39. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Thanks, nab477. I appreciate the descriptive rundown of all the options out there. I didn't even realize their were so many ;)

    If anyone is interested, I did a performance test of 1.4 on my iPad first generation. Looks like Smooth Moves runs pretty fast. Granted, there is no game logic or physics involved, just a bunch of skinned meshes running around. Have a look here:


    Specs:

    30 knights randomly animated

    Each knight has:
    - 26 bones (13 are actually modifying vertices directly)
    - 52 vertices
    - 2 Materials (but 3 draw calls due to the ordering of the materials)

    Totals:
    - 30 skinned meshes
    - 1560 vertices
    - 92 draw calls (one draw call for shadows, and another for the background)
    Last edited: Mar 4, 2012
  40. nab477

    nab477

    New Member

    Joined:
    Jun 14, 2011
    Messages:
    46
    seems like the knights are having fun :)

    what shader did you use ? the Particles/Alpha blended ?
    I think there's even a faster one for mobiles which is under Mobile/Particles/Alpha blended.
    (not sure about the performance difference though)

    O.O I've just realized as I'm writing this that 30 knight * 26 bones = 780 sprites !!
  41. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Actually, just 390 sprites. There are 26 bones per knight, but 13 are directly modifying the sprites. I have a base bone (such as arm) and then a bone that sits on top of that (such as arm_sprite). I do this so that I can scale each sprite without it affecting the children. The base bones move and rotate and the sprite bones do the scaling.

    I used Particles/Alpha blended, but mobile/particles/alpha blended would definitely be faster. There are a lot of other optimizations I could do, but I wanted to give a solid base performance without inflating the results too badly. One really big optimization would be to combine the weapons with the knight material which would bring each knight draw call count down to just one. That would give a total of 32 draw calls (about a third) which would definitely see a boost.

    In case you are interested, I try to stay away from cut out shaders because Unity states that they are real performance hogs on mobile devices. Blending shaders work much better and faster. Also blending allows you to see two sides of the animation whereas cut outs just show you one. I like the two sided approach because you can rotate your animations to go the other direction without having to create two animation clips for every action.
    Last edited: Mar 4, 2012
  42. dasbin

    dasbin

    Member

    Joined:
    Jan 14, 2012
    Messages:
    248
    I'm trying to understand the workflow of this product better before making a decision between this an UMotion 2D.
    You say you can export skinned meshes. Does this mean you're outputting an FBX file, and we can use Unity's built-in animation system to control and blend the bone animations (like UMotion)? Or are we forced to use playback / blend scripts specific to your system?
    This is a bit of crucial point for me because of the way we are handling animations, using Playmaker as a playback controller.
  43. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    [EDIT] Smooth Moves does work with playMaker! See my post on the next page or check out the first post for a video of this in action.[/EDIT]

    Actually, Smooth Moves does one step better in that it skips the FBX export / import process and goes straight into Unity as a skinned mesh. The editor is tightly integrated with the Unity environment, so you can see your work instantly. Yes, from there you can do blending just like you would any animation imported from a 3D modeling package.

    I'd suggest you take a look at my video tutorials before you make your decision. They show you all that the editor is capable of and how to get your creations from a set of textures into a skinned mesh. You can find my tutorials here:

    Smooth Moves Video Tutorials

    Specifically for your needs, I would focus on the tutorials for "Attack Animation", "Mixing Transforms", and "Scripting Attack". As a bonus, Smooth Moves can also blend texture animations, so you can do effects like mixing classic sprite animations on top of other animations. You can see this in the "Mixing Textures" video.

    The final mesh contains an animation component and a skinned mesh renderer, but these are wrapped by function calls in my BoneAnimation class. The only reason that I wrap them is that the speed of the animations in the editor is in Frames Per Second, so the wrapping takes the speed back to a normalized value.

    So, let's say that if you had set up your walk animation clip to run at 10 FPS in the editor, then the actual walk animation clip as an AnimationState will run at speed 10.0f. The reason that I keep the speed at the FPS is so that the animation curve tangents are not distorted. Instead of compressing the animation, I just multiply the speed factor, which preserves the animation curve tangents and keeps the animation running as expected. The wrappers will report this speed as 1.0f since it is the full speed that you intended. If you change this speed to say 2.0f with the wrappers, then the internal speed will actually run at 20.0f in this example since it is twice the 10 FPS.

    If you reference the wrappers, your game logic won't need to change to accommodate. If you use Playmaker to reference the actual AnimationStates instead of the animation state wrappers then you will need to adjust your game logic for this difference, dividing or multiplying by the FPS as necessary. This goes for the Time, NormalizedTime, Speed, NormalizedSpeed, and Length properties of the AnimationState.

    What it boils down to is this:

    Code (csharp):
    1.    
    2.  
    3.     public BoneAnimation boneAnimation;
    4.    
    5.     void Start ()
    6.     {
    7.         // First method, no wrappers, referencing the animation component directly
    8.                 // This will actually reduce the original speed by a factor of 5 since the original FPS was 5
    9.         Animation animation = boneAnimation.GetComponent<Animation>();
    10.         animation["Stand"].speed = 1.0f;
    11.        
    12.         // Second method with wrappers, where speed is translated to the internal FPS value
    13.                 // This will keep the speed at its original value of 5 FPS
    14.         boneAnimation["Stand"].speed = 1.0f;
    15.     }
    16.  
    17.  
    The two ways of setting the speed property will yield different results. Since the speed of the Stand animation is set to 5 FPS in the editor, the first method will actually slow the animation down by a factor of 5. The second method, using the wrappers, will keep the animation at its initial value.

    Sorry if this is too technical, but I know what it is like when trying to decide on a product that needs to work with systems already in place. I figure too much information is better than too little.
    Last edited: Mar 18, 2012
  44. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    I've added a live demo to my website at:

    echo17.com

    You can play around with the final result of the video tutorials in a web player.
  45. dasbin

    dasbin

    Member

    Joined:
    Jan 14, 2012
    Messages:
    248
    Thanks for the detailed reply. It's a bit above my head as a designer, but I'll watch the videos and try to understand the system better.

    The impression I'm getting is that, at worst, I would need to create a few Playmaker Actions (scripts called within FSM's) that reference your wrapper and speed settings, but otherwise call all playback and blending the same as if they were regular Unity Animations. Is that correct?

    If we're generating skinned meshes with Smooth Moves, can the resulting animations be edited within Unity's built-in Animation Editor? In other words, do I have direct transform control in Unity over the bones? I can think of a few cases where it would be very beneficial to do so. That's why I brought up the possibility of .FBX export, because the imported mesh is composed entirely of components that all of Unity already understands and can interact with.
  46. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    Yes, you could call the animation component's playback and blending directly. I also wrap the function calls and the animation states so the following methods would be identical:

    Code (csharp):
    1.  
    2.  
    3. BoneAnimation boneAnimation;
    4.  
    5. // using the wrappers
    6. boneAnimation.CrossFade("Walk");
    7. boneAnimation["Walk"].weight = 0.2f;
    8.  
    9. // without the wrappers
    10. boneAnimation.animation.CrossFade("Walk");
    11. boneAnimation.animation["Walk"].weight = 0.2f;
    12.  
    13.  
    Using the wrappers in these cases just simplifies the code. I wrap everything to have a uniform approach to the bone animation, making it look like the animation component. The only real work the wrappers do is to multiply and divide the FPS for you to get normalized speeds and time.

    The mesh and bone transform hierarchy is actually regenerated every time your run a scene, so anything that you set on the child objects of a gameobject that has a BoneAnimation component will get wiped out at run time. This would remove any settings that you applied via the Animation Editor built into Unity. Smooth Moves assumes that all the animation set up is done within its own editor and then uses that information to regenerate the skinned mesh. So I don't think that the Animation Editor would not do much good for Smooth Moves.

    You can however reference bones at runtime after they are regenerated:

    Code (csharp):
    1.  
    2.  
    3. BoneAnimation boneAnimation;
    4. Transform rightArmBone;
    5. Transform leftArmSpriteBone;
    6.  
    7. // Gets the transform of the right arm bone and stores it in "rightArmBone"
    8. rightArmBone = boneAnimation.GetBoneTransform("Arm_R");
    9.  
    10. // Gets the transform of the left arm sprite bone and stores it in "leftArmSpriteBone"
    11. leftArmSpriteBone = boneAnimation.GetBoneTransform("Arm_L_Sprite");
    12.  
    13.  
    You can then modify these transforms' positions, rotations, and scale as you see fit at runtime. For instance you could have a head bone look at an object, tracking it as it moves. This works for any bones that don't have animations running for that bone. Or you could update your transform in the LateUpdate() function and override the animation's movements.

    Keep in mind that Smooth Moves has the ability to modify animation curves in its own editor, so you can tweak your easing and tangents there, just like you would in the Animation Editor in Unity. I'd recommend the tutorial video on the Attack Animation for a good example of this.
    Last edited: Mar 18, 2012
  47. nab477

    nab477

    New Member

    Joined:
    Jun 14, 2011
    Messages:
    46
    any news on v1.4 why it still didn't make it to the asset store ?
  48. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    You know I was wondering the same thing this morning, so I logged in to check and for some reason Unity says it was updated, but the new package is not out there. Not sure what happened, but I'm going to submit again today. Unity kept hanging up when I was submitting the package, so that might be what caused the problem.

    If you want the package now, you can email me at:

    support@echo17.com

    Just be sure to include your invoice number from your purchase.
    Last edited: Mar 9, 2012
  49. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    BONE COLORS ARE NOW AVAILABLE!

    I went ahead and submitted my latest package 1.5.0 for approval to the asset store. For some reason 1.4.0 never made it, though Unity says that is the latest version in my package manager.

    Some features of 1.5.0:

    Bug Fixes:
    - Copy and paste now work on bone names.
    - Copy and paste now work on animation clip names.
    - The animation curve editor window will now stay on top of the editor window when a new animation curve is selected.
    - The texture selection window will now automatically jump to the the selected texture when switching keyframes.
    - Duplicate bone names are no longer allowed.
    - Duplicate animation clip names are no longer allowed.

    Features:
    - Added bone color / blending in the editor. Bones will now show color, blended with the mesh's base color depending on the blend weight of the bone color.
    - Added the ability to set a bone's color programmatically.
    - Added the ability to flash a bone from one color to another programmatically. Duration and repetitions allow flexibility in what the flash looks like.
    - Arrow Keys will move the selected timeline frame around, even from other windows so you can quickly change frames while modifying a keyframe's properties.
    - "B" shortcut key when in the timeline window will create new blank keyframe (or multiple keyframes depending on the selection).
    - "P" shortcut key when in the timeline window will create new pos - rot keyframe (or multiple keyframes depending on the selection).
    - "T" shortcut key when in the timeline window will create new texture keyframe (or multiple keyframes depending on the selection).

    If anyone wants an advance copy, please send me your invoice number from your purchase to:

    support@echo17.com

    Here's a preview screenshot of bone colors in the editor:

    [​IMG]
    Last edited: Mar 9, 2012
  50. echo17

    echo17

    Member

    Joined:
    Nov 24, 2011
    Messages:
    1,013
    I've uploaded all my tutorials to youtube, so now you can stream them much quicker. I have also retained links to the original HD versions so that you can still download them to your hard drive. I will probably be redoing these sometime soon to take into account the new features that have been added (z positioning, shortcuts, bone colors).

    Check out my website: http://www.echo17.com.