Search Unity

2D animation question

Discussion in '2D' started by jongcheon-park, Mar 25, 2021.

  1. jongcheon-park

    jongcheon-park

    Joined:
    Apr 20, 2020
    Posts:
    3
    I'm making a 2D pixel game and I want to be able to change the character's hair.

    Right now, I'm making two Mechanims and playing the head and body animations separately.

    As a result, sometimes there is a problem that the sync does not fit, so I ask for help

    (Body and head must have a changeable structure)



    Let me know if it's a problem that needs to change the development mechanism itself.

    (I don't use rigs.)
     
  2. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    916
  3. UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    Joined:
    Jan 9, 2017
    Posts:
    152
    Hi, when I set up weights and bones for my template sprite, the skins do not animate. Do I have to also apply weights to every skin? This so much work.. @Ted_Wikman
     
  4. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    916
    Yes, if you want to deform a Sprite you have to both generate a mesh for it and bind it to bones. Without it, there is no data that the Sprite Skin can use to deform.

    We have quite a few samples in the 2D Animation package to showcase different techniques. Have a look at the Animated Swap sample for a closer look at how you can achieve this in your project.
     
  5. UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    Joined:
    Jan 9, 2017
    Posts:
    152
    Just to clarify further @Ted_Wikman, for example in other programs, after setting up the bones, weights and animation using skin0 (template), I can easily swap out with other skins without any work. But for 2D Animation, I have to re-apply the weights for every single skin variants, correct? If I have also made some vertex adjustments to fix somethings on skin0 (template), I will then have to add these adjustments to every single skin variants as well?
     
  6. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    916
    Ah, thanks for the clarification, I see what you mean. In other programs you might swap out the texture/change the UV. In 2D Animation, we swap out the whole mesh, which is why the variant also needs the same set of data. In the skinning editor, we also have the ability to copy and paste the mesh and bone data from one mesh to another to make this easier.

    If it is easy to re-create the same setup (with bone and mesh data) for your variant, would you still prefer to be able to swap out the texture/change the UV? and if so, could you elaborate on why that would be?
     
  7. UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    Joined:
    Jan 9, 2017
    Posts:
    152
    Ok, I understand. I'm still testing it out. But it is painful because I cannot select multiple sprites and do the Auto Geometry. I also cant select multiple sprites and paste the data. I have to do them one sprite at a time.
     
  8. UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    Joined:
    Jan 9, 2017
    Posts:
    152
    I also cannot click the eye icon and drag to toggle for the rest. I have to click one by one. In other programs, I can click once and brush over the other layer's eye icon to toggle them. Example After Effects.
     
    EvOne likes this.
  9. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    916
    If nothing is selected, then you will be able to copy and paste everything in the Skinning editor. But you are right that if you only want to copy two out of five Sprites, you have to select them one by one.

    Keep the feedback coming, its great to hear your experience and the expected behaviour when you are using the tools.
     
  10. UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    Joined:
    Jan 9, 2017
    Posts:
    152
    I'm glad that you are replying to me. Because one thing of the major concern is that this package was released back in 2019 and it's still painful to use. If you haven't replied to me I'd probably be looking at other alternatives like Spine (I already own it). The reason why I want to use this package is to keep things in Unity.
     
  11. UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    Joined:
    Jan 9, 2017
    Posts:
    152
    Another issue, when I rotate the bones, going into Edit Geometry resets the pose. I can't edit the vertex in the pose to see how it influences the deformation.
     
  12. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    916
    Threads like this are really good, since it highlights the pain points from the perspective of the daily user. It helps us make the tool better and better for each release.

    We keep the deformation when editing the weights, but reset it when editing the geometry. Wouldn't it be very difficult to accurately place the vertices on an already deformed mesh?
     
  13. Xiangting_Su

    Xiangting_Su

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    253
    Thanks for letting us know! I have this same issue too especially when I have lots of Sprite layers. I agree being able to multi-select Sprites and auto generate geometries all at once would be a huge, huge time-saver.

    Can I clarify if this was in the Visibility panel within the Skinning Editor?

    These are great feedback by the way! Like Ted said, keep them coming. :)