Search Unity

Official 2D Animation 3.0.5 is out

Discussion in '2D' started by rustum, Sep 30, 2019.

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

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    190
    2D Animation 3.0.5 is now available for 2019.3!

    Getting Started:
    1. Install latest Unity 2019.3.
    2. Open Package Manager by going to Window > Package Manager
    2D Animation 3.0.5.png
    3. Choose 2D Animation 3.0.5 from the list and click on Install at the bottom right of the Package Manager window.

    What’s Changed
    • This update ensures that Sprite and Group show the same order in Sprite Visibility Window as they are shown in the PSD art source file.
    • The Animation package will now benefit from a performance boost by optionally installing Burst package
      • Important Considerations
        • Currently the Burst package is not a dependency of this package and is therefore not installed by default. This is because the performance code in our package is new and we want to make sure it is stable before we install Burst by default.
        • The current performance code optimises for Sprite deformation. This means you will see performance gains for complex Sprite meshes with high vertex counts. For future releases, we are working on optimising for high bone counts as well.

    New Samples
    This update also includes new samples that show how the Sprite Swap feature can be used to address the following outcomes:
    • Animation Clip Reuse
      • Demonstrates how to reuse an Animation Clip by using Sprite Swap for flip-book Sprite animation
    • Character Part Swap
      • Demonstrates how to swap character parts using Sprite Swap at runtime.
    • Full Skin Swap
      • Demonstrates how to do a full skin swap (all character parts) using Sprite Swap at runtime.
    • Sprite Swap with Downloadable Content
      • Demonstrates how to implement swaps that use downloadable content using Sprite Swap.
      • This is useful for games that implement seasonal content.

    ⚠️ 2D PSD Importer 2.0.5 is required to use the samples. Install that from the Package Manager as well:

    2D PSD Importer 2.0.5.png
     
    juanaguilerahuerta likes this.
  2. mamentarin

    mamentarin

    Joined:
    May 7, 2019
    Posts:
    2
    Hi @rustum, thanks for the mini-tutorial on how to install the 2D animation package.
    I have a question: How do I open the new Sprite Swap samples projects?
    I can´t find it :(
    Help me, please!
    Thanks in advance :)
    María
     
  3. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    114
    Just select the 2D Animation package in the package manager, and you can find the "2D Animation Samples" at the bottom of the description (if you have the right versions of 2D Animation and PSD Importer, as described in the first post of this thread).
     
  4. mamentarin

    mamentarin

    Joined:
    May 7, 2019
    Posts:
    2
  5. drallcom3

    drallcom3

    Joined:
    Feb 12, 2017
    Posts:
    165
    Will this ever be released on 2019.2 or should I migrate at some point to 2019.3??
     
  6. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    114
    The 2D Animation package is moving from preview to verified in 2019.3, so it's probably a good idea to migrate at some point once 2019.3 is released (unless you're very close to releasing your game).
    They have backported changes to version 2.X for a while (the version that's used for 2019.2), but at some point they will stop.
     
  7. tassioknop

    tassioknop

    Joined:
    Dec 13, 2018
    Posts:
    2
    Hi, is it possible to use this package with Meshes instead of sprites? I don't use sprites because my games use vector art and don't have textures, so I'm wondering if a possible solution for me would be:
    1. Use 2d animation + Mesh somehow
    2. Use 2d animation + start using the Vector Graphics package, which seems to introduce a Vector Sprite concept

    Thank you!
     
  8. punyhuman

    punyhuman

    Joined:
    Nov 8, 2019
    Posts:
    7
    Thank you!
     
  9. Agentneil

    Agentneil

    Joined:
    Apr 18, 2018
    Posts:
    9
    What do you call 'high bone count'? Where would my 60 bone sprites sit? In the high range?
     
  10. Allan-Smith

    Allan-Smith

    Joined:
    Feb 7, 2012
    Posts:
    57
    Hey, is there some official documentation on how to use this tool, including sprite swapping?
     
  11. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    114
    Leo-Yaik, Allan-Smith and rustum like this.
  12. CoreyHUN

    CoreyHUN

    Joined:
    Dec 11, 2014
    Posts:
    6
    I wonder if it's possible to bake down animations made with IK into skeletal animations? Moving the IK targets does not register keys for the body parts themselves, which I guess makes sense. Right now converting IK to skeletal animations is really time-consuming.
     
    Arnklit likes this.
  13. ViralArt

    ViralArt

    Joined:
    Apr 17, 2015
    Posts:
    11
    Is it possible to get support for deformation of sprite masks as well. Short and simple.
    You can run script to change the mask if you have "frame by frame" sprite animation but deformation is ignored by the mask component. Sadness.
     
  14. Allan-Smith

    Allan-Smith

    Joined:
    Feb 7, 2012
    Posts:
    57
    Thank you very much Corvwyn! After giving a quick read to the docs... this still seems like a bit of an overly complicated solution to sprite swapping... wouldnt it be possible to simply split the rigging/3d part of the system and the sprite into two different things, as they already are for the actual 3D assets? Seems like its still easier to just make a character which is just made out of white squares so you can rig the resulting 3d model, then use a custom shader to allow swapping the texture that is rendered instead of the "white square"... no need for libraries or anything, you actually manage your assets however way you want... where the problem then becomes UV mapping which is a bit annoying to deal with...

    I can already guess that these libraries can become a memory problem in larger projects, as they directly reference the sprites so if you have tons of customization you might have to do some tricky loading and unloading of libraries (instead of just loading by address the very specific sprites you are looking for), also doesnt look like it would work well with addressables (probably would need to make the whole library into the addressable)... I mean, it sure is cool that you can just import a PSB and make the bones right there, then right after make the animation... but, if this means I have to copy paste bones to every single sprite I might want to use for that character... and make libraries and what not just to be able to render a different image in the 3d model... seems like a lot of work...
     
  15. K97

    K97

    Joined:
    Mar 24, 2016
    Posts:
    10
    Hey everyone,

    I followed every step in this link (https://docs.unity3d.com/Packages/com.unity.2d.animation@3.0/manual/index.html)
    However after i rig sprite from sprite editor, click apply and drag sprite in scene, I can't see sprite bones. I see only sprite as it was never rigged.

    In on of 2D Animation Samples scenes, i tried same thing, however as you can see in picture below, sprite (2) has no bones, even though i dragged sprite that actually already was rigged.

    What I am missing?

    @rustum

    Annotation 2019-12-05 062723.png
     
  16. URocks

    URocks

    Joined:
    May 1, 2014
    Posts:
    159
    @rustum Is there an options to get deformed vertices of the rigged sprite? I want to create 2d colider for derormed sprite but i can get the vertices. Please expose the vertices
     
    Last edited: Dec 7, 2019
  17. Stan001

    Stan001

    Joined:
    Dec 8, 2019
    Posts:
    1
  18. motivision

    motivision

    Joined:
    Dec 3, 2019
    Posts:
    28
    Hey everyone

    I watch some 2D Animation tutorials on youtube, but don`t know what this is by default in 2019
    thanks
     
  19. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    70
    For single Sprite non-PSB files, you can add the and "Sprite Skin" component and click on the Create Bones button to get the Bones.
     
  20. alexerd

    alexerd

    Joined:
    Nov 5, 2019
    Posts:
    11
    @dquek

    documentation very useful for my job
     
  21. K97

    K97

    Joined:
    Mar 24, 2016
    Posts:
    10
    @dquek thank you very much for your reply! For some reasons I didn't receive emails and I couldn't see earlier your reply to my previous comment. It is working.

    Thanks again!:)
     
    dquek likes this.
  22. monoky

    monoky

    Joined:
    Dec 29, 2014
    Posts:
    2
    Do you have plans to provide something like anima2d's skined mesh combiner?
     
    JConcha and kwanyong_unity like this.
  23. Rijicho_nl

    Rijicho_nl

    Joined:
    Oct 6, 2018
    Posts:
    7
    Hi all, I found a problem on 2D Animation with Entities, which only happens after build.
    After reloading an additive-loaded scene, all psd sprites stops their deformation.
    It works fine without Entities, or on Unity2019.2.19f1.

    Reproduction:
    1. Create new project and import 2D PSD Importer(2.1.0) and Entities(preview.11 - 0.5.1) on Unity 2019.3.0f6.
    2. Reboot Unity.
    3. Create scenes "Scene0" and "Scene1", set them to build settings in this order (Scene0 is the root scene)
    3. Put some psb file into the project, place it in Scene1, and set some bones and animations.
    4. For each scenes, create an empty GameObject and attach a script:

    Code (CSharp):
    1. using System.Collections;
    2. using UnityEngine;
    3. using UnityEngine.SceneManagement;
    4.  
    5. public class Scene0 : MonoBehaviour
    6. {
    7.     //Use to reload Scene1 from a script in Scene1
    8.     public static MonoBehaviour CoroutineStarter { get; private set; }
    9.  
    10.     void Start()
    11.     {
    12.         CoroutineStarter = this;
    13.         DontDestroyOnLoad(this);
    14.  
    15.         //Load Scene1 additively on start
    16.         CoroutineStarter.StartCoroutine(_());
    17.         IEnumerator _()
    18.         {
    19.             yield return SceneManager.LoadSceneAsync(1, LoadSceneMode.Additive);
    20.             SceneManager.SetActiveScene(SceneManager.GetSceneAt(1));
    21.         }
    22.     }
    23. }
    and

    Code (CSharp):
    1. using System.Collections;
    2. using UnityEngine;
    3. using UnityEngine.SceneManagement;
    4.  
    5. public class Scene1 : MonoBehaviour
    6. {
    7.     void Update()
    8.     {
    9.         //Push Enter to reload the scene
    10.         if (Input.GetKeyDown(KeyCode.Return))
    11.         {
    12.             Scene0.CoroutineStarter.StartCoroutine(_());
    13.             IEnumerator _()
    14.             {
    15.                 yield return SceneManager.UnloadSceneAsync(1); //This unloading may cause the problem
    16.                 yield return SceneManager.LoadSceneAsync(1, LoadSceneMode.Additive);
    17.                 SceneManager.SetActiveScene(SceneManager.GetSceneAt(1));
    18.             }
    19.         }
    20.     }
    21. }
    In short, Scene0 additively loads Scene1 on start, and Scene1 reloads itself when you push Enter key.

    5. Open Scene0 and play on editor. No matter how many times you push Enter, the deformation works fine.
    6. Build it as Standalone player (Windows, x86).
    7. On player, the psb never deforms itself after first reloading.

    I guess there are something wrong with unloading process, but have no idea to avoid this problem.

    Submitted bugreport:
    https://fogbugz.unity3d.com/default.asp?1215572_pdt07dvd4vvv8i20

    Thanks,
     
  24. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    436
    Rijicho_nl likes this.
  25. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    190
Thread Status:
Not open for further replies.