[DEPRECATED] Anima2D - Advanced 2D Skeletal Animation Plugin

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?

Is Anima2D dead?

Broken Anima2D features in every latest Unity version, no forum posts from Sergi in over a month, no update to the Asset Store plugin since April, and the latest comment there says itā€™s not being developed anymore: https://www.assetstore.unity3d.com/en/#!/content/79840

Also no news on Unityā€™s own 2D skeletal animation system which has been in development for quite some time: Bringing Anima2D to Unity

Whatā€™s going on?

pls try reading THIS theme of forum.

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.

1 Like

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:

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.

In 2017.2.0f3 version, I canā€™t rename Game Objects in Hierarchy after installing Anima2D ā€“ even with the beta release.

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 3263673--251774--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} :slight_smile:

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?


3265052--251953--InkedBinded_LI.jpg

Can you send me a project reproducing the problem?

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

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.

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.

1 Like

It works! Thank you so much!

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! :slight_smile:

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!

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

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.:Unity Issue Tracker - SkinnedMeshRenderer property 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!

I fixed SkinnedMeshCombiner in the latest beta.

1 Like

Awesome! Wasnā€™t sure if youā€™d be able to! Thanks so much

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?

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.

1 Like