Animation Step 2 – Rigging (and the verdict on Puppet2D)

Step 2 in the animation process is going to be rigging up the individual body parts (after splicing them out of their sprite sheets) to a framework that will help with animation. First step was to learn some basics about animation, and this series was really helpful.Screen Shot 2015-07-12 at 10.49.51 pm

The key tool we first opted for in the process is Puppet2D (check out their website). Essentially, Puppet2D is a Unity plugin that allows you to attach sprites to an invisible skeletal form (i.e. rig the sprites to the bones) which is really useful for easily making animations.

If you have a sprite sheet of an individual (like the one over to the right) you can attach each body part to a specific bone, and manage the animation by manipulating the bones. These bones are designed to link together and follow the physics of a real person. And with attached controllers, it’s pretty straight forward to move the sprites around like a strung up little puppet.

An old bag of bones

An old bag of bones

You’ll notice that in the sheet to the right, the legs and arms aren’t separated at the knees and elbows. With Puppet2D there’s a feature called mesh skinning, which allows you to morph the shape of the sprite as you work. It’s the kind of feature that’s really useful for creating quick facial expressions, or bends at the knees and elbows while walking or moving. This works by turning a sprite (2D image) into a mesh (3D skin) which can then be moved around.

The process with Puppet2D is important. Once you placed your sprites on screen, you lay the bones on top. It can be a little fiddly at first. Getting the layering correct in Unity is important, otherwise the process get’s a tricky (eg: the sprites should be on a layer that you can’t accidentally activate while clicking around on screen). Parenting the sprites to the relevant bones (torso connected to spine, arm connected to shoulder and so on) is critical because that’s how Puppet2D knows how to string the whole puppet together. But it’s an arduous task. There is a snap-to tool, but it seemed to often be not quite right and it takes almost as much time making sure there are no weird connections as it does to parent the sprites manually.

Then you lay controllers on top of the bones. There are the things that leg you rotate and move in the correct kinds of ways. In theory, you shouldn’t need to do anything to the sprites or the bones, once the right controllers are in place. If it’s all done correctly, you have yourself an in-Unity system to animate intuitively.

Unfortunately, though, we experienced a few other speed bumps with it. Once you start mucking around with the meshes, things can get a little strange. The meshes are ‘weighed’ and you can add or remove weights in order to control how it morphs. Except no matter how much we tweaked, there were some things we couldn’t quite get right. Have a look at the below two images.

Screen Shot 2015-07-12 at 9.12.06 pmScreen Shot 2015-07-13 at 1.10.34 am

The one on the left has a single piece for each arm (like the example at the top) whereas on the right the arms were split into upper and lower arms. The problem we had with splitting the arms and legs up like that is the rigid puppet-like feel to the character when they move.

But see the weird kinks in the arms and legs of the sprite on the left? No matter how much tweaking with the weights we did, they never really disappeared. In the end we opted to work around it, and split the arms and legs at the joints.

With time and experimentation, it’s definitely possible to get Puppet2D doing what it says on the tin. Overall, we’ve been happy with it. BUT… actually animating in Unity is nicht so gut. Unity just doesn’t give you the same amount of control that something like After Effects does. It really slows down the animation process, and in this project we can’t afford to lose time on anything if we can avoid it. After some discussion, we’ve decided to look more into After Effects.

After Effects has a couple of tools that should speed the process up for us. Those tools are Motion2 and DuIK.

DuIK basically does what Puppet2D does but in After Effects. It has a couple of advantages though, one of them potentially a HUGE time saver – auto-rigging. Apparently this will rig the character in a single click. Luke’s keen to see how true that is, and whether there is much fiddling around involved to get that to work. But it could be a massive time saver.
Another thing with DuIK is a thing they call Rot Morph (Rotational Morph). Basically it’s a tool specifically designed to make the elbows and knees work properly, potentially solving the problem we had with Puppet2D.
Motion2 is a general workflow plugin for After Effects ($35). It does a bunch of things but essentially it is designed to speed up the animation workflow a lot. One of the things I think it’ll help us with is things like Follow Through & Squash & Stretch. It may also help us with smoothing out facial animations, though again that’d be something to experiment with.
One problem with switching to After Effects would be that we’d have to import each frame of an animation into Unity, which means files get large. But we’re looking into a more efficient way of doing that. Stay tuned.

3 comments

  1. Anil Punjabi · June 26, 2016

    did you figure out a better way to animate. I’m looking for a similar solution.

    Like

    • chrismarcatili · June 27, 2016

      Thanks for your question. In the end we went with splitting the joints (so, upper and lower arms and legs) to avoid the odd pinching effect that we saw. We never quite figured out what was going on there.
      It means having more individual assets, but since we’ve decided to go with animating in After Effects, it hasn’t had an impact on our workflow.
      Since we’re using AE, we switched from Puppet2D to DUIK, which is a plugin and is available by donation. It means we can do all the rigging and animating outside of Unity, export frames from AE and then all we import into Unity is our sprite sheets.
      DUIK has a lot of the same style of rigging tools we were using on Puppet2D.
      http://duduf.net/index.php/products/after-effects/duik/
      Hope that helps. We’ll hopefully have some final words to say on where we landed with our workflow (things tended to change a lot mid-stream).

      Like

  2. Scott Munday · December 17, 2016

    Not sure when they added this, but Puppet2D has the ability to assign appropriate weights to the mesh created from the sprite. They show in their tutorial how to get around the distortion issue you are getting in your animations.

    Like

Leave a comment