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. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,524
    No I understand that I need to have each part on a layer. But why is it PSD support instead of PNGS? It makes sprite swapping even through code pretty much impossible right now...

    Anyway for now we will continue using spine by esoteric, but I am hoping that this becomes more widely usable sooner so that we can switch to it, I hate using external runtimes when I dont have to.

    EDIT: also when I tried to import the PSB using PSD importer, it flattened the image and gave me no way to unflatten it.

    What is the general process to getting a layered PSD in with parts correctly? I followed the guide but it just imports as a flat image with no way to determine what part is what
     
    EvOne likes this.
  2. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    165
    Yes, it flattens to a sprite atlas, since that's how game engines prefer 2D assets. You can still "access" the individual sprites, as with any sprite atlas, view the atlas or view it in "pose mode" as you should have had it in your PSD layers.

    Select the character gameObject (that the PSD importer creates) then in the inspector click Sprite Editor. your first view is "flattened" parts (the atlas), but select "Skinning Editor" from the upper left drop-down and you should see your character's layer parts in the exact same position as you had it in the PSD.

    The big question you are rightfully asking though is HOW to swap individual sprites. That's something many are asking for in other forum discussions about the new 2D Animation package
     
    GameDevCouple_I likes this.
  3. Thor_e

    Thor_e

    Joined:
    Sep 4, 2015
    Posts:
    27
    Hi,

    I have quite some experience with 2D skeletal animation, including the old-school way of just parenting with pivots. I also used Anima 2D and Puppet 2D.

    My Workflow & Setup
    Import from PSB is excellent. In the sprite sheet, I put all the sprites into a group called “Skin” and import them with the group option on. Then, I name the root bone “Skeleton” (the spine). Both of that goes under the actual agent Holder game object (which carries animator, colliders, most scripts). I also create a “Control” under the Holder, add the IK manager to the skeleton, and create limb solvers. I put them under this new “Control” object, delete each their childs and set each to be their respective targets.

    In result, the Holder has now three children: the Skeleton holds the bones and functionality, Skin holds the appearance and Control harbours the IKs, and is for animation, which I think is also the paradigm used.

    Problems & Inconsistencies
    I found it better to separate some parts of the characters that are better animated separately (like the face, where sprite swap animations make sense). Or parts that are “attached” and don’t need to be part of the core skeleton rig. I have these sprites on a separate sheet.

    1. Problem: Unfortunately, such “skin” objects need to be dropped into the skeleton hierarchy again, ruining the neat separation set up before.
    2. Problem: to rotate the head and to animate the body, I need to animate the skeleton bones directly, which also blurs the separation between skeleton and animation controls.

    Suggestions

    Both of these problems may have a similar solution, and perhaps this exists already (please, let me know!)
    1. Solution: a component that allows a game object to be 'hooked up' to a bone and treated AS IF it was its child. That way, additional sprites or bind/mount objects can be kept separate from the often intricate skeleton hierarchy.
    2. Solution: Puppet 2D has a "parent control" that imposes its position and rotation onto a target bone (intended for root bone), turning a game object into a control target similar to IK objects. So that you can animate this target object and the bone follows directly. Similar to that, an "orient control" that imposes only its rotation to the target bone, turning it into a knob to control a bone's rotation only. That way, targets can be animated consistently without dealing with the skeleton hierarchy.
    Root Rotation Problem
    The root bone, effectively the spine that starts from the hip and goes to the neck starts with a 90° rotation. Since this rotation is at the root, this caused some headaches with the stuff that effectively has to follow the bones (like the additional sprites). I solved this, but I would prefer if it was possible to zero out the root bone rotation, and not start the whole rig 90° rotated.

    Other than that, great system, so far easy to use, and the best I've tested so far, because of the good import and clean setup (as well as copy pasting) of the bones. /Sorry for the Wall of Text ;)
     
    GameDevCouple_I and EvOne like this.
  4. Belka_ICC

    Belka_ICC

    Joined:
    Aug 6, 2018
    Posts:
    2
    Hi,

    I face the problem with memory leak on iOS when there is active gameObject with SpriteSkin in my scene.
    Using latest version of 2D Animation 2.0.0-preview.3, tried Unity 2018.3.8, 2018.4.0.

    Is there any workaround for this issue?
     
  5. YD_JMysior

    YD_JMysior

    Joined:
    Aug 4, 2016
    Posts:
    15
    Hello everyone,
    this package looks very promising/exciting. Two questions:
    1. What is its current state? Is it production ready? In other words, would it be reasonable to make animations for a game that is supposed to be released to Nintendo Switch, PS4 and Xbox One in about 5-6 months?
    2. Will new versions of the package be backwards compatible? If not, should we expect redoing all the animation assets from scratch with every new release?
    Thanks in advance
     
    EvOne likes this.
  6. Rafarix

    Rafarix

    Joined:
    Jan 29, 2018
    Posts:
    4
    I haven't been using it too much but as far as I know it seems to be working well enough. I do not know about making games for the consoles, but here is my current experience with this: Animations are pretty easy to make as it fills in the in between frames itself. You just need to add in the key frames and sometimes make a few adjustments in between, but other then that it does most of the work for you. You DO NOT have to redo animations whenever you update to a newer version.

    The only real inconvenience I found is I don't think you can't "reuse" animations for other characters. Such as if you have a walk animation for the player you'll have to remake it for enemies even if they have nearly the same proportions. I do not know if this was updated. Also when you make changes to a character you made animations for depending on how big of a change you might have to redo all the animations.

    There was also a bug where it messed up the tile pallet I posted sometime ago but they fixed that issue - Thanks for that fix btw!
     
  7. Thor_e

    Thor_e

    Joined:
    Sep 4, 2015
    Posts:
    27
    I could re-use animations, but I specifically designed the rig to be used for other characters. It all depends how you do it, exactly, but when the skeleton is the same, and you animate IKs, it should work. I have yet to test more, and it’s unnecessary complicated to switch skins and make adjustments, but it can work in principle.
     
  8. MathiasNC

    MathiasNC

    Joined:
    May 8, 2019
    Posts:
    1
    Is it no longer possible to use without Photoshop to create psb/psd files?
    When I try to rig a sliced PNG file I'm unable to connect bones on different sprites to eachother using the parenting tool. If I use a non-sliced sprite sheet, I can add bones, but not layer each component of the body correctly

    using animation preview package 2.1 in unity 2019.1
     
    Last edited: Jun 8, 2019
  9. Thor_e

    Thor_e

    Joined:
    Sep 4, 2015
    Posts:
    27
    Last edited: Jun 10, 2019
    LilGames likes this.
  10. Rafarix

    Rafarix

    Joined:
    Jan 29, 2018
    Posts:
    4
    One thing I do which probably not a good idea in the long run, but works is I use GIMP. I would export the file as a .psd, then go to the file and rename the extension to .psb as GIMP cannot export to .psb. There probably is a better way to do this, but it works for me since I don't have photoshop