Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

2D Animation Preview Packages

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

  1. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    13
    2DAnimation.gif
    We’ve been hinting at it for a while but now it’s time to share: We’re working on 2D animation.

    First of all, a few important points:
    • This is NOT an integration of Anima2D into Unity.
    • We will be releasing it in multiple phases.
    • Phase 1 of this work is now available as a preview package.
    Phase 1:
    This phase was focused on developing tooling for rigging a sprite for skeletal animation. The tools developed in this phase include: Bind-pose editing, manual mesh tessellation, skin weights painting. A runtime component ties this all together to drive sprite deformation.

    The goal of Phase 1 is to allow users to create simple animated characters that consist of a single sprite.

    Phase 2:
    This will be built on top of features and workflows developed in Phase 1. This includes tooling to make the creation of multi-sprite characters more efficient. We are also considering workflows for larger productions.
    The goal of Phase 2 is to allow users to create complex multi-sprite characters and potentially share rigs and animation clips across multiple characters.

    We believe we are at the end of Phase 1, and in order to progress into Phase 2 with confidence we need your feedback.

    Getting Started:
    1. Download and install the latest Unity 2018.1 beta, here: https://unity3d.com/unity/beta-download
    2. Get a project that includes samples and documentation here: https://github.com/Unity-Technologies/2d-animation-samples
    Please let us know about your experience with the features.
    What worked as expected?
    What didn’t?
    What workflows did we support correctly and what did we miss?

    We're eager to hear back from you so please reply to this post or create a new post to share your thoughts!

    _______________________________________________

    Update 1
    To get the latest, follow the instructions in Getting Started above.
    • Improved Scene View gizmos for better manipulation of bone rotation and position
    • Added notification when Sprites are imported with incorrect weights
    • Fixed bug where textures with max texture size could not generate geometry
     
    Last edited: Apr 12, 2018
  2. Kiupe

    Kiupe

    Joined:
    Feb 1, 2013
    Posts:
    409
    Sounds great !
    Today we use Spine from esoteric software which is great. Having the same kind of tool directly integrated in Unity would be nice. Some feature like be able to swap an image during an animation, or change sprite draw order or the possibility to create skins are must-have for us. I hope that kind of features are in your road-map :)
     
    _watcher_ likes this.
  3. thomak-dev

    thomak-dev

    Joined:
    Mar 8, 2015
    Posts:
    13
    Will it be possible to animate using IK-handles?
     
  4. ryanreptoid

    ryanreptoid

    Joined:
    Aug 12, 2012
    Posts:
    74
    Looks pretty cool! We're long time users of Spine and love this sort of functionality. Has there been any improvements to the gimbal locking problems that the Unity Animation timeline suffers from when keying rotations?
     
    francodega likes this.
  5. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    6,885
    Isn't that exactly what the video above is demonstrating?
     
    jhocking likes this.
  6. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    18
    Can you gimble lock in 2D?
     
  7. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    1,875
    When adding a bone to an existing skeleton, the current behavior is this:
    new bone appears at the end of the selected bone

    instead the bone should appear at the origin of the selected bone
     
  8. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    1,875
    When changing a skeleton, apply should also redistribute skin weights or at least not erase all skinning
    It just lost all the skinning even though the weights are shown in the editor

    probably a bug with this:
     
  9. ryanreptoid

    ryanreptoid

    Joined:
    Aug 12, 2012
    Posts:
    74
    Good point! I guess not. I'm still weary of Unity's animation timeline vs something like Spine or Maya, though.
     
  10. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    6,885
    Why? The current behavior makes more sense to me, as it lets you extend a skeleton, easily creating a chain of bones. If you want to create a branch, you need only select the parent bone.

    If it always created the new bone at the origin of the selected bone — i.e., created a branch — then how would you create a chain?
     
    MeteOzguz and theANMATOR2b like this.
  11. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    1,875
    Click click click just like in Maya and in this thing ;) A chain is an append to the previous bone. A bone is only a position transform and only acquires a rotation and a size when you click a second time. But maybe I'm wrong and maybe Maya is wrong too so have you actually tried appending a bone to a chain in this thing and found that it makes sense?
     
  12. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    6,885
    By "previous bone" you mean the currently selected bone, right? (Because a newly created bone is automatically selected.)

    So I guess I misunderstood you — I thought you were saying you didn't like this behavior.
     
    jhocking and laurentlavigne like this.
  13. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    1,875
    Yes, that's correct, thanks for clarifying, I'm sure your input makes the dev work easier because obviously my description was not clear enough.
     
  14. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    13
    This is great feedback! These are exactly the kinds of features we have in our plans. What other features are must-haves to support your workflows? It's very useful for us to know what workflows we should be supporting, so feel free to describe your needs in these areas as well.

    Do let us know what Spine and Maya provide that you are missing in Unity.

    Keep the input coming! We're learning a lot!
     
  15. _watcher_

    _watcher_

    Joined:
    Nov 7, 2014
    Posts:
    77
    Looking good!

    We need:

    1) FFD please.

    Once your bone-based deformations are ironed-out, people will surely start asking about this.

    2) And If you plan to have anything resembling vertex-level deformation support, having something like Creature's "motors" (algorithms that run on top of vertex matrices, bones, or "mesh regions") would be helpful to speed up the workflow N-fold.

    Example Features I'd like to see
    Here are some examples of "motors", that Creature implements on top vertices/mesh regions (vertex groups)/bones, that i like:

    > Bend Physics / Secondary Motion (Applies rope and bend physics to bones - wiki, creature tutorial)
    > Cage Motor / Grid Motor (Deforms mesh using points on cage boundary/via set of Grid Points - similar to Photoshop's Warp/Puppet Warp - image example)
    > Physics Motor (Deforms the mesh using soft body physics)
    > Path Bone Motor (Makes bones follow a user defined path)

    Performance-wise there are different levels of optimization features, fastest of them being - you can bake only vertex positions of your mesh, if you don't need physics interactions, sprite swapping or bone manipulation, resulting in extremely high animation performance.
     
    Last edited: Mar 15, 2018
  16. Neo-Dragon

    Neo-Dragon

    Joined:
    Feb 29, 2016
    Posts:
    14
    I've been using Anima2D for over a year now and seeing this makes me very excited.
    If you guys can pull off features proposed in Phase 2 I'd switch to this on my next project, for sure.
    I played around Phase 1 and I think it's an amazing start.
    I think you should prioritize ease of sprite switching.
    An example would be a character that could have equipable armor. An easy way to keep the skeleton but swap out the helmet or chest piece. The correct bone should bind but the sprite should have its own mesh tesselation.
    (Does that make sense?)

    Edit:
    Are there plans for a spring bone (for cloth/rope sprites)?
     
    Last edited: Mar 15, 2018
    djweinbaum and laurentlavigne like this.
  17. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    73
    Hi, thanks for playing with the new tools :)
    If you change the skeleton you need to make sure you regenerate it in the scene. To do that, delete the RootBone reference (or delete the bone hierarchy) so the CreateBones button becomes enabled. Remember that your new bones need weights, so you also need to update them in the MeshModule.
    SpriteSkin Inspector will tell you why the setup is incorrect. In your case bn_bod_6 and bn_bod_7 have no Transform reference set, so skinning is not possible and will be disabled.
     
    _watcher_ likes this.
  18. Kiupe

    Kiupe

    Joined:
    Feb 1, 2013
    Posts:
    409
    Another feature that is really cool is be able to have separate group order in the same character. That way you can correctly "plug" objects into your character. For example you can place a motorcycle behind one leg and un front of the other leg of a character.
     
    theANMATOR2b and laurentlavigne like this.
  19. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    1,875
    I see, fail early is a valid approach. you didn't want to auto update weights and hierarchy?
    I think that Bn6 and 7 were deleted by mistake and I pressed undo after that so have a look at undo, it seems that it doesn't revert reference lost.
     
  20. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    20
    One thing that we relied heavily on was to be able to animatie multiple sprite that were in one single atlas, or even better, have the support to pack them to atlas textures afterwards. We had a lot of weird shaped tentacles in really high resolutions (for 4K support). Without the atlases the game would've been 4 times more than it is.
     
    laurentlavigne likes this.
  21. xCyborg

    xCyborg

    Joined:
    Oct 4, 2010
    Posts:
    473
    Support ETC + Alpha compression in the new Sprite Atlas please.
     
  22. playemgames

    playemgames

    Joined:
    Apr 30, 2009
    Posts:
    418
    OK finally got to take a look at this, I'm the maintainer of Unity Sprites and Bones so have a bit of knowledge in the way of animating 2D skeletons in Unity. So here is my feedback so far:

    1) Please do not tie bones and the bone editor to the Sprite Editor, it is extremely limiting unless you can throw in a whole bunch of other sprites into it and edit it from there. I want this to be like all other animation tools, let me define how I want the skeleton to be and the sprites to go along with it, so basically let me set up my character, then the bones come after. Also want to add sprites to different bones and be able to continue to add/subtract as I work. Otherwise the bone tools themselves are adequate enough.

    2) Sprite geometry editor should have a couple more extras, but it is a good start. Having holes is really really nice for certain things. Weighting seems fine, maybe some alpha slider to see the underlying sprites?

    3) Needs something to use the mesh for FFD, it all looks like a decent start to something bigger.

    4) Needs angle constraints or something for the bones themselves, looks like there is just a bool but nothing to customize it between ranges.

    5) Needs some sort of pose editor, again I think there should be some sort of character creation first, then comes the bone creation and pose creation.

    That's all I have time for now, it has some promise since all this is early, but if you marry that bone tool to the sprite editor, it's going to be dead in the water for more than the simplest of characters unless you want a really hairy workflow.
     
    malyzeli and theANMATOR2b like this.
  23. tiskolin

    tiskolin

    Joined:
    Sep 24, 2017
    Posts:
    126
    This seems great, although on second thought it obviously wouldn't work with pixel art so well. This is coming out in 2018.1, correct? Can't wait! :D
     
  24. ColossalPaul

    ColossalPaul

    Unity Technologies

    Joined:
    May 1, 2013
    Posts:
    156
    We are aware of the importance of multi-sprite workflows. We are laying down the designs for multi-sprite character workflows. Multi sprite rigging, skeleton sharing etc etc. These are all in Phase 2 and when we lock down the solution, we'll share it.

    We do have in the (still private) Phase 2 roadmap a pose lib where you can save and reload poses. Thanks for this feedback.

    FFD is something that we want to tackle a bit later but build the underlying support for it now. Some pertinent areas in Unity are undergoing major changes. We are trying to get the timing right by first focusing on skeletal sprites.
     
    EvOne, theANMATOR2b and Zehru like this.
  25. ColossalPaul

    ColossalPaul

    Unity Technologies

    Joined:
    May 1, 2013
    Posts:
    156
    This should be supported if you can't make it work, please tell us.

    We have alluded to the 'Package' format in the post title :D. What that means is we will ship this whole feature as Unity package. It also means we can ship updates/fixes to it within days and not follow the release cadence of the main editor/engine. In other words, we are breaking free from the release cycles of the main product. I hope you guys can experience these with some of the feedback here.

    This should be easily doable with SortingGroup. If you can't make it work, please share with us.

    This is one of the main reasons we have Phase 2. As soon as it is ready, we'll share! Thanks for this feedback.

    Please keep the feedback coming! thanks.
     
  26. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    1,875
    This package release is so good. You guys must feel freeeee :)
     
  27. Watapax

    Watapax

    Joined:
    Sep 3, 2013
    Posts:
    34
    I use Maya to animate complex animation for my characters because Unity dont support pre-post Infinity Curve animation. If unity can support this feature in the timeline it would be awesome.
     
    mahdi_jeddi and laurentlavigne like this.
  28. nuxvomo

    nuxvomo

    Joined:
    Jan 20, 2017
    Posts:
    2
    Any word on the vector graphics importer and if this will work with the 2D animator? Currently using SVG Importer. Also, curious if the vector graphics will work work with Tilemap and Sprite editor/9 slicing/UI.
     
  29. playemgames

    playemgames

    Joined:
    Apr 30, 2009
    Posts:
    418
    Speaking of SortingGroups and sorting order, I want to finally be able to animate them without hacky workarounds, the sorting order and sorting layers should be exposed for all Renderers and SortingGroups so we can finally animate them. Then we can mix 2D and 3D if we want as well in an animation.
     
  30. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    215
    Will the package introduce breaking change for the future update? I would like to use it in real project.
     
  31. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,040
    Sounds promising!

    I tried my hand at making a new skinned sprite, process was a bit confusing at first as the bone/weight creation was in the texture level, but it works. IK Manager was simple to use ( though I'm not sure what the difference between the two chain types is ).

    Here's a bit of an animation I did, not much movement but I'd really love to see something like DUIK limbs for those curvy parts.

     
  32. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    1,875
    Weird IK solution, it seems that the extremities are not rotating
     
    puppeteer likes this.
  33. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,040
    Yeah, I think the limbs I assigned in the IK Manager only covered the mid sections of each limb. Also the number of bones in each limb is to many for the movement I want to achieve. I'll try again with two bones per limb.

    CrawlerBones.png

    I'd love to see how it can be processed in a cleaner way, if you want I can post the PNG of my crawler art here.
     
  34. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,040
    Took another stab at rigging this character, this time with two bones per limb and a cleaner weights setup. I'm starting to really like the native animation tools.

    ezgif.com-optimize(11).gif
     
    moodymagyar and Alverik like this.
  35. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    1,875
    It looks more natural and with smoother weights in the middle you could remove the kins. Still 4 bones shouldn't be that janky so there is a bug to the IK, it might be the algo implemented or the lack of solving weight, you should report it while their is momentum.
     
  36. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,040
    I think it's because I didn't do a clean work on the weights and geometry.

    WeightsAndHeometry.png
    This was auto generated with mostly some cleaning up near the joints.
     
  37. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    1,875
    Use the smooth weight brush, if there is one.
     
  38. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,754
    Agreed.

    Agree - From a quick search this is what is known as Out of Range Limit Curves in 3D Max.

    Please support animate-able squash and stretch on individual bones and bone chains.

    The three best features in 3D Max bone setup are these three.
    upload_2018-3-25_22-26-5.png

    Create bone is self explanatory
    upload_2018-3-25_22-32-26.png

    Refine allows a bone to be split anywhere the artist chooses - without messing up bone scale, orientation or rotation.
    Refine can be performed X times on any chain or single bone without error.
    upload_2018-3-25_22-34-2.png

    Mirror is self explanatory but performs all the negative scale correction 'fixes' behind the scenes - really great for artists.
    upload_2018-3-25_22-35-18.png

    And bone edit mode allows for bone length, chain reconfiguring without messing up any bone transform/scale settings.
    upload_2018-3-25_22-36-31.png

    continued vv
     
    mahdi_jeddi and puppeteer like this.
  39. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,754
  40. ColossalPaul

    ColossalPaul

    Unity Technologies

    Joined:
    May 1, 2013
    Posts:
    156
    Hi, we are preparing to do the same (release preview package) for our own SVG Importer. Give us a few more weeks to polish it a bit more. Technically, it can be rigged to animate but we are still thinking what we should do when the SVG tessellation don't agree with animation.

    Anyway, more when it comes out... please stay tuned.

    Good feedback, this is will go on our list...

    Thanks for this. Let us dive into this...

    This too. Let us dive into this...

    Please don't stop giving us feedback. We are preparing a new iteration and should be out in the next few days (if nothing goes wrong) :D
     
  41. Jorge_Mor

    Jorge_Mor

    Joined:
    Jun 20, 2017
    Posts:
    1
    How it's going to work with pixel art characters? is it going to keep the shape of the character or is going to act like unity handle rotation?
     
  42. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    13
    We've released Update 1 to our 2D Animation preview package. This includes:
    • Improved Scene View gizmos for better manipulation of bone rotation and position. Check the updated documentation to learn more.
    • Added notification when Sprites are imported with incorrect weights
    • A fix for a bug where textures with max texture size could not generate geometry
    Visit the initial post for instructions on getting the latest package:
    https://forum.unity.com/threads/2d-animation-preview-packages.521778/

    And as always, let us know your thoughts! :)
     
    Last edited: Apr 13, 2018
  43. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    215
    Will the package introduce breaking change for the future update? I would like to use it in real project.
     
  44. am_

    am_

    Joined:
    Feb 4, 2014
    Posts:
    44
    @rustum would you consider adding bezier patches (used in rayman legends and seasons after fall) as an alternative to regular mesh skinning? It would be an awesome feature, and we would avoid the need to paint skin weights.
     
    EvOne likes this.
  45. jeffweber

    jeffweber

    Joined:
    Dec 17, 2009
    Posts:
    490
    Please allow for bone positions and rotations to be easily updated programmatically in realtime.

    I want to be able to have a 2D character built entirely from RigidBodies and Joints and and every frame, apply the RigidBody positions and rotations to the Bones of the skeletal system.

    This gives me a physics-controlled character with the skinned sprite deformation.

    I do this today with Anima2D and just want to make sure I'll be able to continue doing this with the new built in 2D Skeletal system.

    I use this technique in my game, Just Ski:


    Thanks and can't wait to try this.
     
    EvOne likes this.
  46. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,040
    I think it's possible from what I tried. The bones can be modified through animation and through code, and the skin follows. I made one of the bones aim at the mouse position to make a skinned character shoot at a point.
     
    jeffweber likes this.
  47. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    73
    Hello Jeff,
    Bones are regular transforms just like Anima2D. You should be able to control them using the Physics2D engine or scripting.

    Cheers!
     
    jeffweber likes this.
  48. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,103
    ..oh, nvm.. is see it does have IK.. my bad.
     
    Last edited: Apr 13, 2018
  49. brAvatar

    brAvatar

    Joined:
    Mar 17, 2013
    Posts:
    8
    Will it be possible to transfer or import Anima2D SpriteMeshes and Bones integration with weights and skin information into Unity 2018.1 new 2D Animation system ?

    Right not I have a lot of SpriteMeshes with very complex weights done for every bone, will I be able to move it to new system?

    What will be with Anima 2D eventually ?
     
    malyzeli and EvOne like this.
  50. EvOne

    EvOne

    Joined:
    Jan 29, 2016
    Posts:
    10
    Wow!!! :rolleyes: :)))) -The best news for many long years... THANK YOU! :)