Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[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. Cuttlas-U

    Cuttlas-U

    Joined:
    Apr 11, 2017
    Posts:
    38
    hey ;
    Thanks for this awesome plugin :)
    I have a problem tho , each time I run the editor or my code is compiled all of my atlas images get re-import again ;
    I can attach an image of this problem ;

    if i remove the "[InitializeOnLoad]" from the "SpriteMeshPostprocessor" script then its fixed when I run the editor , but still happens when i compile my code ,

    if i remove the " Initialize() " function inside that script it is all fixed , but i think this is an important function that i cant get ride of it sosimple ,

    I moved my files and Anima2D plugin to a new project , cause I thought maybe I have bad project settings or some thing but still the problem exists ,

    I deleted my files and hold only the Anima2D package and prblem solved ,

    so is there any problem with my atlas and created sprite meshes ?


    Thanks again for all your effort and hard work into this plugin ,

    I pray for you unity guys each day :)
     

    Attached Files:

    Last edited: Dec 23, 2019
  2. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Hi, please make sure you are not using asset database V2.
    Cheers
     
    Cuttlas-U likes this.
  3. unity_MBVHvEMDJyG9OQ

    unity_MBVHvEMDJyG9OQ

    Joined:
    Apr 17, 2019
    Posts:
    3
    Hi Sergi!

    Is it possible to use Sprite Masks on sprites animated with Anima2D? I'm looking for the "Mask Interaction" on the sprite meshes, but I can't find it to turn on "Visible inside mask" (added an image below).



    Is there anyway to smoothly/easily use Anima2D with Unity's Sprite Masks and how do I go about?


    Thanks in advance!
     
    Last edited: Dec 23, 2019
  4. Cuttlas-U

    Cuttlas-U

    Joined:
    Apr 11, 2017
    Posts:
    38

    Hey again , I hope u have a nice day ;

    Its not data base v2 as I said i already tested the problem in a new project too ;




    What i did for now as u can see in the below picture is that I created a condition in the scriptable Object so at least the designers and programmers can temporarily disable anima 2d so they can work with editor but still I'm searching for an actual solution to this;

     
  5. Cuttlas-U

    Cuttlas-U

    Joined:
    Apr 11, 2017
    Posts:
    38

    Updating to version 1.1.8 fixed the problem ,
    Thanks
    Sergi_Valls for the help ,
     
    Sergi_Valls likes this.
  6. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    565
    It would appear that adding a call to this function in Unity Cloud Build's pre-export field works! It's still odd that "local" builds on my machine don't have the problem and Unity's own build solution does. Hopefully you and the Cloud Build team can exchange a couple emails and get that sorted? ;)

    Thank you for the solution.
     
  7. Ryukidmm

    Ryukidmm

    Joined:
    Aug 14, 2018
    Posts:
    6
    I am using 1.1.5.
    I can't update assets for business reasons.

    What version can I remove SpriteMeshInstancePostProcessor?
     
  8. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    Does anyone here know how to use masks with Anima2D spritemeshes? I've seen people talk about it before with Anima2D in forums, but I cannot find the settings for mask-interactions with animated Anima2D spritemeshes in unity.
     
  9. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    Hi all!

    To those who find my question and wonder the same thing themselves, I'll leave my fix here.

    Due to Unity recently officially adding their own bone 2DAnimation (with support for mask-interaction which I was looking for in my question) I've decided to remake all my animations in that new system. It's very similar to Anima2D and is now a native tool. Here's a tutorial on using unity's new system:


    Anima2D has been amazing for so long :) the new Unity system seems to be inspired by this asset. Perhaps Unity decided (after the popularity of Anima2D) to ultimately make a native tool in Unity. I thank Anima2D and its creators for the time I used it, it's been great!
     
  10. codegasm

    codegasm

    Joined:
    May 3, 2015
    Posts:
    38
    I'm experimenting with upgrading my project from 2018.4 to 2019.3 in preparation for 2019.4 LTS which I hope to move to. I have a problem where all my Anima2D SpriteMeshes are now displaying the full atlas in play mode. I know that this is usually fixed by adding a call to `Anima2D.SpriteMeshPostprocessor.Initialize` before the build process. But in this case it is happening in the editor. In edit mode everything looks and works fine but once I enter play mode I see the full atlas on each SpriteMesh. I can also see that Anima2D is triggering the re-import of the affected sprites just before entering play mode but it isn't having the effect that it should.

    Any ideas what I can do to resolve this issue?
     
  11. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    Hi, I don't have answers to how to fix this in Anima2D but want to share my take. I got problems in 2019.3 as well, additionally I was also looking for mask-support on bone-animated sprites which I couldn't find for Anima2D.

    I want to write to you in case you don't know this, but Unity very recently added a native 2D bone animation tool that has support for the same things that Anima2D has. It's called Unity 2DAnimation (here's a tutorial on it)

    As the native tool will be supported by unity directly, and has even more functions (as I've understood it, and functions that I needed like mask-interaction) than Anima2D, I've decided to migrate to Unity's new native 2DAnimation system. That could perhaps be something for you as well!

    Just wanted to write this in case you didn't know. Best of luck to you!
     
  12. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Hi, please try if using AssetDatabaseV1 instead of AssetDatabaseV2 works. Send me a PM if not and I'll check what I can do. Anima2D relies on an old Sprite override API that may be broken in AssetDatabaseV2. I need to double-check.

    Mask interaction in Anima2D is done using a different material. You can find them in the samples folder if I recall well.

    Adopting the new 2D Animation package is the correct strategy.

    Cheers.
     
    PedroSchabib likes this.
  13. codegasm

    codegasm

    Joined:
    May 3, 2015
    Posts:
    38
    Thanks for your quick response. I tried a fresh clone of my project without migrating to AssetDatabaseV2 this time and it worked! Please keep us informed on when V2 is supported as V1 is deprecated from 2019.3 and on.

    Yes, I have been waiting for that system to go live so I can consider migrating to it. Unfortunately it has taken so long that I now have a considerable amount of things built on Anima2D. Migrating will be a big job and I don't intend to do so until the new system has been out for a while, if ever. Thanks for your input though!
     
    PedroSchabib and LilGames like this.
  14. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    Thank you för your reply Sergi! I was wondering if you know if Anima2D is better performance-wise in comparison to Unity's new 2DAnimation with bones?

    I'm testing them both, and with Anima2D when I copy several sprites animated with your asset into the scene the fps remains more or less the same. Super nice performance! If I do the same with sprites animated with Unity's 2DAnimation the fps take big hits however.

    I did a performance-test with small sprites. I've attached a video with it below. When I turn on 36 animated objects (with 6 vertices each) with anima2D vs 2DAnimation the CPU rendering-time is ~ 11 ms for Anima2D and ~13 ms for 2DAnimation.


    (See 00:29 for 36 animated objects Anima2D and 01:23 for 36 animated objects with Unity's 2DAnimation)

    There's a difference of 2 ms for just 36 sprites. Do you know if Anima2D has better performance than Unity's 2DAnimation, It seems so? Or do you know how they compare?

    I think if so I will stick to anima2D. I plan on having NPCs and using 2DAnimation with 3 characters bogged my computation time to 30 ms!
    I found the visible-insde mask-shader! The issue now for me is it also has to react to in-game light. Below you can see how all my sprites react to light except the one with the visible-inside-mask-shader:

    Do you know how I can modify this Anima2D shader to also react to light?

    I really appreciate hearing your thoughts, thanks so much in advance. You're awesome :)
     
    Last edited: Jan 30, 2020
  15. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    For anyone else that's wondering this, this is my conclusion after looking into this further.

    Unity 2DAnimation very recently released an update to its asset that makes it much faster (you can read about it in the main post here: https://forum.unity.com/threads/2d-animation-is-out-of-preview-for-2019-3.818724/ ).

    When I activated this update (with Burst and Collections) according to the thread-instructions 2DAnimations became much faster. It is now no longer effecting my fps in any noticable way (just like Anima2D).

    Therefore it looks like 2DAnimation and Anima2D are currently comparable in speed. My guess is that since 2DAnimation is a native Unity tool they will also continue working on it to make it even better.

    For these reasons I've decided to once and for all migrate all my animations to 2DAnimation.

    But I wish to thank Anima2D for being excellent for so long! :)
     
  16. PedroSchabib

    PedroSchabib

    Joined:
    Oct 2, 2015
    Posts:
    10
    Hi, I have a problem with update 2019.3.0f6. After I update my project every time I play the project, a new atlas is created for my sprites. I think this problem happen because Anima2D change the Sprite Mesh in editor.
    I dont know, is it possible that i am right? but this dont happen in version 2019.2.8f1
     
  17. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Hi, make sure you are using the latest version of Anima2D. Delete it from your project, open the asset store within unity, update the package and reimport. Also, make sure you are using AssetDatabaseV1.

    Cheers
     
  18. PedroSchabib

    PedroSchabib

    Joined:
    Oct 2, 2015
    Posts:
    10
    Hi Sergi, I had already done that. But I found the problem in my project. Is a conflict from Anima2D and 2D Animations plugins. I was creating a Sprite Mesh from Anima2D and a Skin in Skinning Editor from same Sprite. It´s forced the Editor to create a new Sprite Atlas everytime.
    Sorry, It´s my fault.
    Very Thankyou for atenction.
     
  19. sorasora

    sorasora

    Joined:
    Nov 12, 2016
    Posts:
    10
    https://ibb.co/PCzDNhF
    screenshot
    unity 2019.3.0
    Mesh.uv is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
    UnityEngine.Mesh:set_uv(Vector2[])
    SkinnedMeshCombiner:Start() (at Assets/Anima2D/Examples/Scripts/SkinnedMeshCombiner.cs:105)
     
  20. LcarnesUB

    LcarnesUB

    Joined:
    Nov 4, 2019
    Posts:
    3
    Hi there!

    Anima2D is great! I've been considering it for a new project, and to maintain some older ones. I understand that no new features are going to be made for it. Would anyone know how many future versions of Unity Anima2D will be guaranteed to be supported in?

    Apologies if this question has been asked before. Any link to that information would be much appreciated!
     
    Last edited: May 15, 2020
  21. stickylab

    stickylab

    Joined:
    Mar 16, 2016
    Posts:
    92
    am i the only one who always get this warning ? and some times when i bind the mesh ,,, it wont binned i dont know why

    and this warning always appear ,sad

    Warning : number of sprite mesh bindposes and number of bones does not match
     
  22. stickylab

    stickylab

    Joined:
    Mar 16, 2016
    Posts:
    92
    please help me to fix this


    upload_2020-5-27_20-34-47.png
     
  23. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Double-posting with bold text isn't going to get anyone to help you. :/


    Try italics next time.


    No, seriously though. Don't.
    And underline won't help either.
    What MIGHT help is providing some details as to what your specific project setup looks like. Stuff like what version of Unity you're using, what kinds of assets you might be using, and what, if any, preview packages you might have floating around in your project. Also, most importantly, things like what steps you've tried to resolve the issue yourself.

    When you first show you've taken the time to try and help yourself, others are more likely to give the time to help you.

    Time is valuable.
    Acting like you're entitled to other people's time doesn't actually entitle you to it.
     
    LilGames likes this.
  24. stickylab

    stickylab

    Joined:
    Mar 16, 2016
    Posts:
    92



    you're too complicated ,, i fixed it by minimalizing all the things when i slice it on sprite mesh editor ,,just it
     
  25. stickylab

    stickylab

    Joined:
    Mar 16, 2016
    Posts:
    92
    this is normal view when i dont use skinned mesh combiner ,, because i want to reduce the batch ,so i have to use it,,


    upload_2020-5-28_0-11-42.png




    When i use skinned mesh combiner ,,
    upload_2020-5-28_0-13-32.png



    this is the result :'( its become ugly ,,


    upload_2020-5-28_0-10-48.png


    please help me
     
  26. Sprawl

    Sprawl

    Joined:
    Jan 19, 2014
    Posts:
    42
    @Sergi_Valls

    Hi ! After switching to the 2019 LTS, I've also been having issues with reimporting and sprite atlas. It seems staying on AssetDatabaseV1 is the only way to fix it so far. Switching to the new 2D Animation package is not an option since we already have dozens of rigged and animated characters with Anima2D.

    Are there any plans to support AssetDatabaseV2 as the first version is now deprecated ?

    Thanks
     
  27. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Hi, I have a working solution for this one. I need more time to polish some things but should do the job. Make sure you make a backup. If there is any problem, please let me know.
    https://www.dropbox.com/s/a1rn727jpce5cd4/Anima2D_1.1.8_b1.unitypackage?dl=0
    • Only for 2019.3/4. Won't work in older versions.
    • To install you should first completely remove Anima2D's directory as the internal folder structure has changed.
    • Anima2D uses now asmdefs for Editor and Runtime. You will have to add the right dependencies to your asmdefs if you are using the public api.
    • Anima2D now depends on com.unity.sprites package, included by default in 2019.3 but not in 2020.1.
    • This version will migrate the mesh information into the TextureImporters using the new data provider API. You can now continue authoring your Sprites using the 2D Animation package.
     
    vsprattus and tosiabunio like this.
  28. Federico_Russello

    Federico_Russello

    Joined:
    Jul 23, 2019
    Posts:
    1
    Hello,
    I've been using anima for a while now, everything worked fine until today.
    Since i've started some "in-game cutscenes" with the playble director i had some issues: animate the character often create a lot unwanted bone's rotations, and i can't move some bones properly, they just wont follow the mouse in the right direction.
    Apparently now i have this problem even outside the playable director section for some reason, and i can't find a way to fix it... tried re-importing anima and the whole project into a new one but nothing seems to work,
    please help!

    [SOLVED]
    Accidentally set the scale of the main parent to Z = 0, once put it back to 1 works just fine :)
     
    Last edited: Jul 9, 2020
  29. unity_CZ357CvJz8pzZA

    unity_CZ357CvJz8pzZA

    Joined:
    Jun 28, 2019
    Posts:
    11
    Thank you, just reimported our spritemeshes and everything looks good now!
    Just one thing we faced - some of our spritemeshes had 0 bones, and that threw exception at vertexOrders calculation while reimporting. As quick workaround I've just put 0 weight to them!
     
    Sergi_Valls likes this.
  30. FlavrTown

    FlavrTown

    Joined:
    Dec 19, 2016
    Posts:
    4
    @Sergi_Valls I'm having an issue with anima2d where binding bones to sprite meshes causes the sprite mesh to disappear in the game view. I can unbind the bone from the mesh after and then see the mesh in the game view. This problem happens with almost all of my sprite meshes but not all. I've researched the issue online already and tried every solution I found such as confirming my weights are valid and setting the skinned mesh renderer quality property to 1 bone. Do you have any idea what might be causing this? I am on unity 2019.3.5f1 and also tried switching my asset database to v1 which did not fix the problem either. I don't want to use the new unity 2d animation package since it currently has poor support for sprite swapping
     
  31. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Could you send me a PM with a project reproducing the problem? Thanks
     
  32. blackf13

    blackf13

    Joined:
    Jul 20, 2018
    Posts:
    3
    Please see error in video, I use 2019.4.8 and 2019.4.7



    I cannot move bone with Move Tool, can not change length parent bone, move child bone can not rotate parent bone.

    Thanks and sorry for my poor English
     
  33. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Activate the Gizmos by clicking the "Gizmos" button in the SceneView's toolbar.

    Cheers
     
  34. blackf13

    blackf13

    Joined:
    Jul 20, 2018
    Posts:
    3
    Thank you very much, , it's my fault.
     
  35. wangkaitong

    wangkaitong

    Joined:
    Jan 8, 2020
    Posts:
    1
    Mesh.uv is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
    UnityEngine.Mesh:set_uv(Vector2[])
    SkinnedMeshCombiner:Start() (at Assets/Anima2D/Examples/Scripts/SkinnedMeshCombiner.cs:105)
     
  36. nantoaqui

    nantoaqui

    Joined:
    Oct 1, 2014
    Posts:
    42
    Hello!

    I'm having trouble setting up the correct PPU. I did all animation based on ppu = 100, but once the value is changed the bones gets distorted.

    ppu = 100

    Screen Shot 2020-11-18 at 08.08.02.png


    ppu = 700

    Screen Shot 2020-11-18 at 08.08.30.png

    Is it possible to re-scale the bones again?
     
    EvOne likes this.
  37. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Changing the ppu changes the size of the mesh and the position of the bind pose matrixes in that mesh. The bones in the scene haven't been modified to match the new bind pose matrixes, so you will have to rebuild your bone rig to get smaller ones, set the IKs again and and fix/redo your animations.
    Also just a reminder that this thread is for Anima2D questions only. Please use the 2D forums for questions about the 2D Animation package.

    Cheers
     
  38. Elementa481

    Elementa481

    Joined:
    Sep 26, 2015
    Posts:
    8
    Hello!

    Only used Anima2D a little bit, but it's good stuff!

    Sorry if I missed an answer to this in the forum, but the spritemeshes contained in prefabs are not showing in the thumbnails. I just see blank for all that is spritemesh. I can still see everything when I open the prefab and enter prefab mode, so this isn't a critical issue, but is there a way to enable the previews somehow?

    Much appreciated in advance!
     

    Attached Files:

    Last edited: Nov 24, 2020
  39. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    The reason the thumbnails are not showing is the renderers in that prefab contain the sprites-default material. If you set a material that uses the original texture you might be able to show previews. I wouldn't recommend that because then the original texture of the sprite will get included in the final build along with the atlas (if using them).
     
    Elementa481 likes this.
  40. SaphirLabs

    SaphirLabs

    Joined:
    Jan 24, 2017
    Posts:
    4
    Hello,
    I have this error with SkinnedMeshCombiner:Start :
    Mesh.uv is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
    UnityEngine.Mesh:set_uv(Vector2[])
    SkinnedMeshCombiner:Start() (at Assets/Anima2D/Examples/Scripts/SkinnedMeshCombiner.cs:105)
    Thank you.
     
  41. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Hi, can you PM me with a small project reproducing the issue? Thanks
     
  42. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    This version should contain the fix for this:
    https://www.dropbox.com/s/2opzeedhbk9qqn2/Anima2D_1.1.8_b2.unitypackage?dl=0
    Cheers
     
  43. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Anima2D is no longer under development and will be removed from the Unity Asset Store in early February. We strongly recommend that users make the switch to using Unity 2D Animation tooling to help us consolidate our efforts and make it better. Please see this announcement for more info.
     
Thread Status:
Not open for further replies.