Search Unity

Smooth Moves - 2D Skeletal Animation

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

  1. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Shoot me an email at the link in my signature. I won't be available until Sunday, but we can probably figure it out that way.
     
  2. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Some other ideas...

    1) Be sure you include the SmoothMoves_Runtime.dll in the package, even though each team member has a copy. Sometimes the links get messed up because Unity sees the local copy of the dll as a different piece of code.

    2) Try rebuilding atlases after importing
     
  3. echo17

    echo17

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

    Download here: http://u3d.as/content/echo17/smooth-moves/2Fn

    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)
     
  4. dasbin

    dasbin

    Joined:
    Jan 14, 2012
    Posts:
    261
    Can anyone think of a way to make a bone animation partially transparent in a way that doesn't expose other bones?

    That is, in making a material transparent, you can see the overlapping sections of other bones beneath. But I just want to make the whole character transparent to the background only.

    I thought enabling Z-Write in the shader was supposed to solve this sort of thing, but it doesn't seem to have any effect on my SM animations. I suspect because the bones themselves have no depth.
     
    Last edited: Aug 25, 2013
  5. m4ko

    m4ko

    Joined:
    Feb 8, 2013
    Posts:
    21
    We have had a couple issues with sprites vanishing within an animation and then reappearing. Our graphics artist is the only one using SM yet and has no idea on how to fix this. Are there common errors that new users du that could lead to parts of a bone animation to move to the background, get invisble or otherwise just vanish?
     
  6. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    I've thought about this a lot myself, but I'm not a shader expert. The tricky part is that the mesh triangles are rendered back to front, but you want the blending done front to back. In other words, the mesh geometry has to be calculated by drawing the "deepest" bones first so that "shallower" bones get rendered on top. But by doing this, your deep bones are blending their color to the background first instead of pulling the colors from the shallow bones. I'm sure some shader guru could figure out a way around this, but it escapes me.

    Unity community, any ideas?
     
  7. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    This could be a number of things. The first that comes to mind is that you might be playing multiple clips on an animation where one clip is setting a bone a certain way and another clip is setting it another way. This causes the two clips to compete with each other.

    You can send me a simplified version of your project to the email address link in my signature and I'll take a look.
     
  8. m4ko

    m4ko

    Joined:
    Feb 8, 2013
    Posts:
    21
    I am animating a fish. The code looks like this:
    Code (csharp):
    1. IEnumerator FishyFishy(float xPos, bool correct)
    2.     {
    3.         const float depth = 2500;
    4.         string[] fishNames = new[]{"Fish1", "Fish2"};
    5.         int rand = Random.Range(0, fishNames.Length);
    6.         GameObject GO_fish = ObjectPool.instance.GetObjectForType(fishNames[rand], false);
    7.         BoneAnimation fish = GO_fish.GetComponent<BoneAnimation>();
    8.         fish.Play("still");
    9.         //do stuff
    10.  
    11.         if (correct)
    12.         {
    13.             fish.CrossFade("happy");
    14.             //do stuff
    15.         }
    16.         else
    17.         {
    18.             fish.CrossFade("sad");
    19.             //do stuff
    20.         }
    21.         yield return new WaitForSeconds(4.5f);
    22.         ObjectPool.instance.PoolObject(fish.gameObject);
    23.     }
    Do stuff is spawn particles and moving the fish gameobject around the scene. Our graphics artist thinks it has to do with depth layer 0. It doesn't work properly he thinks.
     
  9. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    Hello, I have made few script for 2D and 2.5D project working with Smoothmoves animations, im not good at coding (you will see that obviously in my code)

    $behaviors.jpg

    First its not a perfect product, Im made it for my game but you can probably use it for your game too, If you do so and add some ameliorations please dont hesitate to post update

    Public editor values:

    • All SmoothMoves animation are setup through inspector as a string
    • Alert level ID (from 1 to 5)
    • State level ID (from 1 to 4)
    • attackRange
    • attackDelay
    • movingLimitOnLeftX
    • movingLimitOnLeftX
    • seekAreaRange
    • seekAnimation
    • seekWaitingTime
    • alertCooldownTime (when cooldown is over guard is not more in alert)
    • runSpeed
    • walkSpeed
    • bullet (prefab shoot to the target when use ranged attack)
    • bulletVelocity
    • No chat bool (don't allow enemy to interact between them when in neutral mode)
    • Patrol section:[number of Waypoint],[ X axis value for each waypoint],[time to wait for
    • each waypoint, Smooth moves animation]
    • Bool: Player sneaking
    • Bool:player crawling
    • [Bool Interact with Player], [play animation(smoothmove)],[play sound(soundID)]


    Alert level: from 1 to 5 the level change how guard are neutral to aggressive toward
    the Player. Different guard will have different profile, like grade or between level difficulty.

    -level1: see Player[no attack](Weapon: use Melee just to push
    out the Player If player use an agressive Action like HearPlayer())
    -level2: see Player[will attack if Player come to close](Weapon: Melee
    animation)
    -level3: see Player[ attack after few seconds](Weapon: use stun baton with electric animation)
    -level4: see Player[attack on sight][run](Weapon: use Ranged with projectile)
    -level5 :see Player[Attack on sight]run](Weapon: use Blaster and yell for help)

    State level:
    -neutral: guard patrol
    -suspitious1:have seen Player but not aggressive
    -suspitious2:seek Player
    -angry:attack Player
    Behaviors:(depending on guard alert level)
    Behavior 0 GUARD:
    guard is static on his position, play idle animation for level 1,2,3, and cover idle animation
    for 4,5.
    Behavior 1 PATROL:
    each patrol have 3 parameters: [x axis value][time to wait before next Waypoint][animation
    name to play when waypoint is reached], if there is no WP directly go to guard state.
    Behavior 2 INTERACT WITH Player:
    When Player enter «Interact collider» play an animation, a sound send a message to NGUI(not yet finished)
    Behavior 3 SEEK Player:
    only for level 3,4,5, level 1 and 2 guard will switch to patrol state
    Behavior 4 ATTACK Player:
    for level 1,2 guard walk, for level 3,4,5 guard run
    Behavior SHOCKED
    stop the guard
    Behavior AlertHit
    If the player do a Alert Action they will seek him
    Others:
    when Player enter a “hide zones" (like under a table, in a box) enemy will switch to "seekPlayer state" from combat if : distance from Player is > 300, or there is an object between them with raycast. else he stay in attack mode and attack the Player through his «hidezone»
    when Player use "sneak" guard don't hear it, Player can approach from the back and enter in contact, but not from the front
    when Player use "Crawl" guard don't see him in front of him depending of the distance set in inspector
    Guard see Range:
    IF MOVING:
    LIST]
    [[*]range normal=100%
    [*]sneak=85%
    [*]crawling= 75%
    [/LIST]
    IF IDLE:
    • sneak=70%
    • crawling=50%

    -FaceTarget()
    make the Enemy face the player, or the position he move to
    -HearPlayer(float XtargetPosition)
    Enemy will move to the Xtarget position seek the player
    -IncreaseAggressive
    increase stateLevel if enemy in range And HearPlayer
    -DecreaseAggressive
    decrease stateLevel if enemy can find SeekPlayer (out of range, sneaking, crawling, hidezone
    -OutoflimitZone()
    can setup a range in the inspector like [Xmin=100, Xmax=500] if the enemy go out of this range he will return to his first waypoint

    Before running your scene:


    • Add Enermy.cs on your SmoothMove animated Enemy:
    [*]Add the player reference in the inspector
    http://pastebin.com/BMBpKPTw

    • Add PlayerStatus.cs on your Player, and in the inspector add the tag corresponding to your enemies then:
    http://pastebin.com/qXhsSPPZ

    Code (csharp):
    1.  
    2. In your Player animation script you can derive it or make a reference to PlayerStatus.cs and put as much as status states information in your anim script like this
    3.  
    4. If (Player is IDLE)
    5. {
    6. isNotRunning ();
    7. isIdling ();
    8. }
    9. If (Player is IDLE)
    10. {
    11. isRunning ();
    12. isNotIdling ();
    13. }
    14. If(Player Is Hidden)
    15. {
    16. isInHideZone ();
    17. }
    18. else
    19. {
    20. IsNotInHideZone();
    21. }
    22. If(Player is Crawling)
    23. {
    24. isCrawling ();
    25. notSneaking ();
    26. }
    27.  
    28.  
    29. ........
    30.  
    Actually Its not finished State 1 and 3 works for me, ignore the Player status Log, they are for debugging..it also use these scripts
    http://pastebin.com/pzHWmaiJ (PlatformInputController_NPC.js)
    http://pastebin.com/tGT6GMRq (NPCMotor.js)
    I believe its more easy to do this with a simple rigidbody And Collider?
     
  10. dasbin

    dasbin

    Joined:
    Jan 14, 2012
    Posts:
    261
    The one way I can think of do accomplish a transparent animation is to render the whole animation, opaque, to a RenderTexture, then make that texture transparent afterwards and put it where the animation should be in the scene.
    But it would kill performance.

    Could at least fake it by pre-rendering SM animation as a sprite animation (if there existed an option to export frame-by-frame interpolated within SM), and use that instead. Performance would be a lot better but of course it kind of defeats the purpose of SM not having smooth bone transitions.

    A shader based solution would still be the ideal, and I'm not an expert there either. Anyone?
     
    Last edited: Aug 26, 2013
  11. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Depth zero is just a setting that SmoothMoves uses to order the triangles when they are set up in the mesh. Any bones at depth zero will be moved to the end of the list of triangles, thus rendering them last (and on top).

    Also, when you cross fade animations, that causes two animations to play at the same time. Like I mentioned in my original response, if those animations have events that are happening (hiding / showing bones, changing depths, etc), then they will be competing with each other. If you have events set up in your animations like this, it's a better idea to have intermediate animations. Have a look at this FAQ for more information:

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

    I'd really have to see your animation to give you a good diagnosis. You can send me a simplified version of your project to the email link in my signature and I'll have a look.
     
  12. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Awesome! Thanks for the contribution :)
     
  13. astrospoon

    astrospoon

    Joined:
    Mar 23, 2009
    Posts:
    16
    Just upgraded to Unity 4, and imported my project. Everything seems to be working, save for one issue:

    $gmZmsUD.jpg

    While sprites and animations that already reference atlases are working correctly, when I try to switch an atlas, none of them are showing up. In the inspector, (right pic) I can get around this by dragging and dropping a different atlas to that spot. However, in the actual animation editor, I have no way of swapping to a different atlas. Any ideas on how to fix this? Otherwise everything is working A-OK :)
     
  14. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    That looks like an older version of SmoothMoves. Since v2.2.0 (April 4th, 2013), the editors use a dropdown list to select atlases. There is an oddity with how Unity handles the object picker with scriptable objects in Unity 4, so to get around it I created dropdown lists. Upgrading to the latest version should get you fixed up.

    Since you are jumping across several versions, be sure to back up your project before upgrading (always a good idea anyway). Have a look at this guide on how best to upgrade:

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

    Changelog: http://www.echo17.com/forum/index.php?topic=2.msg436#msg436
     
  15. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Also, another thing to keep in mind. Unity 4.2 introduced a bug in how submeshes are batched. It will affect your depth ordering if you are using more than one atlas in your animations. Keep an eye on this thread to updates on the fix from Unity (the Unity devs assure me it should be any day now):

    http://forum.unity3d.com/threads/192467-Unity-4-2-submesh-draw-order?p=1309435#post1309435
     
  16. astrospoon

    astrospoon

    Joined:
    Mar 23, 2009
    Posts:
    16
    Hmm.... strange. I updated Smooth Mooves through the asset store but it must not have worked correctly. I'll follow your guide. I already ran into the 4.2 bug and reverted back to 4.15 and it fixed it. Thanks!

    UPDATE: That did it. I got the new version with the dropdown menu and everything seems to be working fine still.

    One additional question: Is it possible to change the depth of bones/layers of your animation in code? I want to be able to invert the depth order of all the layers when the player is facing away from the screen. Then I can switch all the textures to rear facing versions and use the same animations for front and rear directions.

    Thanks again!
     
    Last edited: Aug 27, 2013
  17. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Good deal, thanks for letting me know.

    Interesting approach, sounds like a solid plan. The depths are set by events which are applied to an animation through Unity's Animation Event system. Once those are set in the build, I'm not sure they can be modified directly. Fortunately, you could trap the event handling in the runtime of the BoneAnimation class in the function "AnimationEventTrigger". You would need to modify the source to call a custom function whenever a depth is changed on a bone (search for "// Depth has changed on a bone" in this function). Inside your custom function, you could determine how to set the depth yourself, using the baked in value from the editor, or one you want to override.
     
  18. sanjodev

    sanjodev

    Joined:
    May 29, 2012
    Posts:
    63
    I'm trying to use the color in my animations by fading in and out textures. I've noticed that when using the play settings such as ClampForever, and PingPong, the color isn't being handled correctly at the end when it needs to be clamp or reversing in the PingPong. I added some X movement in the animation when doing PingPong to make sure the animation is still playing and reproed it. Interestingly, it seems to be work perfectly fine in the animation editor, but at runtime, it repros the bug.

    Known bug?
     
  19. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    I'd have to see an example to give you a good diagnosis. Have a look at this FAQ:

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

    Also, if you want to dig into the source, take a look at the Project SmoothMoves_Runtime, in the class BoneAnimation, in the functions "UpdateColors" and "SetBoneColor". This is where the color blending is taking place.
     
  20. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Yep, it was a bug alright. Fortunately, there is a very simple fix that can be put into place using the source code provided with the plugin. I'll include the fix in the next service release, but until then, you can do this:

    In the project SmoothMoves_Runtime, in the class BoneAnimation, there is a function called GetHighestLayerPlayingAnimationClip. Inside this function, there is a line:

    Code (csharp):
    1.  
    2.  
    3. highestTime = _colorBlendAnimationState.time % _colorBlendAnimationState.length;
    4.  
    5.  
    Change this to the following:

    Code (csharp):
    1.  
    2.  
    3. switch (_colorBlendAnimationState.wrapMode)
    4. {
    5.     case WrapMode.ClampForever:
    6.  
    7.         highestTime = Mathf.Clamp(_colorBlendAnimationState.time, 0, _colorBlendAnimationState.length);
    8.  
    9.         break;
    10.  
    11.     case WrapMode.PingPong:
    12.  
    13.         highestTime = _colorBlendAnimationState.time % _colorBlendAnimationState.length;
    14.         if ((Mathf.FloorToInt(_colorBlendAnimationState.normalizedTime) % 2) == 1)
    15.         {
    16.             highestTime = _colorBlendAnimationState.length - highestTime;
    17.         }
    18.  
    19.         break;
    20.  
    21.     default:
    22.  
    23.         highestTime = _colorBlendAnimationState.time % _colorBlendAnimationState.length;
    24.  
    25.         break;
    26. }
    27.  
    28.  
    This will override Unity's time codes for the animation, forcing SmoothMoves to modify colors properly for the clamp and ping pong modes.
     
    Last edited: Sep 2, 2013
  21. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
  22. static1991

    static1991

    Joined:
    Sep 3, 2013
    Posts:
    3
    Hi Echo17,

    I have recently come up with a problem whilst using smooth moves and would like to know if you have a solution.

    The problem is:

    i have created a new unity project specifically for animating characters. i copied this project multiple times and have animated multiple characters.
    The was to use these completed characters as Unity Packages and transfer them into the game project once complete. everything has ran very smoothly with smooth moves (excuse the pun lol) expect from the stage of now importing the unity packages.

    Whilst importing the package unity automatically renames the atlas and animation assets to the original names in the very first project i produced for the animations. eventho i have renamed the altases and animation files for each of the characters they are automatically reverted to the old original name.

    This is causing an issue with overwriting as each new character that i import overwrites the old one and removes its animations and atlas from the game.

    i can clearly see that the name is different when it is exported but is renamed to the original when it is imported.

    My question is: Is there a work around to rename these files and to drop the link to the original as i do not want to have to reanimate each of the characters again.

    any help you can provide will be fantastic and thank you for your time.

    Static1991
     
  23. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Wow, that is weird. I haven't come across this with Unity before. There must be something lingering in the database for the project that Unity uses to keep track of assets. It's probably seeing the GUID of the asset and renaming it based on what it has left over from a previous instance.

    Couple of questions:

    1) What version of Unity are you using? It might be an older version that had a bug that the Unity team has since corrected.
    2) Have you tried importing your package into a fresh project? If so, does it still rename your files?

    You can send me your package file and I'll see what it does in my project if you want. Not sure if this will do any good since I'll be creating a fresh project, but we can give it a whirl. Have a look at this FAQ for info on submitting packages to me:

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

    static1991

    Joined:
    Sep 3, 2013
    Posts:
    3
    Hi,

    Into a fresh project the assets are named correctly (the way i want them to be with unique names) it is only effected when two of the animations are together i believe because they are the same original assets from the base project i created. i am using unity 4.2 with smooth moves 2.1. i am afraid i cannot submit a project to you due to a strict NDA from my employer. is there anyway to clear the GUID of the asset?

    Thanks for the quick reply!
     
  25. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    The only way I know of that will clear a GUID is to create a duplicate of an object. That makes a new instance of it in Unity's project database, so it will be assigned a new GUID. Then you can delete your old asset. Be sure to back up your work in case this causes unforeseen problems, though!

    Totally understand.
     
  26. static1991

    static1991

    Joined:
    Sep 3, 2013
    Posts:
    3
    This method worked to a certain degree. once duplicated i then had to reassign each of the textures inside the animation editor. as it should now be using the new atlas. after a few hours of switching atlases for each bone, i deleted the old assets and i now have 6 lovely fully animated characters in my game :)!

    Thanks so much for your help! and if i ever encounter this problem again on a less strict project i will be sure to let you investigate.
     
  27. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    422
    Echo17,

    Thanks again for the very speedy response on a previous issue I had with SmoothMoves! Great to know this level of support exists for such an awesome tool.

    One of the projects I'm working in, we have a collection of characters that are built as BoneAnimations in SmoothMoves, then turned into prefabs. We are finding however when one of these prefabs is placed in the scene, none of its visuals render. Meaning it looks completely invisible. If you then play the game, it displays just fine while the game is playing - but when you stop the game, they become invisible again. The only way I have found to make the instantiated BoneAnimations render, is to actually use "Force Build This Bone Animation". Which, I presume, is not how this is supposed to work. :cool:

    I actually have found that standard sprites have this same issue, however I'm able to get around it by just using the following code in our editors after the object is instantiated:

    Code (csharp):
    1.  
    2. // This is a short hack that forces SmoothMove sprites to initalize when instantiated from a prefab.
    3. //  Without this, they otherwise appear invisible until you click on them in the editor.
    4. SmoothMoves.Sprite[] smoothSprites = openForEditingLevelObject.GetComponentsInChildren<SmoothMoves.Sprite>();
    5. foreach(SmoothMoves.Sprite thisSprite in smoothSprites)
    6.     thisSprite.Initialize();
    7.  

    Okay... so my question here... is, how can I fix this for BoneAnimations? I presume it should work right for Sprites and BoneAnimations without my above hack, however right now I'm most interested in getting the animated characters to display properly while editing.

    Thank you for your time!
    - Dave C.
     
  28. sanjodev

    sanjodev

    Joined:
    May 29, 2012
    Posts:
    63
    Seems to work correctly now. Amazing and speedy response as usual!
     
  29. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    You're welcome, glad this method worked for you. There may be a Unity procedure to change GUID's, but I'm not aware of one in the current release.
     
  30. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    You're most welcome, glad it worked for you.

    There is a pretty easy solution, fortunately. Just open the SmoothMoves Control panel from the Unity menu "SmoothMoves > Tools > Control Panel". You can just dock this window somewhere. While the control panel is open, any time you drag a prefab with an animation to the scene it will automatically build the mesh for you based on the pose of the default animation (the first clip).
     
  31. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Good deal, thanks for the feedback. I've included this fix in the upcoming release which is under review by the Asset Store team. It should be available soon.
     
  32. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252

    Check out this cool video by Flood Entertainment. This is a teaser of their work in progress of the game

    Valhalla: A Viking's Beard

    Website: http://floodentertainment.com/
    Facebook: https://www.facebook.com/FloodEntertainment

    [video=youtube_share;ZMFqJkuISUc]http://youtu.be/ZMFqJkuISUc

    Animations were made with SmoothMoves and sprites were made with 2D Toolkit.
     
    Last edited: Sep 4, 2013
  33. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    SmoothMoves 2.3.4 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)
     
  34. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Created a new Playmaker script call SmoothMoves_IsPlaying to determine if a clip is playing or not. You can find the script as part of the action script packages located here:

    http://echo17.com/smoothmoves.html

     
  35. Truce

    Truce

    Joined:
    Sep 13, 2013
    Posts:
    4
    Hey echo17!

    I'm working on building a fighting game with characters using Smooth Moves. Each character has a BoneAnimation which contains all its moves.

    I'd like to be able to reskin a character, that is, make a 1-to-1 replacement of the textures on each bone and leave all animation data untouched. (None of the texture sizes will change.) I'm ok with having to duplicate my BoneAnimation to do so, but I can't figure out a way to create a duplicate of my original TextureAtlas without losing all my pivot points! Having to copy all the pivot points over would be very tedious.

    Is there a better way to do what I'm trying to do, without all the busywork?

    Thanks!
     
  36. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Sounds like what you want to do is a material swap. You'll only need a single texture atlas. At runtime, you can swap out the material (and therefore the atlas texture or even the shader). Check out this FAQ for information on how to do this:

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

    Near the bottom of this post are some scripts that you can place in your project that will let you easily create a new atlas texture based on the locations of a current atlas. You just specify the replacement textures you want (or none at all which will leave empty spots in the new atlas). Then at runtime, you can call the swap material function referred to at the beginning of the post.
     
  37. Truce

    Truce

    Joined:
    Sep 13, 2013
    Posts:
    4
    Thanks for the quick reply!

    The code you sent seems to be just what the doctor ordered. The interface was easy to understand and the whole process worked quite well...until I hit the export button. Seems to be some issues with the image rendering code. Here's an example output image.

    $glitched_texture_atlas_replaced.png

    The areas of the image with the scan lines are the locations of the images I replaced in the atlas. The blank areas were all frames that were not changed. I'm currently running Unity 4.2.0f4. Any thoughts?

    Thanks!
     
  38. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Not sure. I haven't seen this before. Be sure all your source textures are set to advanced with no mip maps and non power of two scaling. Also be sure you are not saving your new atlas with the same name as an old atlas.

    [EDIT]

    It seems with newer versions of Unity, you will need to be sure the source atlas texture (the one generated by SmoothMoves atlas editor) is in a particular format for Unity to read the texture pixels correctly. You can temporarily set it to ARGB32, run the update, then set it back to whatever format you had originally.

    [/EDIT]
     
    Last edited: Sep 13, 2013
  39. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    SmoothMoves will be on sale Sunday, 15th September 2013 for 24 hours in Unity's summer daily deals. Grab it while it's hot!



    50% off

     
  40. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    Really recommend this plugin, like all ECHO17 plugin, it is very polished and optimized for mobile. and is probably the best quality support i ever had from him.
     
  41. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Thanks Changchun!
     
  42. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Last edited: Sep 15, 2013
  43. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    Check out Greylo Happy Color Quiz Saga by mauigo on the Google app store! Animations were made were made with SmoothMoves.

    Greylo Happy Color Quiz Saga
    Google


    Very nice Marius!
     
  44. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,252
    I will be out of touch for a while. Going to spend some time with my family and take a much needed break. I will try to get back to you as soon as I can. In the meantime, you can check out my forum, social media, tutorials and manuals on my site at echo17.com or in the links in my signature.



    Thank you for your patience!​
     
  45. Truce

    Truce

    Joined:
    Sep 13, 2013
    Posts:
    4
    Got it working! In addition to what you mentioned, I also needed to set the max texture size to 4096. Any re-sizing of the original sheet texture will cause this kind of scanline breakage.

    Thanks so much for the excellent support!
     
  46. Holly-Mellor

    Holly-Mellor

    Joined:
    Sep 8, 2013
    Posts:
    3
    Hey everyone. Loving the plugin, it's fantastic! Unfortunately I've encountered a problem when I have tried to switch from my laptop to my computer. I've installed unity and then smooth moves and then packaged my project from my laptop to my computer. Everything seems to be working fine except when I try to click the drop down on 'Bone Animation (Script)' where you would normally click force build, it will not drop down and I get the following error.

    MissingFieldException: Field 'SmoothMoves.BoneAnimation.updatePrefabs' not found.
    UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty) (at C:/BuildAgent/work/cac08d8a5e25d4cb/Editor/Mono/Inspector/InspectorWindow.cs:888)
    UnityEditor.DockArea:OnGUI()

    I'm not particularly computer savvy and quite new to unity so apologies if it's an obvious issue. Thanks in advance :)
     
  47. moopi

    moopi

    Joined:
    Apr 24, 2012
    Posts:
    39
    Hi Echo,

    Could you remove "Updating BoneAnimations - Checking asset [10 of 640]" phase from the force build bone animation (or make this phase as an optional phase). I'm currently having a lot of issues with Smooth moves (I'm still using Unity 3.5.7f6), and every time when I make a change to the animation or prefabs containing bone animations, I have to run force build, which, at the moment takes over 10 minutes to complete. Also, this somehow messes up my gameobjects in the scene: force build creates some copies of prefabs containing several game objects (including bone animations) inside a game object in the scene which have a force build bone animation as a child. These together are basically killing my workflow.

    I'm using a Mac and I don't have visual studio or equivalent tool to compile Smooth Moves from the source code.

    Eventually, it seems that I'm not able to make a new bone animation by selecting: GameObject -> Create Other -> Smooth Moves -> Bone Animation, and then setting Data to the animation which I want to create in the Bone Animation Inspector window and then hitting Force Build This Bone Animation (again more than 10 minutes to see if this works or not) --> It seems that the Force Build does not update animations inside the bone animation (In the Bone Animation Inspector field, Animation Elements in the Animation field are None). I managed to live with this by manually dragging the correct animation clips from the "animation_name"_Resources folder under my Bone Animation Data.


    EDIT: I finally made an update to Unity 4.2.1 and Smooth Moves seems to work a bit better (at least build bone is working faster). I'll let you know if this solved some of the other problems as well.
     
    Last edited: Sep 26, 2013
  48. Pixelcloud-Games

    Pixelcloud-Games

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

    2D ColliderGen is today's Daily Deal at -75% (only 7,5$ instead of 30$)!
    If you don't already know, it officially supports the SmoothMoves framework to automatically generate polygon colliders for your sprites!

    Give it a chance now or live with regret ;)

    $2DColliderGen_DailyDeal.png

    Short Trailer:


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

    And thanks so much to all who have already happily purchased the tool! Big Thanks to you guys! :)
    Cheers, Harald
     
  49. zoukka

    zoukka

    Joined:
    Sep 27, 2013
    Posts:
    3
    Hello!

    Is there a way to export my animation frames as separate bitmaps, so I could form a traditional sprite sheet out of them?

    Thanks in advance!
     
  50. danthat

    danthat

    Joined:
    Aug 1, 2012
    Posts:
    25
    Hello! I'm having some trouble getting my SmoothMoves animations lit nicely. How does SM generate normals? My sprite is rotated (0, 180, 0) for facing left/ right (because childed objects on negative scaled sprites have rotation issues), but I'm finding it impossible to light them from the back.

    Is this hidden away, somewhere, or is it not implemented?

    By the way, Gun Monkeys used SmoothMoves for all its animations. Worked really well, I was really pleased with them :)