Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

2D Animation Preview Packages

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

  1. jalemanyf

    jalemanyf

    Joined:
    Jun 16, 2013
    Posts:
    15
    I have a problem using this package...

    I follow step by step of the tutorials/videos:

    1. Install the package.
    2. Go to the Sprite Editor.
    3. Bone Editor: create the skeleton.
    4. Create the Geometry.
    But!
    When I come to the Weights and click AUTO to autoGenerate the weights of the bones... NOTHING HAPPENS!

    No change the color of nothing, no information messages, no error... Only Silence!

    I repeat it a lot of times but with the same result... Please, what step I have lost?

    I'm using UNITY 2018.2.17f1 on Mac.

    Any help is welcome.
     
  2. antk

    antk

    Joined:
    Dec 10, 2013
    Posts:
    18
    when you are generating geometry, what values are you using for outline detail, tolerance, and subdivide?
     
  3. antk

    antk

    Joined:
    Dec 10, 2013
    Posts:
    18
    Is there any follow up on this? Or anyone have some insight on how to do this? I'd like to use a different body part sprite for a few frames of animation, but I couldn't figure out how to do this within the 2d animation package. I ended up creating a separate game object and animating that and activating and deactivating via code. Seems like a janky way to go about it though. Is there a cleaner, more robust way?

    Thanks!
     
  4. jalemanyf

    jalemanyf

    Joined:
    Jun 16, 2013
    Posts:
    15
    I have Tested different values...

    The last ones are:

    Outline detail: 0.25

    Alpha tolerance: 65

    Subdivide: 45

    Any idea what I’m doing wrong?

    Thanks
     
  5. antk

    antk

    Joined:
    Dec 10, 2013
    Posts:
    18
    Hmm, not sure why that would cause any problems. It may not give a very precise outline, but it should still at least generate vertices. The values I used for my sprite were 1, 254, and 100 respectively. Can you try that and see what comes out of it? Just curious.
     
  6. jalemanyf

    jalemanyf

    Joined:
    Jun 16, 2013
    Posts:
    15
    Hi
    Hi antk,

    I have changed the Values on Geometry for 1,254,100 and Generate...

    Now the SpriteMesh is very very detailed! With a lot of point and subdivisiones. OK...

    After that, I try two workflow:

    1.-Click Apply and after the computer process, Weights: I see all the bones with colours and the generated geometry.

    2.-Go directly to Weights ( without click Apply before )

    When I finally clicks on Auto... If doesn’t works!

    Could you say me step by step what you do... probably I forget something.
     
  7. antk

    antk

    Joined:
    Dec 10, 2013
    Posts:
    18
    Here's what I do:
    Import Sprite Asset
    Click newly imported sprite asset
    Click "Sprite Editor" in Inspector
    Click Bone Editor submenu
    Add bones, click Apply
    Click Skin Weights and Geometry Editor submenu
    Click Generate
    Fill values 1, 254, 100, click Generate button
    Click Apply
    Click Weights
    Click Auto
    Move some bones around to see that bones are moving and deforming mesh as expected
    Click Apply

    At that point you should be able to bring in the sprite to the scene, add the SpriteSkin component and start arranging and animating your sprite.

    Hope that helps.
     
  8. jalemanyf

    jalemanyf

    Joined:
    Jun 16, 2013
    Posts:
    15
    It still not works Ank, but thanks a lot Antk for your help and patience.

    If I discover something about what happens I will share to other ones.

    Regards,

    Josep Alemany
     
  9. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    109
    Hi, can you please send a bug report? Thanks

    Weight generation might fail in some circumstances. We fixed some bugs in the next version that will reduce those cases.

    If both sprites share the same bones you should be able to swap them in the animation clip. If that's not the case, you did the right thing. Next version of the tools will enable multiple sprites sharing the same skeleton.
     
    Peppered_Pig and antk like this.
  10. HEROTECH70

    HEROTECH70

    Joined:
    May 24, 2017
    Posts:
    12
    Has anyone had any issues on iOS?

    My app has content which is downloaded with an asset bundle, on android it works fine, on iOS nothing is moving.

    I have not time to investigate this right now, will try to reproduce the issue on monday, just wanted to know if this is a known issue.
     
  11. b-king123

    b-king123

    Joined:
    Mar 1, 2017
    Posts:
    2
  12. nsfnotthrowingaway

    nsfnotthrowingaway

    Joined:
    Feb 18, 2016
    Posts:
    41
    @Sergi_Valls is it possible to set weights, vertices, etc of a spritemesh at runtime, even if it involves some roundabout method. Say if you wanted to make a runtime importer from another format that would control spriteRenderer or spriteMesh. I realize some of these values are hardcoded into the sprite asset, but I was hoping there was a way to directly inject the weights or final positions for the deformable mesh vertices to supersede the ones in the sprite asset. I'm particularly interested in a way to procedurally generate a mesh each update. I'm asking not about the math required to determine weights and such, but just how to get access to set those values for the renderer once you already have them.
     
    Last edited: Dec 8, 2018
  13. drordoit

    drordoit

    Joined:
    Sep 7, 2013
    Posts:
    35
    Is it possible to switch the sprite to a similar one (via script) after applying bones to it ?
     
  14. Peppered_Pig

    Peppered_Pig

    Joined:
    Oct 28, 2016
    Posts:
    8
    I'm sure all are answers are gonna be answered soon :) but just to throw it out there I hope we don't have to create and bind spritemeshes to bones every time like we did in Anima2D. It was a real hassle and didn't work properly most of the time. I hope we can easily be able to swap sprites without having to make sprites meshes and binding it to the bones.
     
  15. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    109
    Please report a bug. Thanks!

    You can set the data into the Sprite by using this API: https://docs.unity3d.com/ScriptReference/Experimental.U2D.SpriteDataAccessExtensions.html
    To set the final deformed positions into the SpriteRenderer: https://docs.unity3d.com/ScriptReference/Experimental.U2D.SpriteRendererDataAccessExtensions.html

    You can switch the sprite in the SpriteRenderer via script. The only requirement is the bone list should be compatible.

    We are aware of the need for swapping sprites. Unfortunately this release won't bring specific improvements on that.
     
  16. drordoit

    drordoit

    Joined:
    Sep 7, 2013
    Posts:
    35
    I managed to switch sprites via code (only after adding new bones to the new sprite) and I got an error:
    "Unable to use a named GUIStyle without a current skin. Most likely you need to move your GUIStyle initialization code to OnGUI
    UnityEditor.SpriteEditorWindow:OnEnable()"
    but still things seems to be working.
    I will try to dig in and see if I can fix it.
     
  17. drordoit

    drordoit

    Joined:
    Sep 7, 2013
    Posts:
    35
    Edit: the error was the "Sprite editor" docked on screen. Everything seems to be working.
    It will be cool to have the option to swipe sprites without making bones per sprite in the future.
     
  18. HEROTECH70

    HEROTECH70

    Joined:
    May 24, 2017
    Posts:
    12
  19. nsfnotthrowingaway

    nsfnotthrowingaway

    Joined:
    Feb 18, 2016
    Posts:
    41
  20. zinkomania

    zinkomania

    Joined:
    Dec 10, 2018
    Posts:
    1
    Hey Guys today I encountered this Error with my 2D-Bones Animation. Somehow Unity is changing the values of rotation to obscure numbers. I have tried reinstalling Unity and the package but it didn't help. Hope someone can help me. I uploaded a Video because it's hard to explain.
     
  21. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    52
    @zinkomania I always had this exact same problem when Animating Rotations on Unity. But I've always had trouble explaining it. I cannot animate any rotation using the Gizmoz or swapping the values on it in the inspector. It always animated OK but it saves keyframes with huge values a lot different than the one I just rotated.

    As a workaround, I have to expand and click twice on the keyframe value on Animation Window (left side of your screen) and then Change the Value There. Is the only place where it works as expected! I hope now Unity can take a look better on this!
     
  22. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    52
  23. antk

    antk

    Joined:
    Dec 10, 2013
    Posts:
    18
    Thank you for replying and keeping us up to date!
     
  24. learc83

    learc83

    Joined:
    Feb 28, 2018
    Posts:
    1
    2018.3 was released today. Does that mean that phase 2 will be released as well?
     
    Peppered_Pig and b33rdy like this.
  25. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    109
    Looks like an SpriteEditorWindow error log. Should not affect swapping Sprites in the SpriteRenderer.

    Thanks for the report. It is true that AssetBundles can't contain code. Cases like this will help us improve our transition into packages.

    In 2018.x we have an experimental api to ask SpriteRenderer for a native buffer (NativeArray<Vector3>). That buffer has a length of sprite's vertex count. You can fill it with your own values inside a job and pass back the job handle to the SpriteRenderer.
    In 2019.1 we already changed that into something we can use with ECS.
    In conclusion, careful with experimental apis that can change from version to version.

    Please, make a bug report and make sure you include the video. Thanks.

    Thanks, very useful, we are investigating it.

    We are planning on releasing today.
     
    Peppered_Pig likes this.
  26. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    477
    It would be super useful to implement Free Form Deformation for 2d in this package or an extra package. Do you have any info?
     
    Peppered_Pig likes this.
  27. drordoit

    drordoit

    Joined:
    Sep 7, 2013
    Posts:
    35
    Just updated to Unity 2019.1.0a11 and got :
    "GetBoneWeights' and no extension method `GetBoneWeights' of type `UnityEngine.Sprite' could be found."
    "UnityEngine.SpriteRenderer' does not contain a definition for `UpdateDeformableBuffer' and no extension method"
    and many more. Any idea what going on?
     
  28. drordoit

    drordoit

    Joined:
    Sep 7, 2013
    Posts:
    35
    Anyone can help me with those errors?
     
  29. Peppered_Pig

    Peppered_Pig

    Joined:
    Oct 28, 2016
    Posts:
    8
    I was thinking, are future releases of the 2D animation package going to be supported throughout the Unity 2018 life cycle or will we have to upgrade to a newer version of Unity in the future to get the latest features from the 2D animation package?
     
  30. drordoit

    drordoit

    Joined:
    Sep 7, 2013
    Posts:
    35
    "2D animation" is updating with the Unity version, and I think my problem right now is that the "latest" version I have is 2.0.0 and it doesn't match Unity 2019.1.0a11.
     
  31. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    477
    Any info about the FFD feature?
     
  32. EvOne

    EvOne

    Joined:
    Jan 29, 2016
    Posts:
    15
    Button "Revert" in Skinning Editor near button "Visibility" without confirmation and the possibility of "Undo casual Reverting" - its awful :(((
    -The long process of editing a complex Rig with many overlapping parts is destroyed by one mistake pressing the button next to it ... :(((

    PS Sorry for googletranslate.
     
    Last edited: Dec 15, 2018
  33. Vasiliy-V-V

    Vasiliy-V-V

    Joined:
    Dec 9, 2013
    Posts:
    2
    @Sergi_Valls Hello!

    I have installed 2D Animation 2.0.0-preview.1. In Skinning Editor window when I select Create Bone and click to make a bone nothing happened. In 2D Animation 1.0.16-preview.2 all works and bones adding succesfully. Unity 2018.3.0f2, Windows 7.

    It's a bug or problem only on my side?
     
  34. ISholomov

    ISholomov

    Joined:
    Jun 26, 2015
    Posts:
    16
    several simple animated characters on scene and very low FPS! :(
     
    EvOne likes this.
  35. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    24
    SiriusRU and b-king123 like this.
  36. GerPronouncedGrr

    GerPronouncedGrr

    Joined:
    Mar 30, 2013
    Posts:
    4
    Using Unity version 2018.3.0f2, after adding target transforms to a limb solver, the Create Effector button is greyed out (and it actually still says Create Target). Additionally, the yellow circle gizmos do not appear. I also encountered a similar problem when using a CCD solver, where I was unable to change the number of chains from zero (the slider has no button/handle on it at all), and also could not generate an effector. I was following the Unity blog post tutorial when this happened, and have attempted it twice from scratch. As far as I can tell, I have followed the steps exactly.
     
  37. ChaosResolution

    ChaosResolution

    Joined:
    Jan 22, 2013
    Posts:
    27
    Hi,

    I just updated the 2D Animation package to version 2.0 but Package Manager is giving the following error:



    I assume this error with the 2D PSD Importer is related:



    Any idea what this means?

    Cheers!
     
  38. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    12
    Hi ChaosResolution,

    This could be a Library folder PackageCache path conflicting with multiple of the same packages.

    Have you tried a reimport of the package or the whole project?

    ===================

    If it still occurs,
    It would be best if you are able to file a bug report with a sample repro project through = Unity > Help > Report a Bug...
    or
    Let me know any more info you can provide here and I'll investigate it.
     
  39. ChaosResolution

    ChaosResolution

    Joined:
    Jan 22, 2013
    Posts:
    27
    I tried re-importing the project, but no luck. What does seem to work however, is using Version 2.0.0 - preview.1 (as opposed to the latest, which is Version 2.0.0 - preview.9.) With this version I get no errors and everything is functional. With the latest, the error returns.
     
  40. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    12
    I missed the numbering in your first image.
    Interesting.
    Our latest version is "Version 2.0.0 - preview.1"
    "Version 2.0.0 - preview.9" should not even be there.

    Perhaps the version stated in your Packages folder manifest.json file is wrong?
    Is it possible to share your manifest.json file?