Search Unity

EasyMotion2D - Make 2D Skeleton Animation in Unity3D easily.[RELEASED]

Discussion in 'Assets and Asset Store' started by typehm, Oct 18, 2011.

  1. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161

    Hi, yadoa

    1.) This will feature implement in 0.46.
    2.) Yes, you can change the anchor property at runtime. But it will not affect until Apply called.
    3.) Did you mean in some time, use the texture group importer' will display a apply/revert dialog?
     
  2. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Hi, ValenUA

    I will provide a example demo like BattleHeart in 0.46 to show how to use the depth.
     
  3. ValenUA

    ValenUA

    Joined:
    Nov 14, 2010
    Posts:
    20
    That would be awesome! Tnx.

    Btw, do you have any logo for the EasyMotion, so we could put it on the splash screen of our game next to unity logo and some other plugins that we are using.
     
  4. yadoa

    yadoa

    Joined:
    Oct 24, 2011
    Posts:
    13
    Hi, I work with 0.44. and tries to update to 0.45.
    But the problem has occurred in animation updating.
    I sent email. Please check that.

    And my second question at above.
    There is no anchor accessor of SpriteRenderer. (in 0.45 version)
    So I can't change anchor value at runtime.
    And third question.
    Currently, the 'TextureType' can not be changed using the 'TextureGroupImporter'.
    'TextureType' means the {Texture, NormalMap, GUI, Reflextion, ...} in inspector of image files.
    Thank you.
     
    Last edited: Feb 3, 2012
  5. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,125
    hi! is the importer open format thingy for flash/swf ready yet?
     
  6. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    ... or any other update? :)
     
  7. crystani

    crystani

    Joined:
    Jul 29, 2011
    Posts:
    68
    Hi typehm,

    Is the issue with PlayWithQueue (animations that are playing slowly when playing them using play with queue) handled? I mentioned about this issue before though... :)
     
  8. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Hi, yuriythebest

    After current developing version release, will start desgin the middle exchange text format file.
    It will use exchange datas from old version to future version and use as a middle format to import animation generated by other tools.
     
  9. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Hi, Ostwind

    Current developing version include a collision helper can be create and move colliders with animation.
    And re-write the internal resource management code that can be load/unload resouce correctly.
     
  10. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Hi, crystani

    I did test with demo that use the PlayWithQueue. It works well. Could you give an example or more details to help me reproduce this issue?
     
  11. crystani

    crystani

    Joined:
    Jul 29, 2011
    Posts:
    68
    Then maybe I am doing something wrong...

    I am calling animation like this,

    monsterAnimation.Play(idleClipName);
    monsterAnimation.PlayQueued(idleClipName);
    monsterAnimation.PlayQueued(idleClipName);

    and idleClipName is an animation that are generated by using below code:

    SpriteAnimationClip tmpClip=Resources.Load("Idle_"+clipName) as SpriteAnimationClip;
    string idleClipName="idleClip";
    monsterAnimation.AddClip(tmpClip,idleClipName,0,20);
    monsterAnimation[idleClipName].wrapMode=WrapMode.Default;

    First animation(using play) is played perfectly. Second and third ones are played quite slowly.
     
  12. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Hi, crystani

    I will check the PlayQueued with your example code.

    And you can try to modfy you code like this:

    monsterAnimation.PlayQueued(idleClipName);
    monsterAnimation.PlayQueued(idleClipName);
    monsterAnimation.PlayQueued(idleClipName);
     
  13. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Hi, crystani
    I confirmed this issue will appear use the AddClip( clip, name, firstframe, lastframe).
    I will check and fix it soon.

    Fixed. The reason is AddClip do not re-calculate a correct normalized speed to SpriteAnimationState.
     
    Last edited: Feb 7, 2012
  14. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,125
    Hi! can you explain the following:
    1. I create an animation that uses sprite assets
    2. I create the atlas
    How does easyMotion2d decide which atlas to use?
     
  15. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Hi, yuriythebest

    If a sprite pack to a atlas, the sprite will use the atlas texture instead the original texture in Sprite.image data member, and the UV will re-mapping to the atlas texture.
    Also, the atlas reference will store in the Sprite.atlas data member. But the Sprite.atlas data member will not used in runtime.

    So the animation just use the sprite, and the sprite will decide which texture it will use.
     
  16. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,125
    hi! our team has this type of export format (attached) from Adobe After Affects- is it possible to create an importer for such a format. Should this be done we can share this exporter script and you can add "import from After Effects" as a feature :)
     

    Attached Files:

  17. crystani

    crystani

    Joined:
    Jul 29, 2011
    Posts:
    68
    Hi, typehm

    Is there any news for 0.46 updates?
     
  18. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Hi, yuriythebest

    I will check your file.
     
  19. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Hi, crystani

    The 0.46 was done. But I was said that I will make a battle heart like example. But I have no time to write it in these days. And I have no time to port some example to Javascript.

    If some guys really need new version soon and don't care of the examples, just mail to me to get the new version.
     
  20. nab477

    nab477

    Joined:
    Jun 14, 2011
    Posts:
    46
    Hi,

    I'm trying to remove EasyMotion from my project.
    but I can't seem to remove "Main Camera.SpriteBatchRenderer" from the gameplay scene.

    what do I need to do ? why is it hard to remove ?

    EDIT:
    also, I cannot rename it !!
     
  21. livio3d

    livio3d

    Joined:
    Feb 17, 2009
    Posts:
    145
    Hi,

    actually i start to use easy2d for remake all graphics for my old top down shooter game,
    i have a problem when i set my spriterender to XZ plane rotation on y result inverted!
    any way for fix this ?
     
  22. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Hi, I will provide a script to help you remove this gameobject.


    Code (csharp):
    1.  
    2.  
    3. using UnityEngine;
    4. using System.Collections;
    5.  
    6. [ExecuteInEditMode]
    7. public class NewBehaviourScript : MonoBehaviour {
    8.  
    9.     public GameObject obj;
    10.  
    11.    
    12.     // Update is called once per frame
    13.     void Update () {
    14.         if ( obj != null)
    15.         {
    16.             obj.hideFlags = 0;
    17.             Object.DestroyImmediate( obj );
    18.             obj = null;
    19.         }
    20.     }
    21.  
    22. }
    23.  
    24.  

    Save this script as a cs file named NewBehaviourScript, and attach it to a gameobject. Drag the gameobject to the obj member if you want to remove from scene.
     
    Last edited: Feb 24, 2012
  23. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Hi, I will check this issue soon.

    Edit:
    Hi, livio3d
    Which version you are using?
     
    Last edited: Feb 24, 2012
  24. livio3d

    livio3d

    Joined:
    Feb 17, 2009
    Posts:
    145
    hi again,
    i use the 0.452 on assetstore, actually i can avoid the problem using a spritemeshrenderer with normal camera,
    an setting option on 2dcamera for setting the camera on xz plane maybe can help.
    sry for bad english.
     
    Last edited: Feb 24, 2012
  25. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Fixed. Will include in next release.

    If you are using a normal camera, that is ok.
    Camera2D is a bad design and bad workflow, will discard in future.
     
  26. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    http://youtu.be/OYFAC0nmfpA

    Hi, here is a video to preview the new editor feature FK/IK.
    I just want to say the new version really coming soon now.
     
  27. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Looking great! :)
     
  28. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    Good progress buddy,
    Keep it up ;)
     
  29. crystani

    crystani

    Joined:
    Jul 29, 2011
    Posts:
    68
    Hi,

    I found that using pvrtc format makes animation look ugly. As pvrtc format allows square textures only, animations that are made for non-square POT textures (ie 127*345) are not showing properly when the non-square, non-pvrtc textures are converted to pvrtcs textures(like 256*256). This is necessary as the designer wants to cut assets with PoT size. (And then for memory reduction I need to use compression...) I think that this could be solved with texture atlas, but in my case I can't use texture atlas.

    Is there any solution for this or am I missing something?

    (I think that enabling sprites to read textures not based on pixel size but based on UV...)

    Thank you.
     
    Last edited: Mar 12, 2012
  30. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Hi, crystani

    There is a toggle named "same width/height" or "Force Square Texture" in atlas editor can force the altas to a square texture.
    In your case, you can rebuild your atlas with check this toggle to solve your iusse.
     
  31. crystani

    crystani

    Joined:
    Jul 29, 2011
    Posts:
    68
    Hi typehm,

    As I mentioned above, I can't use sprite atlas for some reasons. Isn't there any solution without using atlas?

    (More precisely I was using an animation where the size of textures are like 125*345, and then trying to force the texture PVRTC, so that Unity3d automatically converts it to size of 256*256 or so. In that case animation is now shown correctly.)

    Thank you.

    Edit: I found that when I put textures on sprite asset view, easymotion 2d automatically converts it to non-PoT texture... looks like it is done intentionally with having in mind to use sprite atlas.)
     
    Last edited: Mar 12, 2012
  32. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Hi, crtstani

    I will give a patch to solve your iusse soon.
     
  33. Neverbe

    Neverbe

    Joined:
    Jun 29, 2010
    Posts:
    34
    Can your software export to single frame png?
     
  34. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Hi, Neverbe.

    Can you talk more details about the export to single frame?
     
  35. Neverbe

    Neverbe

    Joined:
    Jun 29, 2010
    Posts:
    34
    Exporting animation's frame into png file so we can edit them with Photoshop and also use'em with other 2D engine.
     
  36. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    I got what your mean now.
    EasyMotion2D can not support export animation frame now.
    I will do some test to try to do this feature. But maybe it can only work on a Pro license.
    Anyway, I will give a result later, even fail or success.
     
  37. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    I did some testing to try export the animation frame PNG. Finally, it works.
    But it require a Pro license to use Render To Texture to get 32bit pixles to export transparent PNG.
     
  38. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    Hey man,
    Thanks for the update and all the effort you put into your product :)

    How's v0.5 coming up so far?
     
  39. Small Green Creature

    Small Green Creature

    Joined:
    Mar 18, 2012
    Posts:
    7
    Hello,

    I'm interested in making zelda like games and I'd like to know how the collision with the tile map is done. I mean, When you create tile maps how do you define the walkable areas? Is there a feature where i draw my walkable area and then EasyMotion creates a navMesh for the use of Unity Pathfinding system?

    Also, All animations need to be bone animations? Does Easy Motion 2D manage Sprite animations?
     
    Last edited: Mar 20, 2012
  40. crystani

    crystani

    Joined:
    Jul 29, 2011
    Posts:
    68
    Hi typehm,

    If a frame of animation has a bone that is rotated to 400°, and it needs to be interpolated to the next turn with 39° or so, it rapidly turns 361° instead of 1°. I don't know which behavior (turning 360° more or not) is better, but it would be better to make it enable to choose how frames will be interpolated.

    Thanks.
     
  41. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Hi, crystani

    I think in your case, you should use 399° to instead 39°. If we use 400° same as 40°, then we will can not do a rotation great than 360°.
     
  42. crystani

    crystani

    Joined:
    Jul 29, 2011
    Posts:
    68
    The problem happens with animations having rotation greater than 360 degree and animations are interpolated. Suppose there is an animation with 0° rotation at 1 frame, 400° at 10 frame. The animation will play smoothly from 1 to 10 rotating 0° to 400° without making any problem, but what If I have another animation 40° to 100° for 11 frame to 20 frame, and the third animation from 20° to 80° for 21 frame to 30 frame?

    Basically, the first animation for the character is for showing 360° spin like Sonic the hedgehog. Let's say other two animations are for attacking and running.

    1. Playing with animation editor there will be abrupt rotation between 10 and 11. (with reverse direction.) Between 20 and 21, there is no problem. (1->2 shows abrupt rotation, 2->3 show okay, 1->3 [by cutting animation clip] shows abrupt rotation at the end of the 1st animation, with just one frame more that 360° spin happens that makes the crossfading look quite ugly.)

    2. You might say why don't make the second and third animation start from 400° instead of 0°. Then the animation will be like 0° to 400°, 400° to 460°, and 380° to 440°. In this case, 1->2->3 will be no problem. So with the editor the animation will look okay. However, if those animations are crossfaded like 2->1 or 3->1, then there will be the same problem like first case. 2->1 interpolation will make 460° to 0° REVERSE rotation (reverse spin.) within very short time while it would much be intuitive to think that there will be only 100° rotation.

    I think that having an option/policy for selecting how it will behave for the rotations more that 360° is necessary.
     
    Last edited: Mar 27, 2012
  43. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    I see you problem now. I will give a workaround to resolve this case work properly soon.
    And, would you give me a example package, and I can test the workaound in your case.
     
  44. ValenUA

    ValenUA

    Joined:
    Nov 14, 2010
    Posts:
    20
    Hi again, if you are holding down the 4.6 realese because of battle heart like template that you promised us, don't bother we already figured out z-order, so we dont really need that template. :) anyway thnx again for your work :) By the way, is there any way to copy and past multiple frames on multiple bones at once, and animate transparency level?
     
  45. livio3d

    livio3d

    Joined:
    Feb 17, 2009
    Posts:
    145
    Hi, actually I'm very happy for how this tool work! I have only one request i can think can help other guys to , the possibility to have a colormap (or multiple colormap if realtimechange dont work) linked to the atlas generated with the atlas editor, (generated colormap can just use the atlas alpha as reference, people can modify after in photoshop).
    My english is not god :D for better reference i link how colormap work on Skullgirls game!
    This can made Changing armor,cloh, hair color easy :)

    http://skullgirls.com/2011/09/a-rather-refined-palette/
     
    Last edited: Apr 4, 2012
  46. ValenUA

    ValenUA

    Joined:
    Nov 14, 2010
    Posts:
    20
    Looks like 4.6 is out! Congrats! :) Also I already have a couple of minor reproducible bugs, may be we should import animations from 4.5.2 in some particular way?
    My bug occurs when character blend from run animation in to machine gun fire animation, both animation have same amount of bones and bone names are also the same, but some bones have different sprites attached to them. And those sprites switch back and forth rapidly when my characters switches(with blending) from run animation in to fire animation. It worked well in 4.5.2. Any tips?
     
  47. typehm

    typehm

    Joined:
    Jun 24, 2011
    Posts:
    161
    Sorry for the respond too later. I go to a client company for technical support in these days. This company do not allow the web connection, so I can not respond in forum soon now.
    But the email was allowed. If any one need contact me just mail me: typehm@foxmail.com

    The 0.46 was come out, I think you got it already.
    You can drag in timeline to start a multi-selection to select multiple frames, use the context menu copy/paste keyframes can copy/paste the keyframe.
    About transparency level, did you meaning transparent a parent bone can affect its children? It can not support now.


    Hi, would you talking more details about the colormap feature in your mind with the EasyMotion2D.




    Sorry for the bugs.
    Could you send a package that can be reproduce the issue to me?
    My email: typehm@foxmail.com.
     
  48. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,047
    Hi typehm, after update to 4.6.2 there seems to be some name conflict with Spritemanager2 sprite class? Getting some errors

    Code (csharp):
    1. Assets/EasyMotion2D/EasyMotion2D.Demo/scripts/CSharp/PackSprites.cs(23,38): error CS1502: The best overloaded method match for `System.Collections.Generic.List<Sprite>.AddRange(System.Collections.Generic.IEnumerable<Sprite>)' has some invalid arguments
    2.  
    3. (Filename: Assets/EasyMotion2D/EasyMotion2D.Demo/scripts/CSharp/PackSprites.cs Line: 23)
    4.  
    5. Assets/EasyMotion2D/EasyMotion2D.Demo/scripts/CSharp/PackSprites.cs(23,38): error CS1503: Argument `#1' cannot convert `EasyMotion2D.Sprite[]' expression to type `System.Collections.Generic.IEnumerable<Sprite>'
    6.  
    7. (Filename: Assets/EasyMotion2D/EasyMotion2D.Demo/scripts/CSharp/PackSprites.cs Line: 23)
    8.  
    9. Assets/EasyMotion2D/EasyMotion2D.Demo/scripts/CSharp/PackSprites.cs(26,37): error CS0117: `Sprite' does not contain a definition for `PackSprites'
    10.  
    11. (Filename: Assets/EasyMotion2D/EasyMotion2D.Demo/scripts/CSharp/PackSprites.cs Line: 26)
     
  49. crystani

    crystani

    Joined:
    Jul 29, 2011
    Posts:
    68
    Looks like some parts of animation (mesh) are omitted. Here is an example of our game's animation. You can see the guy's hair is not rendered, while primitive limit is not reached, and it the editor things are working properly.



    Do you need to investigate the project file (unity scene file with animation)?
     
  50. crystani

    crystani

    Joined:
    Jul 29, 2011
    Posts:
    68
    Solved above problem by setting different bone name for bones in the same hierarchy.

    Thanks typehm.