Search Unity

[DEPRECATED] Anima2D - Advanced 2D Skeletal Animation Plugin

Discussion in 'Assets and Asset Store' started by sergi_mandarina, Nov 21, 2015.

Thread Status:
Not open for further replies.
  1. Mirgan

    Mirgan

    Joined:
    Feb 2, 2016
    Posts:
    25
    Hi.

    After upgrading to version 2017.2, it became impossible to edit the scene since the editor is very slow. I have only 2 anima2d characters on the scene and if they are off, then the freezes disappears. You can test this by opening any example from Anim2d and copying several times the character. Will this bug fix in the near future or until you roll back to 2017.1?
     
  2. bcos

    bcos

    Joined:
    May 31, 2013
    Posts:
    1
  3. sorasora

    sorasora

    Joined:
    Nov 12, 2016
    Posts:
    10
    pls try reading THIS theme of forum.
     
  4. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Hi,
    This new beta should be compatible with 2017.2.
    Change log:
    v1.1.4 2017-10-22
    - Compatible with 2017.2
    - No more original textures in the build when using SpriteAtlases.
    - With this update we lose some inspector previews.
    - "sharedMaterials" property in SpriteMesh is gone.
    - Fixed Bone2D color setter.
    - Added SpriteMask materials to interact with unity's SpriteMask.
    - Fixed BakeAnimations in 2017.1
    - Examples using new SpriteAtlas assets.
    - Creating SpriteMeshInstance from SpriteRenderer will preserve sorting values.

    https://www.dropbox.com/s/84z79uhassazxuu/Anima2D_1.1.4b2.unitypackage?dl=0

    This is maybe due to the amount of bone gizmo. Try setting all bone gameobjects to a different layer and hiding that layer (find the bones by typing "Bone2D" in the search bar in the hierarchy).

    Try parenting your mask to the head bone.

    PoseManager was designed only for bones. Probably will not change in the future.

    I added both in this beta. Sprite Mask cannot be skinned.

    I added that in this beta.
     
    sorasora likes this.
  5. Yecats

    Yecats

    Joined:
    Jul 13, 2014
    Posts:
    69
    I'm having trouble importing this package in (both the beta that you just released and the one from the store). I'm getting a series of errors, the first one reads:

    Code (CSharp):
    1. Assets/Anima2D/Scripts/Editor/Triangle/Tools/Voronoi.cs(111,33): error CS0029: Cannot implicitly convert type `TriangleNet.Geometry.Point' to `Point'
    I fixed this by specifying the Geometry namespace for each reference to Point.
     
    Last edited: Oct 22, 2017
  6. abvabv

    abvabv

    Joined:
    Mar 4, 2015
    Posts:
    8
    In 2017.2.0f3 version, I can't rename Game Objects in Hierarchy after installing Anima2D -- even with the beta release.
     
  7. Brogan89

    Brogan89

    Joined:
    Jul 10, 2014
    Posts:
    244
    Has anyone made a solution to outlining/highlighting characters or something for Anima2D objects that use sprite meshes and not sprites. I found this blog which helped me towards outlining one instance of a spriteMesh by just changing the code a little bit, but this will only outline one instance, like a head for example. But I want to be able to outline the entire outer section of the sprite meshes as though they are one. like this 654808.png

    Before I go tackle this problem I was just wondering if anyway else has done it and don't mind sharing their process or if anyone already has a good idea on how to do it and point me in the right direction. If not all good, when I figure this out I will post on here how its done. {watch this space} :)
     
  8. SofieGrozovski

    SofieGrozovski

    Joined:
    Jun 19, 2015
    Posts:
    3
    Normal map lighting breaks after binding

    I'm using just standard shader with normal map, which works fine with SpriteMeshInstance/MeshRenderer, but when I try to bind a bone to my SpriteMesh and MeshRenderer becomes SkinnedMeshRenderer it makes something wierd with light - not just rotates shadows in 180 degrees, but twists it unpredictebly. Playing with shader options gave me nothing, as well as googling common troubles with skinned meshes. Am I doing something wrong or it is a bug?
    InkedNoBound_LI.jpg
    InkedBinded_LI.jpg
     
    Last edited: Oct 24, 2017
  9. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Can you send me a project reproducing the problem?
     
  10. SofieGrozovski

    SofieGrozovski

    Joined:
    Jun 19, 2015
    Posts:
    3
    Here is it, Unity version 2017.2.0b9 64-bit, Anima2d - your last update from this tread. (Same thing in Unity 2017.1 with Asset Store Anima2D). Thank you for looking in!
    Everything is set up, to reproduce just head in SpriteMesh Editor and bind the bone. Light fill flip.

    https://drive.google.com/open?id=0BzMgitnl3ixSdXVCYVhnaVJXRVU
     
  11. abvabv

    abvabv

    Joined:
    Mar 4, 2015
    Posts:
    8
    I found the problem: Incompatibility with two scripts in a UI object, "Horizontal Layout Group" and "Content Size Filter" (this one with horizontal and vertical fit properties set to "Preffered Size"). If I change this properties, or disable one script, I'll able to rename objects in Hierarchy again.

    Here is a small project to demonstrate this issue: https://1drv.ms/u/s!Aotiz_qfJKDlhCIbqcUGanDOtHZ_

    Thanks in advance.
     
  12. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    This should be fixed now:
    https://www.dropbox.com/s/1bzcpxbdrjeibck/Anima2D_1.1.4b3.unitypackage?dl=0

    Tangents were missing. Since Unity 5.6 Mesh can RecalculateTangents(). I added that call and it looks correct now. Make sure you reapply in the SpriteMeshEditorWindow to regenerate the mesh.
     
    madmaglio_aofl likes this.
  13. SofieGrozovski

    SofieGrozovski

    Joined:
    Jun 19, 2015
    Posts:
    3
  14. mroverhill

    mroverhill

    Joined:
    Jan 10, 2015
    Posts:
    3
    Hi Sergi,
    thank you for this awesome tool!

    I have couple of questions about Anima2D:

    Are the IK handles expensive for cpu during runtime? Should I bake the animation always after I have the IK animations ready and delete the IKs if I want to optimize the game build?

    Are the meshes that I can create with Anima2D more expensive for cpu than normal meshes or sprites, because they have the bone/skin script attached to it?
    I would like to use these meshes as environment art with a material that uses vertex lighting. This because with vertex lighting the Unity's automated meshes that it creates for sprites is just not what I want when using vertex lighting in their material.
    Ofcourse if you know some other tool that enables manual mesh creation for sprites inside Unity please let me know! :)

    I have noticed that when I move the skinned bones around with Move tool and then undo that movement, unity freezes for one minute to make that undo. Many times Unity has even frozen completely when doing this.
    I currently have Unity 2017.1.2f1

    Just a thought: in Spine2D there was this awesome Offset tool, which helps animators to offset the keyframes while keeping the time area of the animation the same. Any idea if Unity will have anything similar in development?

    Thank you so much for your time!
     
  15. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    1- You should profile your game and decide if using IKs at runtime or not.

    2- You can use Anima2D to convert from Sprite to Mesh (use Export to Prefab option). The generated Mesh is a native Unity Mesh. You can use it with MeshRenderer and it should perform well.
    Remember that Anima2D will override the geometry of the Sprite so you can also use the Sprite directly in SpriteRenderer with your custom geometry.

    3- If you can send me a small project reproducing the problem it will help.

    4- Please check the new Animation Window features here: https://docs.unity3d.com/Manual/animeditor-AdvancedKeySelectionAndManipulation.html
     
  16. nosajtevol

    nosajtevol

    Joined:
    Jun 28, 2012
    Posts:
    219
    Hey guys! There's a new issue for Unity 2017.2 with the skinned mesh combiner. I'm not sure if you support that script or not (sorry if not) but I'm wondering if anyone has any work arounds? There seems to be an issue with Unity itself and it isn't fixed despite what the issue tracker says.:https://issuetracker.unity3d.com/is...ty-sharedmesh-is-null-when-created-via-script. Basically this breaks the skinned mesh combiner script completely and renders it useless, which is a huge bummer. Not sure if they intend to fix it. Any thoughts? Thanks in advance!
     
  17. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    I fixed SkinnedMeshCombiner in the latest beta.
     
    nosajtevol likes this.
  18. nosajtevol

    nosajtevol

    Joined:
    Jun 28, 2012
    Posts:
    219
    Awesome! Wasn't sure if you'd be able to! Thanks so much
     
  19. sigono-chao3

    sigono-chao3

    Joined:
    Jun 16, 2017
    Posts:
    2
    Hello,

    We are a team of ten and we are still experiencing Anima2D Sprite Atlas corruptions like ones reported in #252 and #372 frequently. It usually happens when someone committed a new SpriteMesh asset, then the Anima2D Sprite atlas will be messed up on all the other people's machines. The packages built by our build machine will also be affected. So doing any update to our Anima2D assets would be really painful for us.

    I looked a bit into the code and learned that:
    • The authored sprite geometry data is stored on SpriteMesh asset.
    • A sprite mesh to texture lookup table(s_SpriteMeshToTextureCache) is built when SpriteMeshPostprocessor is initialized on load (Register to EditorApplication.delayCall on load, actual initialization happens later)
    • When a texture is reimported, SpriteMeshPostprocessor will check the lookup table, if the lookup table contains the texture, the postprocessor will load the corresponding SpriteMesh to get geometry data and set to Sprite via Sprite.OverrideGeometry.
    • Anima2D forced texture reimport by writing time stamp to userdata field in the .meta of the texture.
    Our build machine is running Unity with -batchmode argument, and it seems EditorApplication.delayCall will not trigger in batch mode. So it is impossible to update geometry data on build machine without opening the Unity Editor on build machine manually. And is static ctor of SpriteMeshPostprocessor always be called before any Texture import happens? I guess the geometry update might go wrong if the SpriteMesh referenced texture being reimported before lookup table is built. But there is no official document about the order between static ctor with [InitializeOnLoad] and asset reimport, so it is just a hypothesis. Could you help me confirm if it is the case?
     
  20. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Looks like sigono-chao3 and I solved that in private so I will share the solution here:
    If you are building using -batchmode argument you need to first execute this command:
    -executeMethod Anima2D.SpriteMeshPostprocessor.Initialize
    More information here: https://docs.unity3d.com/Manual/CommandLineArguments.html
    This command will trigger a reimport of all the textures used by SpriteMeshes and override the geometry of the Sprites, making the atlases repack properly.
     
    codegasm likes this.
  21. supaworst

    supaworst

    Joined:
    Mar 26, 2012
    Posts:
    45
    Hello, first of all thanks for this awesome tool!

    I'm having issues regarding the onion skin. Basically, i can't figure out how to make it work.
    I've already tried to put my character prefab in your example scene of the robot but it doesn't work. I mean, your model works perfectly but mine (that has apparently the same setup) can't display the onion skin.

    Am i missing something? Could you give me any clue?

    Thanks in advance
     
  22. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Please can you send me a small project reproducing the problem?
     
  23. izyplay

    izyplay

    Joined:
    May 28, 2013
    Posts:
    7
    Hi, guys!

    I'm developing a Avatar Customization System using Anima2D and Unity 2017. Regarding the swap sprite process (changing cloths, accessories, etc), most tutorials indicate that I should use the Animate Mesh Component and create a .Anim file to organize the assets. Honestly I do not consider this approach dynamic and flexible enough. There is another options? Could I change the Sprite of SpriteMesh, like I do in Inspector?
     
    Last edited: Nov 11, 2017
  24. supaworst

    supaworst

    Joined:
    Mar 26, 2012
    Posts:
    45
    Hello, thanks for the reply.
    I'm attaching as you requested a link to download a small project with the same error. Unfortunately, i had to replace all the sprites due to a NDA but i don't think this could be a problem since i'm having the exact same issue.

    https://drive.google.com/open?id=19mTuM9jiupQ90RuB09AAEVV17pJVF0g7

    In the root folder of the project i've saved a scene called "OnionSkinIssue" and basically is the robot scene with the prefab we are using in our game.

    I hope this could be useful

    Thanks again!
     
  25. Mr-Oliv

    Mr-Oliv

    Joined:
    Sep 14, 2012
    Posts:
    33
    Hi!
    Just started to play around with Anima2D, but didn't get far... When I enter the SpriteMesh Edit window, Bind the bones, and then hit Apply, the sprite disappears in the Editor and Game view. If I go back and Unbind the bones the sprite is back. What's going on?
     
  26. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Check the weights, probably the auto calculation failed. Make the bones go through the mesh and make sure the mesh is one region and not several islands.
     
  27. Mr-Oliv

    Mr-Oliv

    Joined:
    Sep 14, 2012
    Posts:
    33
    Adjusted the weights manually, it's working now. Thanks!
     
  28. jhon377

    jhon377

    Joined:
    Nov 16, 2017
    Posts:
    3
    Where did you edit that code, I don't know what to edit after this

    You can pass this parametr from SpringManager:

    springBones .UpdateSpring (m_scaleX);

    And you can get that scale from Transform you need:

    public Transform m_followThisTransformScaleX;

    if(m_followThisTransformScaleX != null)
    {
    m_scaleX = Mathf.Sign(m_followThisTransformScaleX.transform.localScale.x);
    }

    it gives me an error if I put it in springmanager.cs
     
  29. ram23

    ram23

    Joined:
    Nov 5, 2015
    Posts:
    34
    Hi, I've been having the exact same issue. I tried to find what you did but couldn't find exactly how you fixed that. Mind giving me some details on how you fixed it in steps? Thanks
     
  30. johnsoncodehk

    johnsoncodehk

    Joined:
    Feb 19, 2016
    Posts:
    14
    This plugin is near-perfect but there is a very fundamental problem with the bone's axis going to the right.

    I'm using Anima2D to build a 2D game,
    Axis issues extend two issues in my project.

    1: I can not add SpriteRenderer to Bone GameObject.
    Because bone has been rotated 90 degrees, SpriteRender's FilpX / FilpY is not enough to correct the direction.
    I can only create a child GameObject for each bone, add a SpriteRenderer, and left it 90 degrees.

    2: When I animate or adjust the child bone, the position x / y is reversed because the parent bone has been rotated 90 degrees.

    I understand Unity needs to ensure backward compatibility, but Anima2D axis inconsistent with Unity to use it is very strange.
    Anyway, I hope Unity to accept my changes, I changed the bones direction to a global variable, user can easy to change the setting.

    Here is the change of 6 lines of code:
    https://github.com/johnsoncodehk/unity-anima2d/commit/12601927ea87b5fec8132f4f194455bea2408b96
    https://github.com/johnsoncodehk/unity-anima2d/commit/1fae5f0b838bed2f5c149d36726eed94b9940b0d
     
    Last edited: Feb 25, 2018
    Alex-Makovsky likes this.
  31. jhon377

    jhon377

    Joined:
    Nov 16, 2017
    Posts:
    3
    Could you explain in more detail where to make the changes, I am a little lost. thanks
     
  32. deck57

    deck57

    Joined:
    Aug 24, 2017
    Posts:
    11
    You should rotate your object by 180 degrees on the Y axis instead of negative scale. The result is the same, and no need to edit the spring code. (disable the face culling if needed)
     
  33. jhon377

    jhon377

    Joined:
    Nov 16, 2017
    Posts:
    3
    Thanks, it works like a charm
     
  34. Neo-Dragon

    Neo-Dragon

    Joined:
    Feb 29, 2016
    Posts:
    17
    Just wondering - how come any prefab of a spritemesh just has textures all messed up? Is it possible to fix this or extend the editor preview GUI class to fix it?
    I've noticed the textures will either be all pink or all white. It takes the shape of the mesh itself but it looks just like a blob.

    To replicate this just create a sprite mesh from any sprite > add the mesh object to the scene > drag that object back into an asset folder.
     
  35. angusmf

    angusmf

    Joined:
    Jan 19, 2015
    Posts:
    261
    Are we really supposed to use this? Where is the documentation?? anima2d.com redirects to the asset store and there are zero matches in the unity documentation for Anima2D.
     
  36. Anemor2000

    Anemor2000

    Joined:
    Jun 12, 2015
    Posts:
    39
    Hi there, we have a problem with baking animations with IK handles. In many cases, the resulting bone rotation will go from lets say 40degree to 400degree, it looks fine as long as were using the ikhandles but once baked, the result is the bone doing a complete 360 rotation to reach its final position, resulting in nasty looking baked animations. Anyway to fix that? To have a mod360 applied to resulting rotations or something?
     
    MerovingL likes this.
  37. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    874
    I get an error from the spring manager that occurs every frame. Any help?

    Code (CSharp):
    1. IndexOutOfRangeException: Array index is out of range.
    2. UnityChan.SpringManager.UpdateParameter (System.String fieldName, Single baseValue, UnityEngine.AnimationCurve curve) (at Assets/Anima2D/Examples/Scripts/SpringManager.cs:73)
    3. UnityChan.SpringManager.UpdateParameters () (at Assets/Anima2D/Examples/Scripts/SpringManager.cs:66)
    4. UnityChan.SpringManager.Update () (at Assets/Anima2D/Examples/Scripts/SpringManager.cs:45)
     
  38. jmillart

    jmillart

    Joined:
    Dec 23, 2017
    Posts:
    3
    I am working on a project on a team and we are running into this error on one of our computers. I am curious as to what might cause a problem with showBonesImage.

    26542994_721877811348312_1056082654_o.png 26610794_721869314682495_1811563026_o.png
     
  39. jmillart

    jmillart

    Joined:
    Dec 23, 2017
    Posts:
    3
    We are using the most up to date versions of unity and anima 2d as well as playmaker.
     
  40. Brogan89

    Brogan89

    Joined:
    Jul 10, 2014
    Posts:
    244
    Hi, Does anyone know what how to solve the issue from this error
    The error is pointing to SpriteMeshPostprocessor.cs Line:86. But no info about which sprite mesh has the issue.

    I didn't put the model together, my artist did, but I'm trying to figure out why these errors are happening and how to fix them. Any help would be appreciated, thanks.
     
  41. zip-kiev

    zip-kiev

    Joined:
    Apr 18, 2016
    Posts:
    4
    Hi, how about ffd? its very good feature, it is very well work in "spine"
     
  42. PablerChild

    PablerChild

    Joined:
    Jan 24, 2018
    Posts:
    1
    Hi everyone!

    I have a problem with my pipeline with Unity v 2017.3.0f3 and Anima2D. And I don´t know how to reproduce the bug to avoid it. It is about Sprite Atlas of Unity.

    First of all, I use Ps2D, to generate sprites and the correct hierarchy.

    Then, I follow the Anima2D process or method described in the official videos. I create all the Sprite Meshes I need to make a prefab that is going to be called by the code of a coder coleage. After that, I use Slice to edit vertices in Sprite Mesh Editor. Then, I create bones, IKs and I add bones to Sprite Mesh Instance properties in the inspector. In the next step, I make the weighting of the bones.

    I use Anima and Unity to perform the animations.

    Finally, I create a Sprite Atlas with all the sprites I need. When I press the play button, every Mesh Instance shrink. Their position change to another place and, also, they show parts of near sprites in the atlas.

    I don´t know exactly why this is happening and don´t know either how to reproduce it.
    I think this is a problem with the Sprite Atlas because without it the animations goes perfectly.

    I have tried to create the Sprite Atlas of Unity before the steps of Anima2D but this did not work either.

    Maybe the problem is the same that in this Unity issue: https://issuetracker.unity3d.com/is...69.1055769105.1517929094-807074881.1506424508


    I think that another option is make an Atlas with TexturePacker or something like that. Maybe ShoeBox but I don´t know if the compression of the PNGs is the best for Unity, and even for the Pipeline, and the renaming of the sprites of the atlas in Unity.

    I found this:
    http://richardjdare.com/blog/2012/11/atlasmaker-0-7-make-texture-atlases-in-photoshop/

    And I think that is a good option too, but maybe too old.


    If somebody knows how to help, I will be really grateful.
     
  43. ztikkyz

    ztikkyz

    Joined:
    Jan 12, 2016
    Posts:
    5
    I just looked into the forum and can't seem to find the info.

    is it possible to import into anima2D a spine animation.

    I'd gladly turn to anima2D in unity if I could still use all my animations from spine.

    I know as a programmer, that a lot of artist will still use spine, but I'd like to use anima all around once in unity

    thanks
     
  44. MerovingL

    MerovingL

    Joined:
    Sep 19, 2016
    Posts:
    11
    Hi everyone!
    I have a problem with Anima2d.
    Bones some times makes 360 degrees rotation. It looks like flipping angles, or something like if it needs to make 5 degrees rotation, bone makes 355 degrees rotation. Search didnt help me, it feels like only I have this problem =(
    I shall make a video, if it needed. I like Anima2d, its really cool tool, but ths problem just frustating me so much.
    Thank you for help!
     
  45. MerovingL

    MerovingL

    Joined:
    Sep 19, 2016
    Posts:
    11
    Hi, I have the same problem, did you find the sollution?
     
  46. Kellyrayj

    Kellyrayj

    Joined:
    Aug 29, 2011
    Posts:
    936
    Having trouble binding my bones to my mesh. In the sprite editor, I can see the bones I'd like to bind to my mesh. But when I hit the bind button, the top two bones disappear leaving only the parent bone. Any thoughts?

    Screen Shot 2018-02-22 at 12.48.49 AM.png

    Screen Shot 2018-02-22 at 12.48.58 AM.png
     
  47. MerovingL

    MerovingL

    Joined:
    Sep 19, 2016
    Posts:
    11
    And again cannot fix problem with unpredictable rotation of IKS

    And a screenshot of animation curves Anima2D 360 rotation bug curve.jpg
    Frame 1 node should be around 325 degrees, but it jumps to zero unpredictably. The same goes on with lower values also, and it jumps below zero.
     
  48. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Hi, please send me a PM with your scenes/assets that cause the problem.
    Thanks
     
  49. 1ht1baron

    1ht1baron

    Joined:
    Aug 15, 2017
    Posts:
    65
    Hi guys. Which i should use for performance Anima2D or sprite animation? Are there performance differences between them?
     
  50. MerovingL

    MerovingL

    Joined:
    Sep 19, 2016
    Posts:
    11
    Hi Sergi_Valls! Had you got invitation to conversation with scene from me?

    And one more example:
    1. Save idle pose at 0 frame.
    2. I do some very small angle changes at 30th frame .
    3. Load idle pose for looping, and get leg's almost 360 degrees rotation at 60th frame.
    Pic01.jpg Pic02.jpg Pic03.jpg
     
    Sergi_Valls likes this.
Thread Status:
Not open for further replies.