Saturday, September 19, 2009

Pumpkin Blendshapes

Here's a sample of some of the morph targets that make up my pumpkin rig. There's fifty-six shapes in total.

pumpkin blendshapes

As I was modeling them, I needed to come up with a technique of accurately building additive blendshapes. The idea being - I want one blendshape for a left smile and one for a right smile, and when the two are added together, they equal a full smile. Modeling blendshapes that add together to a specific target is tough. There's a lot of back and forth. So I came up with a shortcut:

First, I modeled the entire smile. Then I created two duplicates of the base shape and added the smile as a blendshape to each of them. I used the Paint Blend Shape Weights Tool to make one of them into a right-sided smile and the other into a left-sided smile. Finally, I opened up the component editor and made sure that the weights on the vertices between the two models added up to 1.

I know that sounds like a lot of steps, but it's actually really fast, and it's so much less work than trying to do it by eye. This saved a ton of time, and wound up being much more precise in the end. By modeling the full blendshape first, I knew exactly what the end result would be.

I'm sure that I'm by no means the first person to have thought of this technique. In fact, I wouldn't be surprised if someone's thought of a way to automate it. If you had a high-res mesh, you probably would have to automate it in order for it to be at all manageable. My pumpkin mesh is pretty low-res, so it worked great for me.

Here's an example of the additive blendshapes for a blink. First I modeled the upper and lower blinks that you see on the left. Then I used the above steps to generate the left and right sided versions.

additive blendshape technique

I'm really happy with how my pumpkin rig turned out. I finally started animating a couple weeks ago, and it's gone really smoothly so far. The blendshapes are great for all the facial stuff. I've done a lot of bone-based facial rigging in the past, but it wouldn't have been appropriate for the character.

For the body motion - squashing, stretching, bending, etc - I should have used lattices instead of blendshapes. The problem with blendshapes is that they interpret linearly, so a bend doesn't really look right. It's working out okay, but if I had to do it over again, lattices would have been a little bit better.

In any case, the animation is coming along well. I'll probably post a sample in a few weeks. Check back soon!

0 comments: