Search Unity

How to use layer masks?

Discussion in 'Animation' started by SoftwareGeezers, Jan 7, 2015.

  1. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    902
    I'm trying to animate a 2D character made of sprites (think Rayman). I have no skeletal avatar thingy. According to the tutes, blend trees would be ideal for me to animate the hands separately, but all the tutorials in the world regards Mecanim are about animating 3D characters, all with skeletons and avatars, and all using avatar masks.

    How do I use blend trees and layers to create sane animations instead of creating millions of separate animations and a pot of noodles of an animation controller?
     
  2. shopguy

    shopguy

    Joined:
    Jan 12, 2013
    Posts:
    282
    http://www.puppet2d.com/#! you can buy that if you want, or if not, at least watch the videos and you'll get some ideas of what is possible. You might want to convert some of your sprites to meshes (that video talks about that) so that they can bend/etc... that is what Rayman does for some parts of their "sprites". If you use a flat mesh, then you can also follow the 3D tutorials, because your mesh/objects are exactly the same, just flat.
     
  3. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    902
    I looked into Puppet 2D but it's overkill. 3D tutes haven't been at all helpful because they all assume a skeleton and talk about layer masks. I actually solved my issue though, and layer masks aren't needed. They work how you think they should, building on top of previous layers. I just had some settings/setup wrong when I tried which is why it failed and I enquired here. ;)

    So, for example, I have a walk animation in a base layer moving the feet, and a hand animation on another layer, and the two combine;.