Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

2D Animation Preview Packages

Discussion in '2D Experimental Preview' started by rustum, Mar 14, 2018.

  1. Multifred

    Multifred

    Joined:
    May 16, 2015
    Posts:
    1
    Hi,

    I recently try the package with animation artists I'm working with (I'm a dev) and we are considering using the Animation 2D instead of Spine for our next game. I have to say we are quite thrill by the package!

    Although, my team was surprised and is concerned by the limit of 4 bones influences per vertex you get, especialy since the SkinnedMeshRenderer for 3D animations has been recently increased to 32 bone influences.

    Our animation artists love to have extra control bone to have more dynamism in their animations which is why they frequently use up to 8 bones.

    Is there a plan to increase the amount bone influences in the future?
     
  2. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    159
    What kind of use-cases do you have? If you are asking for skinned vector graphics this is not something we have currently in the roadmap. In the other hand, there are other use-cases where animation and vector graphics can work together. Please let us know what you have in mind.

    Hi, thanks for the feedback. Could you give us a comparison between 4 vs 8 bone influences from your artists?
    The reason behind increasing the number of bone influences in 3D was to facilitate importing and using 3D models created for movie productions. So far using 4 bone influences offers good trade-offs for games, both in 2D and 3D.
     
  3. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    106
    For 2019.1, you will need Animation package v2.1
     
  4. michaeleconomy

    michaeleconomy

    Joined:
    Aug 28, 2018
    Posts:
    14

    Currently i'm using anima2d skeletons on top of sprites based on .pngs, I'd like to swap out the .pngs with .svgs so they look great at all resolutions and i dont' have to have huge files. Is that possible currently?I thoguht i read that it was not supported, but haven't tested it super thoroughly.
     
  5. michaeleconomy

    michaeleconomy

    Joined:
    Aug 28, 2018
    Posts:
    14
    ok, i think i'm also confused, where do we get the latest version 2d animation? I though anima2d for the asset store was the latest.
     
  6. cococol

    cococol

    Joined:
    Dec 15, 2017
    Posts:
    2
    Window - package manager - advanced - show preview packages - all packages

    you should find it there.

    Right now i also have a problem with the 2D animation package. I rigged a 2D sprite before with the package and when i wanted to change the bone placement/redo the rigging with the sprite i couldn't change the bones anymore, they do not show up.



    I made a quick video showing the problem i have, i already tried reinstalling the package and also tried using it in a complete new project, which also didn't work.

    I'm using 2D animation version 2.0.0 preview.1 and unity 2018.3.1f1
     
  7. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    159
    Hi, you have to select the sprite by double-clicking on it. We are aware that this particular setup creates a lot of confusion and we will probably fix in the future.
     
  8. cococol

    cococol

    Joined:
    Dec 15, 2017
    Posts:
    2
    Thank you very much, i can finally change the bones again :D
     
  9. ChaosResolution

    ChaosResolution

    Joined:
    Jan 22, 2013
    Posts:
    39
    I'm trying to Copy and Paste the bones into another sprite which is identical in shape, but it only copies the same two bones each time I try (the red and yellow ones - I'm not sure if that's significant!). See below:





    Am I missing a step needed for this to work? I'd like the bones setup to be identical so that I can re-use an animation.

    Thanks!
     
  10. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    160
    I apologize for asking a question that's probably been answered elsewhere:

    For context, I'm trying to animate a character's full body. They have a head, torso, arms and legs. The tutorials do a good job explaining how to do this, but...

    How could I make the face of my character have its own animation. e.g., blink every 5 seconds? I have one sprite with eyes open and one sprite with eyes closed.

    Question #2: I want my characters to have clothing. How would I layer clothes on top of the character and have the clothes move with the body?
     
  11. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    23
    Make sure you highlight the bones you want before the "copy" action.

    Or you should be able to to use the Copy/paste function buttons as well to get all the bones over:
    upload_2019-2-27_8-48-43.png

    Are you using the PSD importer with a "PSB file" or "Single png file"?

    Let me know if you are unable to do this as you may have encountered an issue in a specific case so we can investigate it.
     
  12. ChaosResolution

    ChaosResolution

    Joined:
    Jan 22, 2013
    Posts:
    39
    Yep, that's how I tried to do it. The problem might be that it's neither a PSD file nor a Single png file though - it's a Multiple png file exported from Texture Packer. I guess that doesn't allow you to Copy/Paste bones between sprites?
     
  13. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    160
    I'm not sure if the PSD Importer is working correctly for me. I've watched this video, and when he drags his PSB file into the project, all the pieces are split apart:


    But when I do the same thing with my PSD file (note he's using PSB, I'm using PSD), it works just like dragging in a normal PNG. I still have to select multiple, go into the editor to select pieces, etc. Shouldn't it automatically split them up into pieces like in the vid?

    I'm hesitant to upload my PSD file here because it's NSFW, but if that's allowed and it'll help, I'll do it.

    Note that the PSD is all one layer. The reason I did that is because of this article: https://blogs.unity3d.com/2018/11/09/getting-started-with-unitys-2d-animation-package/ It says "There are a few things to keep in mind when importing your sprites for 2D Animation. First of all, there is currently no layer support. This means that if you wish your rig to use multiple disjointed sprite meshes, e.g. for arms and legs, you will need to space them out directly on one layer." In hindsight, the video contracts the quote... I'm not sure what's true anymore about this importer.

    Edit: I restarted unity and now my project doesn't compile... I get these errors:

    I reverted everything to before I installed any of these preview packages. I'm trying to take this one step at a time, because installing them seems to break my current project.

    I'm starting with installing the PSD Importer. When I do, I get this error in my console:



    I can clear the console and they all go away. I can run all my tests and they all pass.

    Then, if I restart Unity, when I get back in, I see these errors:

    My whole project is borked and no longer compiles or plays. The Test Runner tab is missing tests, too:



    From the error, it seems that this package brings in NSubstitute and that causes issues with the one I was already using for my tests?

    Edit2: I deleted the NSubstitute.dll I had in MY Tests directory. Now all the errors are about TextMeshPro. I restarted Unity and for some reason those errors are no longer there. I just get a bunch of warnings about GoogleAnalytics. Now I can run my tests again. They all pass. The game runs fine.

    I guess the lesson here is that if you already use automated tests in your project (and therefore had to use NSubstitute.dll), the PSD Importer will mess up your project. The solution is to delete your NSubstitute.dll.
     
    Last edited: Feb 27, 2019
  14. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    160
    Double clicking on what? There isn't one sprite, there's lots of little ones. What editor do I double click the sprite in?
     
  15. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    23

    Got it, it seems like Multiple png file workflow could be the cause.
    It seems like bones must be associated with the root bone in order to copy them over.

    A current workaround would be to reparent the other bones to the first root bone before copying them over.

    I managed to reproduce the Issue internally and we will investigate and fix the issue for an upcoming release.

    Thanks for the info and help for us to make the tool better!
     
    ChaosResolution likes this.
  16. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    160
    I think I found a bug: If you move your bones around in scene view then restart Unity, the "Restore Default Pose" on the IK Manager 2D no longer does anything.
     
  17. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    159
    Hi, please share a screenshot of your setup or a video so I can help you better. Thanks
     
  18. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    23
    Hi there!

    I seem to be unable to reproduce the issue you mentioned currently. May I know how are you moving the bones?
    Are you moving them using the LimbSolver2D?
    upload_2019-3-4_14-39-54.png

    Note that:
    You can either file a bug report with a repro project through = Unity > Help > Report a Bug...
    or
    Let me know any more info you can provide here in the Forums and I'll investigate it.


    Cheers,
    Darren
     
  19. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    106
    Thanks! We will take a look @dquek
     
  20. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    160
    I'm no longer able to reproduce this. Sorry :T
     
  21. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    23
    No worries, we appreciate your help by letting us know in the first place!
    This enables us to make the tool better :)
     
    AcademyOfFetishes likes this.
  22. nukeustwo

    nukeustwo

    Joined:
    Sep 4, 2015
    Posts:
    41
    Hi There, is sprite swapping in animations a supported feature in the current version?
     
  23. Filiecs

    Filiecs

    Joined:
    Oct 6, 2016
    Posts:
    2
    So I uploaded a bug report on this, but I haven't yet received a confirmation but it's quite annoying:
    1. What happened
    When animating a sprite with a mesh, sometimes (seemingly for no reason) a frame of the animation will cause the meshed sprite to flicker in both preview and play mode, but not when just dragging the line across the timeline. The only way we have found to fix it is to add some seemingly useless properties to the animation (such as setting the GameObject or SpriteSkin component of the skinned sprite to be active even though it is *already* active) and even then sometimes the flicker reappears until we then *remove* those properties. It's bizzare. This is very annoying when making animations for our games that use mesh deformation as we have to make sure that there is no flickering in the final aniamtion.

    2. How we can reproduce it using the example you attached
    Either play the 'AnimationScene' or Select 'BodyRigBase' and open the 'animator' window. On frame 27 the meshed 'FootSprite' flickers desptie there being no animation property indicating that it should.
    Then in the animation window select 'FlickerBugFixed' and preview that animation. The flicker does not occur and the only difference are two animation properties setting the 'FootSprite' object and the SpriteSkin object as active even though they are already active.
    Please fix this bug as soon as possible.

    Also:
    We have attempted this but sprite swapping from a meshed sprite to a non-meshed sprite and back seems to *sometimes* cause the bone hierarchy to mess up. However swapping between multiple meshes with the same bone hierarchy is no issue.
     

    Attached Files:

  24. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    23
    Hi Filiecs,

    So sorry that you haven't yet received a confirmation.

    We will take a look and investigate on this issue.
     
  25. thormond

    thormond

    Joined:
    May 11, 2013
    Posts:
    19
    Any updates on sprite swapping feature?
     
    LilGames and foxnne like this.
  26. Reactorcore3

    Reactorcore3

    Joined:
    Nov 27, 2018
    Posts:
    15
    Hey,

    I recently discovered this project exists. I'm currently building a 2D game that features a character with bone-driven skeletal animation. At first glance when going though the different tools, I found Puppet2D, Spine and Anima2D.

    Currently my tool of choice is Anima2D due to it being free, easy to learn and understand (thanks to tutorial videos made by Sergio Tech on youtube) and that it seems to be able to support very low resolution pixel art characters. Its also still being updated and bugs are addressed, which gives me safety to commit to using it long term.

    For the Unity's native 2D animation package, I wanted to raise a voice for the sake of low resolution pixel art multi segment characters, as I've noticed they're under-represented and not accounted for with bone 2D animation solutions, which usually focus on high resolution images with smooth curves and support deformation.

    I personally grew up playing games that features characters that were roughly 24px or 48px tall (Soldat and Cortex Command respectively) that had multi-part/sprite characters driven by bone animation and could be turned into a ragdoll upon death or concussions and easily dismembered. Each body part was an individual image and the code put the parts together and animated them either via bones or physics. The characters featured full 360' aiming and fps controls. They felt like the best and most flexible avatars I've controlled in video games ever.


    https://wiki.soldat.pl/index.php/Soldat's_Comprehensive_Movement_Tutorial (check out the gifs here)


    My request is please make sure the native Unity 2D animation system will support these types of low resolution pixel art characters where an individual body part could be as small as 6x6 or 20x20 pixels. No mesh deformation, just rigid images that can rotate freely.

    Besides that, I would wish for these features too:
    • Easy ragdoll toggle
    • Easy dismemberment
    • Easy system to attach or remove items/clothing/accessories
    • Easy look-at for the character to point their head and held item/arm at mouse location

    (Intrusion 2, another game with low-res bone/physics driven animation)


    Thank you.
     
    Last edited: Mar 23, 2019
  27. regie4233

    regie4233

    Joined:
    Feb 14, 2019
    Posts:
    7
    I am wondering can you manipulate the position of the "hand" for example in the script?
     
  28. irenya

    irenya

    Joined:
    Nov 22, 2017
    Posts:
    6
    I have this exact issue working on Unity 2018.3.8f. If i go to 2018.3.0f2, I can get it to work fine only when using the shortcut 'B' to create bone (not by clicking on the "create bone" button. I'm on a Mac, if that's any help.
     
  29. irenya

    irenya

    Joined:
    Nov 22, 2017
    Posts:
    6
    This is my own reply to my previous post a few hours ago here. I finally (seem to) have figured it out. You need to double click on the sprite to make it work. I haven't found anywhere in the instructions from the Unity blog, or in the Brackeys tutorial where it says that, so I'm not sure if it's different on a Mac.

    There's one thing I can't understand, though: The blog says: " It has been divided into multiple sprites and re-arranged on one layer", with respect to the sprite they use for the tutorial. Which I interpreted as one png file that is imported into multiple sprites (otherwise, I'm not sure what "multiple sprites" means here). But if I do that, it only adds bones for whichever sprite I double click on. So if i double click on the torso sprite, to get the bone creator to work, all bones will be created for that sprite and weights are only going to be generated for that sprite.
    Upon closer look into the videos at the blog, I realise that the sprite is actually imported as a single sprite, not multiple.

    Then, could anyone explain to me what is the point of dividing the sprite into sections? We only have one sprite anyway and, in my case, as it turned out to be, it causes issues because I now cannot move the arms towards the shoulders. Since the weight of the arm bone does influence the torso a bit (as it should), when i try to drag the arm towards the shoulder the shoulder "moves away" from the arm.

    I'm now going to start over with a sprite that is not divided into sections. But I truly can't understand what the advantage would be to do it in that way, when basically it implies that you have to rearrange the sprite manually in the scene view.
     
  30. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    138
    What you are asking for can be easily done without a skeletal animation system.

    @dquek : Where is the status of 2D Animation system and PSD Importer? I could not find it in the roadmap when I select "2D" tag. (Maybe I don't understand how to view that page).

    I love the PSD importer and the Skinning Editor it automatically added. How stable is it? I would love to use it in Production, but am worried about doing that since it is a "Preview" feature.
     
  31. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    138
    @dquek
    Can someone help me find this info in the Roadmap? (2D anim, 2D IK and PSD importer status)
     
    dquek and EvOne like this.
  32. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    23
    Hi there!

    2D animation and PSD Importer are Targeting for 2019.3 Verified Package.
    In 2019.2, we are intending to deliver a SpriteSwap as preview feature.
     
    LilGames and EvOne like this.
  33. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    523
    About PSDImporter.

    I cannot reimport the PSB (right click on it and reimport) because I will lose my prefab connection and all the work done.
    I cannot change the PSB platform settings to Android ETC2 8bit compression because when I apply the changes I lose the prefab connection forever.
    Same thing happens if I delete the Library folder and Unity re-imports everything. I lose prefab connections.
    This is really disappointing...
     
    EvOne likes this.
  34. Rafarix

    Rafarix

    Joined:
    Jan 29, 2018
    Posts:
    2
    I'm not sure if this has been brought up but for me it seems the 2D animation package breaks my tilemap pallet. I have even tried making a brand-new project with just this preview package added and it breaks the pallet as well.

    This seems to have been persisting for me at least since version 2.0.0 preview.2. However version 2.0.0 Preview.1 doesn't have this issue. (I was using Unity 2018.3.12f1)

    Here is a screen shot of what happens. This is a new blank project with Unity 2019.1.0f2, and the only preview package I have installed is 2D Animation v2.1.0 (preview2)
    BrokenTilemap.png

    I should also note that I installed the preview package first before importing in the image I was going to add to the tile pallet.

    Removing the package will not fix the issue with the tilemap pallet, but when I reverted back to version 2.0.0 preview1 it did fix this issue, however it doesn't seem this older version is available in Unity 2019.1.0f2.
     
    Last edited: Apr 16, 2019 at 9:46 PM
    NotSoAI and beebes_ like this.
  35. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    191
    @Rafarix Sorry about this, there is a fix incoming for this in a future version of Unity 2019.1.
     
  36. Rafarix

    Rafarix

    Joined:
    Jan 29, 2018
    Posts:
    2
    Thanks, that's good to hear that a fix for this is coming soon.
     
  37. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    166
    Hi, I might be late to the party, but I just discovered this, and was confused since I though Anima2D was the official Unity tool for 2d skeletal animations.

    We're just about to start animating for our game, and I've scratched the surface of Anima2D and like how it works with setting up bones, swapping sprites and using IK.

    Can someone briefly give me a comparison between Anima2D and v2.1 of the 2D Animation Package. Pros and cons? Which will be in development and getting upgrades in the next 6-12 months?

    Thanks!
     
  38. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    138
    It's all in Preview still, so stick to Anima2D.
     
  39. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    166
    Thanks, yeah I noticed that, but I read somewhere that Anima2D isn't getting any future updates. I find it weird that these two packages are competing against each other, so I guess one or the other might get cancelled. Any reports on that?

    But also I don't need the mesh deformation for most of my characters, can you do animation with just sprites without meshes in the Unity 2d package?

    I find that easier when I want to swap sprites. I tried quickly setting this up, and when I simply swapped a sprite in the sprite renderer, it says "Sprite has no bind poses" and it floats in the air.
     
    EvOne likes this.