Search Unity

Unity 2D Animation v2 - Preview Packages

Discussion in '2D Experimental Preview' started by rustum, Dec 17, 2018.

  1. EvOne

    EvOne

    Joined:
    Jan 29, 2016
    Posts:
    82
    Two crashes in a row (the second after rebooting Win7) when trying to import examples to 2D Animation 3.0.5 directly from the Package manager. :confused:
    I'll ask you better here... :) - is there something new in the examples?
    -Just a link from the package manager to the changelog led to version 3.0.4,
    and again trying to import these examples...
    Well, I'm scared for the hard drive on my laptop... :oops:
    -What was it with Unity that it needed 3.5 Gigabytes of RAM to import less than 100Mb package? :D

    P.S. A window in the middle, where there is nothing other than a white background, was the status line of the current operation, something like: “importing SpriteSwap...” etc.
    And both crashes this line stopped on PSB files.

    The error message windows say: "there is not enough memory in the system. Close Unity Editor..."
    Yes, of course this is due to lack of space in the fixed size virtual memory Swap-file, but...

    Why did she need these 3.5 gigabytes? :D
    -Never earlier Unity didn’t require me like that :cool:

    2019-09-19_15-41-45.png
     
    cometa93 likes this.
  2. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    168
    We eliminated the SpriteSkin.LateUpdate() calls and by doing so, there is performance improvement from it but still not good enough.
     

    Attached Files:

    EvOne likes this.
  3. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    168
    Thanks for letting us know. We will look into it.
     
    EvOne likes this.
  4. EvOne

    EvOne

    Joined:
    Jan 29, 2016
    Posts:
    82
    Tomorrow I will try again, on an empty project, and if this happens again, I will send a report. I will also check for 2019.2 if version 3.0.5 is available for it.
     
  5. EvOne

    EvOne

    Joined:
    Jan 29, 2016
    Posts:
    82
    I did it again... :D
    but now in new beta 2019.3.0b4,in empty just created project.
    everething repeats.
    Bugreport sent, (Case 1185787)

    My HardDrive after all that "tests" :D
    T-1000_from-tenor-1.gif

    start at 10:50 end ~11:15
    2019-09-21_10-57-19.png 2019-09-21_11-01-24.png 2019-09-21_11-07-21.png etc...

    P.S. The animation package itself and the PSBImporter when importing other psb-files - work fine.
     

    Attached Files:

    Last edited: Sep 21, 2019
  6. Rafarel

    Rafarel

    Joined:
    Jul 21, 2017
    Posts:
    146
    Hi @Leo-Yaik, I've just updated Unity from 2019.1.8 to 2019.2.6 AND 2D Animation from 2.1.0-preview.5 to 2.2.0-preview.5 and the loss of FPS is terrible it tooks 80ms in CPU compared to the previous 9ms ... It seems that you are aware of this, what can I do, what is the plan ? Thanks a lot for this amazing feature hope you'll get back on your feet from a performance point of view. Keep up the good work !
     
  7. Kruemelchen

    Kruemelchen

    Joined:
    Aug 26, 2019
    Posts:
    15
    I currently use a workaround for the performance issue regarding 2.2 in 19.2:
    I disabe/enable animator or scripts that control the bones on OnBecameInvisible and OnBecameVisible.
    Also I found out that it doesn't matter how many bones a sprite skin entity has. Computation time didn't decrease with the amount of bones I used.
    But I'am looking forward for 2019.3! :)
     
    EvOne likes this.
  8. brentgoeslive

    brentgoeslive

    Joined:
    Aug 6, 2018
    Posts:
    1
    Are there plans to expose more methods for scripting purposes? I've updated from a previous preview package and noticed that now even the SpriteSkin class is marked as internal. I've been using a script to speed up any repetitive work and it would be nice if I could stop using reflection as that usually is asking for trouble with lack of documentation/knowledge how exactly the methods work.

    Haven't looked into it yet but anything used in the Sprite Editor would be amazing to have for script functionality as well, like the ability to generate a mesh for a given sprite, the ability to assign bones to a mesh and auto calculate weights, etc. Most of the in-game character equipment I have are good to go out of the box with just auto mesh and auto weights.

    Right now, I use "get_rootBone", "set_rootBone", "get_boneTransforms" and "set_boneTransforms" in combination with the sprite renderer to automatically assign and bind new equipment to the same body with the correct sorting order. Each equipment has the standard skeleton with the same bones (done in editor tool), so the only thing I need to do is to get the bones and rootbone from the standard body, and use those to replace the bones of the equipment. As the corresponding bone names are the same, there's no issue with it.
    I see that there's also sprite swapping now but it's apparently only usable from within the Sprite Editor Tool, it appears to be a lot of tedious manual work with no option to automate it in a script, can't really judge it yet though as I haven't used it but don't want to reinvent the wheel as my current workflow doesn't require much work anyway.

    As for other things I would like to see:
    - to change the color of a bone within the sprite editor tool, sometimes you end up with 2 nearby bones with nearly the same color, resulting in a lot of confusion when doing weights.
    - to edit mesh vertices with animation keys. It would be a single row key with the option to go back to the default mesh, this is a necessity to create proper 3D effects. It's already available in the Sprite Editor Tool, and having the same available when making animations would be perfect. Spine 2D has that option and it brings your animation to the next level when used properly (and sparingly).
     
    Betzalel and EvOne like this.
  9. PixelSquad

    PixelSquad

    Joined:
    Sep 4, 2014
    Posts:
    112
    Hi guys, I'm wondering about the number of draw calls. I see that each sprite creates one sprite renderer.

    Does that mean one draw call per sprite? That could turn out to be very expensive. In theory, one character could go in one draw call.

    It'd be interesting to know what you guys have planned as we'd like to start using the system now.
     
  10. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    168
    Hi,
    We are working on the performance.
    If you upgrade to 2.2.1-preview.1 (for Unity 19.2), it should give you some performance boost with Burst package installed. We are still working on the performance so keep a look out for the later updates.

    And thanks for the encouraging words!
     
    sehathesam likes this.
  11. DanielCalderan

    DanielCalderan

    Joined:
    Oct 2, 2019
    Posts:
    2
    Hi, I'm testing/poking around with the 2d animation and i have some doubts about some of the features, is okay to ask doubts here or there is a post dedicated to that?
     
  12. cometa93

    cometa93

    Joined:
    Mar 5, 2014
    Posts:
    24
    It's total crap, going back to anima2d will give it a chance when you will release it officially AFTER SOME FIRST USER IMPRESSIONS.
     
  13. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    570
    No its not. Its a very good package but it just needs to be a little more stable.
     
    Leo-Yaik, Betzalel and EvOne like this.
  14. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    168
    Sure, fire away and do let us know what you think.
     
  15. ed_s

    ed_s

    Unity Technologies

    Joined:
    Apr 17, 2015
    Posts:
    54
    FYI, we managed to reproduce this here. If you want to download the 2D Animation Samples, you can try these steps...

    1. Download 2D Animation 3.0.5 package from package manager
    2. Download 2D Animation Samples from package manager
    3. Download PSD Importer 2.0.5 package from package manager

    I was able to get the packages and samples this way using the computer that reproduced the crash so hopefully it will work for you until we get this properly fixed.
     
    EvOne likes this.
  16. EvOne

    EvOne

    Joined:
    Jan 29, 2016
    Posts:
    82
    Thank You!

    I found what exactly was the problem, and already found a solution (for myself)
    All this happened only due to the fact that the updated examples included "too large" PSB-files - dialog gray.psb and dialog.psb with a resolution of 4961x3508!
    The process of importing these files for my computer configuration ends with a memory overrun.
    If they are resized to the size of the same Fei.psb 2141x2705 - import occurs quickly and completely without problems.
    Of course, all the information about bones and skins will be distorted, but the import will end without errors and I can study new examples even with distorted sprites. :)

    I understand that my laptop has a very “weak” configuration by now :oops: but trust me - With Unity 2019.3 -it is fully functional again! (but 2019.2 was too slow)
    And now -new Unity's beta-versions -works on it completely fine! Like all other 2D packages.
    And the PSD-importer, too, in all other cases, with the exception of such large pictures :(

    I hope this is still a bug or some kind of non-optimal code... -And all this can be fixed..

    If it is impossible to fix it in the PSD-importer... -These are Official Examples...
    -It would be better if they worked absolutely for everyone without problems.
    (And the documentation does not say anywhere about possible memory overrun in case of too "voluminous" graphics :D)

    With best regards, Alex!
     
    Last edited: Oct 11, 2019
  17. Kruemelchen

    Kruemelchen

    Joined:
    Aug 26, 2019
    Posts:
    15
    Will there be the possibility to pack sprites via sprite atlas to generate an optimized sprite sheet to use for the rigging?
    Currently the sprite sheet workflow seams only to work with psb importer package or did I overlook something?
     
  18. DanielCalderan

    DanielCalderan

    Joined:
    Oct 2, 2019
    Posts:
    2
    Well... is about UI when the rig is inside a canvas it is always drawn behind everything, I'm doing something wrong or you guys didn't reach that part yet?