Thursday, October 25, 2007

Blend Shape

I used blend shape to retract the arms into the cube. It sounds simple and easy, since all you have to do is pull all of the CV's in the arm and align them with side of the cube, and you're done.

But what is cheap to do very often also looks cheap, and that is the case here. If I would choose this simple solution, there will be at least two problems:

1. When the arms are retracted, the edge of the cube will not be smooth, because it has an overlay of several "layers" and there are some sharp edges.
2. When the arms pull out a little bit, when they just started growing, the hands (or feet) will look completely flat. Instead of growing from inside the arm, it will look like they were folded above it (which is basically what we've done).

To fix these problems the CV's should be aligned in such a way that when they are folded back there will be one single curve without overlays.


After fixing that, I found out that when the change is linear from the cube with no arms to the cube with arms, the hand start growing right away, and it doesn't look so good either. I think it looks more "real" if the hand start growing only after the arm has reached a certain point, say half the way.

Then I tried using "In Betweens" in the blend shape. I don't know why but I had a problem there. Whenever the blendshape attribute was set to 1 (meaning to retract the arms all the way), the arms was not only retracted, they made a hole in the cube side, as if they were turned inside.

Eventually after a lot of testing with the in between properties and the blendshape, I decided to do it "manually": I now have two blend shapes, one for half way and one for the end cube. The no arms cube is blend-shaped into the half way cube (NoArmsBlend). Then the original model is blend-shaped into the no arms cube (ModelBlend).
This requires the following settings for each position:

Attribute Original Model Half way No Arms
ModelBlend 0 1 1
NoArmsBlend doesn't matter 1 0


I then added an attribute to ctlBody named "Retract Hands", which goes from 0 to 1 and controls the two blendshape attributes using expressions.

This gives the following stages of growing the hand. Blend shape objects are on the right. Notice the "Retract Hands" property:





No comments: