Shape Animation
by Stefan Andersson

To create a simple tutorial for setting up shape animation in Softimage|XSI. I haven't seen a good tutorial about this subject yet, so why not write a tutorial. Once again I'm aiming for a non technical setup (I know it's a paradox but it is my goal). Why? you ask... well, many of us has the artistic talent but not always the technical skill it takes. So I'm writing tutorials for my company so that all people here at Filmtecknarna can benefit from them, and also so that they can speak to the TD and explain what they need.
OK, I got a little bit off track here. This is however my way of setting up a facial rig for my characters. I think it's easy and gives the result I need.

Part 1. modeling

First we need to model our expressions for the face. I've divided up the face in two parts, mouth and eyebrows. I cheat by having the eyelids as a separate object. But if you have the eyelids attached to the face it's no problem (you think in terms of three parts instead).

You don't need to model every god damn shape you'll ever use. Remember this, keep it simple. You can use two combinations of shapes to get a third one. So for now we'll start with 4 simple shapes.

Here is my turtle character for this task. Let's call him Bernie.

For this I made some shapes, they might look extreme but they are supposed too.

Fairly basic shapes with mouth shapes like "aah, ooh, uuuh" and some smile's. One important thing here is to have one shape that is the neutral shape (except for the original you will also need a neutral shape for the eyebrows). And I also make one face that have a huge opening.

This is perhaps one of the most important thing for facial animation. Eyebrows can show so much emotion that it is essential to have good eyebrow shapes. But for now we can use basic shapes. One neutral, surprised and angry. I also like to use an additional two shapes of the angry and surprise shape. To make him "angry suspicious" and "suspicious curious" (se pic below of the shapes)

Part 2. make them morph targets.

So we finished our modeling and now we are going to test how it looks. This section is going to cover the animation mixer mostly. Make sure that you are in the Animate module (press 2 if not). First we select our original model and then you go to Shape -> Select shape key (pic below)

Now pick one by one all the heads. When finished you end by clicking the right mouse button. Now hide all the heads except your original head (do not delete them).

Easy? Did you actually know what you just did :-) Your head now has a library of shapes to be used in the animation mixer. So open up the animation mixer in one of your lower viewports. Select your head and press "update" in the mixer and XSI should look something like the pic below.

The blue tracks are the shape tracks where we will put our shape library. Remember.... SAVE!!!!

Part 3. Animation Mixer

If you right click on one of the blue tracks you will get a menu up. There you can create new shape tracks, since we need one track per shape (SHIFT-S works also, but be careful so that you don't do "CTRL-S").

In that menu you will also see "Load Source" under that one you will have your library of shapes.Before we will put our shapes in the mixer we need to do something. In the animation mixer go to "Mix-Shape Mixer Properties"

In the popup window you need to uncheck "normalize" under Mixer Properties. Don't ask me why you should do this, honestly it's to complicated to explain or I can't find the proper way of explaining it. And at this point the only thing you need to know is this: with out unchecking Normalize it will not work.
Place your cursor at the first shape track and then right click. Choose "Load Source" and then select one of your shapes. Drag the end of the tracks so that it's extended from frame 1-100 (pic below).

Now do the same thing for the second track and chose the next shape. Continue until you have all your shape in the mixer. You might have to zoom with the Z key to be able to see everything.

Now when you have all your shapes in the mixer we are going to make it a little bit easier to handle. With the CTRL key pressed down select all the tracks you have. In the animation mixers menu, select Clip - Create Compound. This will put all the tracks into one track. They are all still there though, so don't you worry. Select the track and then right click on it. You'll see one selection called expand chose that selection. Now you'll see all the tracks again, but not the scene tracks (the green tracks).

Drag all the sliders to 0 so that no shape is activated. If you now try and drag one slider to 1 or 0.5 you'll see that the shape will pop into place. The reason for this is that a shape is either on or off. So what we need is a counterbalance. Drag the Neutral slider to 1 and then some other slider to 0.5 and now you'll see a gradual change. Now drag the Neutral to 0.5 and you'll see how 50% of both shapes look like. We will create an expression later to have this function automated. Play around a little and see how your shapes look like.


Part 4. Custom parameters

You can connect all shapes to a custom slider set. But I feel that is to complicated for now, so we'll use the sliders that the animation mixer supply for us... sorry for that. But it's not to complicated and you'll find good documentation in the manuals how to make those.

Part 5. expression and making it all work.

You should now have one neutral shape for your mouth and one for the eyebrows. Next to the mouth's neutral shape there is a green dot (to the right). This is where you click if you want to set a keyframe (you should know about that..hehe). Right click on it and chose set expression. Your expression window will now pop up. Type in this formula:

cond( ( A + B ) <1, 1 - ( A + B ), 0)

This is a condition expression. What is says is this. "if A + B is less then 1 then do value 1 on my object minus the value together with A + B, or set value 0". Confusing? it was for me in the beginning, but you'll get the hang of it. Ofcourse we don't have anything called A or B in our scene, so we need to replace these with our shape tracks. Your formula can be as my shapes as you need, A + B is only two shapes but you can have as many as you want. Put the cursor and mark the A (and now for a NICE xsi feature!) select the green button on the first mouth shape and drag it to the expression window.

WOW! you'll now see a *huge* line of text which is the path to the clip (you don't want to type these things). Now do the same thing for the second shape. Select and mark the B and drag the second shape clip to the expression window. My expression ended up looking like this:

So you don't need to type everything, it's just drag and drop. Press Apply to make the expression active. Now drag some of the sliders and you'll see how everything works beautiful... it should anyway.

I hope you enjoyed the tutorial. I've might made some mistakes here and there, but I hope you'll learned something from it. If you find something confusing you can always e-mail me. Remember to sign up for the XSI e-mail list, to get more technical feedback, and also sign-up to CG-Char list for character animation feedback

Stefan Andersson
Character Animator
Filmtecknarna F. Animation