Lesson 24: Shapeshifter
In Lesson 18, you used metamorphosis to animate a
tumbler morphing into a wine glass. Using the Set Key Shape
defaults, you were able to create this morph by animating positions of
the CVs on the shape. ShapeShifter is a second Set Key Shape
option that lets you link a base shape to various target shapes that all
share a common topology and hierarchical structure. ShapeShifter creates
control sliders that let you combine target shapes together onto the base
object. Keyframes are then set on the sliders.

One of ShapeShifter's primary goals is to help you
with facial animation, where you can set several target faces that show
different expressions such as happiness or surprise. You start with a base
shape showing a neutral expression and then let Shapeshifter link it to
several target faces that show extreme expressions. ShapeShifter creates
these links by adding clusters to the base shape and then uses Alias expressions
to link the control sliders to the clusters. The resulting sliders can
then create a variety of facial expressions by combining or interpolating
between different extremes. You set keyframes on the sliders to animate
the various facial positions.
Shapeshifter can also easily be used for other types
of morphing, but setting facial expressions is its primary goal.
In this lesson, you animate the facial expressions
of a frog. You set up extreme shapes that show the frog in several key
positions, then use ShapeShifter to interpolate between them.
Initial Setup
This lesson requires a file with a frog sitting on
a lily pad.
Retrieve an existing wire file
- From the File menu, select Open. Select the wire
file named L24_ShapeShifter and click on Open.
- If prompted, click Yes to delete all objects, shaders, views
and actions.

The frog model is divided into two main parts. The
head of the frog will be manipulated and animated with ShapeShifter. The
back part of the body and legs will not be animated.
A note about the model
The frog's body was created using a primitive sphere
that had its CVs stretched and squashed. The sphere was then detached at
an isoparm to create the opening for the mouth. Isoparms were then inserted
near the mouth and manipulated to create the lips.
The body was also detached near the head on the upper
and lower parts of the body to separate the head from the rest of the body.

The inside of the mouth was created by creating a
curve inside the frog's head with the same number of CVs as the edge isoparm
at the mouth. The top and bottom edges of the mouth were then patched back
to that line to create the inner surfaces. The internal CVs on these surfaces
were modified to shape the inside of the mouth. Since the edge CVs of the
inside surfaces match the CVs at the edge of the frog's mouth, you should
easily be able to pick and animate the inside and outside of the mouth
together.

Pick and hide the lily pad and the frog's body
Select Pick
Object. Click the back portion of the frog. It is picked while
the frog's head remains unpicked. Click the lily pad to add it to the selection.

- From the Object Display menu, select Invisible.
These parts of the model are hidden and are not needed until after you
animate the frog's face.

Preparing for ShapeShifter
Before applying ShapeShifter, you first need to copy
and manipulate the head into several facial expressions. Shapeshifter can
use as many target shapes as are needed, but four are enough for the frog.
The four are:
- one with a wide open mouth
- one with bulging eyes
- one smiling
- one with the throat bulging

Note: The base frog has its mouth partially
open to allow easier manipulation of the mouths of target shapes.
Copying the Frog's head
You need to make four copies of the original head
that can then be modified to create the required new facial expressions.
Select Pick
Object and click the head of the frog.
From the Edit menu, select Duplicate object -
.
In the Duplicate option window, change the X Translation to 7
and the Number of Duplicates to 4.

Click Go. Four copies of the frog's head are placed along the
X-axis.
Tip: The advantage of placing copies along
the X-axis is that the Right view shows the same profile for all heads.
This makes it easier to pick the CVs on the various heads.
Setting the Open mouth target
To change the facial expressions and gestures on the
frogs, you need to move CVs to change the appearance of the frog's mouth,
throat, and eyes. Start with the first facial extreme, which is the opening
of the mouth used for croaking or speaking.
Note: When using ShapeShifter, you move
individual CVs and not CV clusters. Since Shapeshifter sets up clusters
for you later, don't assemble CVs into clusters when manipulating facial
expressions.
Hide all but one frog head
- Dolly and track in the Top window until you see all five frog heads.
With Nothing picked,
select Pick
Object. Click the second frog head from the left.
- Click-drag a pick box around all of the frog heads to pick them. This
unpicks the second head.

- From the Object Display menu, select Invisible.
The other heads are now hidden from view so that you can focus on the second
head. This head will have a wide-open mouth.
- Track in the Front window, then track and tumble in the Perspective
window until you see the new head.

Make CVs visible on the bottom of the mouth
With Nothing
picked, select Pick
Component. In the Right window, click the frog's bottom jaw.
- Click the bottom inside surface of the mouth to add it to the selection.

- From the Display menu, select Control -
.
In the Control window, make sure that Active is selected under the
Scope pop-up. Turn off the options except for CVs. Click Go.

- Move the control window to the upper left corner of the Top window.

Edit CVs on the bottom of the mouth
With nothing picked, select
Pick
Point
Types
CV.
- In the right view, click-drag a pick box around the CVs that compose
the front of the bottom lip.

Note: The Right window is perfect for picking
CVs since it shows the side of the face. As most faces are symmetrical,
you know that by picking CVs from the side view automatically picks CVs
on both sides of the face at the same time.
When you are finished you can evaluate the movement
of the CVs in other windows. For now, the side view is best for picking.
Select Xform
Move. In the Right window, click-drag down just below the Y-axis
line to open this part of the mouth.

Make the CVs visible on the top of the mouth
- In the Control window, select All under the Scope pop-up.
Make sure that all the options are Off. Click Go.
With Nothing picked,
select Pick
Component. In the Right window, click the frog's upper jaw.
- Click the upper inside surface of the mouth to add it to the selection.

- In the Control window, select Active under the Scope pop-up.
All the options should be set to Off except for CVs. Click Go.

Edit CVs on the top of the mouth
With Nothing
picked, select Pick
Point Types
CV.
- In the right view, click-drag a pick box around the CVs that compose
the front of the top lip.

Select Xform
Move. In the Right window, click-drag above the Y-axis line to
open this part of the mouth.

This completes the first target of the frog's face.
You have created a very wide-open mouth that you can later use with ShapeShifter
to choose a percentage of this expression.
Clean up and QuickRender the face
Select Pick
Nothing.
- In the Control window, select All under the Scope
pop-up. Make sure that all the options are Off. Click Go.
- Click the Perspective window to make it active. From the Render
menu, select Quick render.

Tip: It is always a good idea to make sure
that the rendered surfaces look the way you want them to. In this case,
if you don't like the resulting mouth position, edit some additional CVs.
Setting the Smile target
With the open mouth target complete, you can move
on to the next target shape - the smile. Creating the smile is similar
to creating the open mouth, except you manipulate the sides of the mouth
instead of the top and bottom.
Hide all but one frog head
- From the Object Display menu, select Visible.
The frog's body, the lily pad, and the other frog heads are visible.
Select Pick
Object. Click the third frog head from the left to pick it.
- Click-drag a pick box around all of the frog heads to pick them and
unpick the third head.

- From the Object Display menu, select Invisible.
This hides extraneous geometry so you can focus on creating a smile.
- Track in the Front window. Track and tumble in the Perspective window
until you see the new head.
Make CVs visible on parts of the new head
Select Pick
Component. In the Right window, click-drag a pick box around the
frog's upper jaw, lower jaw and the two inside surfaces of the mouth. Only
the eyes should be unpicked.

- In the Control window, select Active under the Scope pop-up.
All the options should be set to Off except for CVs. Click Go.

Pick and Edit the CVs on the sides of the mouth
With Nothing
picked, select Pick
Point Types
CV.
- In the right view, click-drag a pick box around the CVs that are bundled
just under the frog's eyes.

Select Xform
Move. In the Right window, click-drag up so that the smile reaches
just above the bottom edge of the eye.

Clean up and Quick render the face
Select Pick
Nothing.
- In the Control window, select All under the Scope
pop-up. Make sure that all the options are Off. Click Go.
- Click the Perspective window to make it active. From the Render
menu, select Quick render.

Setting the Throat target
- With the smile target complete, you can move on
to the next shape - a bulging throat.
Hide all but one frog head
- From the Object Display menu, select Visible to
display all geometry.
Select Pick
Object. Click the fourth frog head from the left to pick it.
- Click-drag a pick box around all of the frog's heads to pick them and
unpick the fourth head.

- From the ObjectDisplay menu, select Invisible.
These heads are now hidden so you can focus on creating the bulging throat.
- Track in the Front window and track and tumble in the Perspective window
until you see the new head.
Make CVs visible on parts of the head
Select Pick
Component. In the Right window, Click the frog's lower jaw surface.

- In the Control window, select Active under the Scope pop-up.
All the options should be set to Off except for CVs. Click Go.

Pick and Edit the CVs on the edge of the throat
With Nothing
picked, select Pick
Point Types
CV.
- In the Right view, click-drag a pick box around the CVs at the center
of the frog's throat.

Select Xform
Move. In the Right window, click-drag down and to the left to create
a bulging throat.

Clean up and Quick render the face
Select Pick
Nothing.
- In the Control window, select All under the Scope pop-up.
Make sure that all the options are Off. Click on Go.
- Click the Perspective window to make it active. From the Render
menu, select Quick render.

Setting the Bulging Eyes target
With the throat target complete, you can move on
to the final target shape-the bulging eyes.
Hide all but one frog head
- From the Object Display menu, select Visible.
Now the frog's body, the lily pad and the other frog heads are visible.
Select Pick
Object. Click-drag a pick box around the first four frog heads,
the frog body, and lily pad to pick them. The last head should remain unpicked.

- From the Object Display menu, select Invisible.
These heads are now hidden from view so that you can focus on making the
eyes bulge on the fourth head.
- Track in the Front window and track and tumble in the Perspective window
until you see the new head.
Make CVs visible on parts of the head
Select Pick
Component. In the Right window, click-drag a pick box over the
frog's eyes. This will also pick the upper jaw surface.
- Click the frog's upper jaw surface to unpick it. If necessary, unpick
the inner surface of the frog's mouth as well.

Note: By picking both eyes you can make
them bulge symmetrically. If you wanted to have the eyes bulge independently,
you'd need two target shapes for the eye-one for the right and one for
the left. The more target shapes you use, the more flexibility you'll have
using ShapeShifter later.
- In the Control window, select Active under the Scope pop-up.
All the options should be set to Off except for CVs. Click Go.

Scale and move the eyes
Select Xform
Scale. In the Right window, click-drag to the right to increase
the size of the eyes.

Select Xform
Move. In the Right window, click-drag up to move the eyes a little
higher on the head.
Tip: You may want to use the Front window
to help position the eyes.

Clean up and QuickRender the face
Select Pick
Nothing.
- In the Control window, select All under the Scope pop-up.
Make sure that all the options are Off. Click Go.
- Click the Perspective window to make it active. From the Render
menu, select Quick render to see your work.

Using ShapeShifter
With the facial expressions created, you can begin
to use ShapeShifter. The original head is the base object, while
the other heads are targets.
Cleaning up the scene
To get started, first make the other heads visible
and hide the frog's body and the lily pad. Next, set up your modeling views
to prepare for ShapeShifter.
- From the Object Display menu, select Visible.
The frog's body, the lily pad, and the other frog heads are visible.
Select Pick
Object. Click first on the frog's body, then on the lily pad.
- From the Object Display menu, select Invisible.
These pieces are now hidden from view so you can focus on the frog's heads.

Set up the modeling views
- In the Perspective window, track, tumble, and dolly until the first
frog head is shown. Because this is the base object, you want the Perspective
view to focus on this shape. This will show the results of the ShapeShifter
interpolations.

- In the Front window, track back to the first frog's head, then dolly
out. Set the view so that you can see the head about 8 grid squares below
the X-axis.

Setting the key shape
You can now use ShapeShifter to link the different
frog expressions to the base head.
Setting the key shape options
Select Anim
Set key shape -
.
In the Set key shape options, click Shapeshifter under Interpolation.
A set of ShapeShifter options become available to you.

- The next few steps relate to the ShapeShifter controls. The controls
are created as geometry and placed in the scene. These options determine
how these controls are placed.
- Set the Shape Center to Scale Pivot. This means that
as ShapeShifter interpolates between shapes, the scale pivot acts as the
center.
- Leave the Control name set to Prompt. This lets you name
each control yourself; for example, Throat.
- Leave the Control Parameter set to X Translate. This makes the
controls visible in the front window and lets you slide the ShapeShifter
controls along the X-axis.
- Leave the Control Range set from 0 to 1.0. This
means that the actual control will link 1 unit along the X-axis to a full
interpolation between the base object and the target.
- Leaving the other settings at their defaults, enter 0 next to
Slider position Y and -4 next to Slider position Z. The first
slider is now placed in 3D space at 0, 0, -4. This places the control
sliders below the frog's head. Click Go.

Choose the base shape and the targets
- Click the first frog head to pick the base object. It turns
purple.
- In the Top window, Click the second frog head to pick the target
object. At the prompt, enter a control name
of Open. In the Front window, the first ShapeShifter control appears
at 0, 0, -4 with the name Open beside it.

- In the top window, click the third frog head to pick the target
object.
- At the prompt, enter a control name of Smile. In the
Front window, the next ShapeShifter control appears below the first with
the name Smile beside it.
- In the top window, click the fourth frog head to pick the target
object.
- At the prompt, enter a control name of Throat. In the
Front window, the next ShapeShifter control appears below the first with
the name Throat beside it.
- In the top window, click the last frog head to pick the target object.
- At the prompt, enter a control name of Eyes In the Front
window, the next ShapeShifter control appears below the first with the
name Eyes beside it.

Tip: The controls are visible in all the
modeling windows. You can pick and move them from within any window, although
the front window is the most appropriate for now.
Using the sliders
You can now begin to use the ShapeShifter controls
to start morphing the base shape. You pick and slide the controls in the
front window to morph the shapes.
Prepare the Front and Perspective windows
- In the Front window, dolly and track the view so the controls fill
the window. You can use this window to edit the controls and see the results
in the Perspective window.

Pick and move the Open control
Select Pick
Object and in the Front window, Click the triangle control next
to the word Open.
Select Xform
Move and click-drag with the middle mouse button to move the control
along the X-axis to about the half way point of the control range indicator.
Once you release the mouse button, the facial position updates.

- The mouth is now opened about half way.

Set the performance options and move again
- From the Preferences menu, select Performance options.
In this window, go to the Expression Updates section and turn During
Xform to On.

Tip: Since ShapeShifter uses Alias expressions
to link the controls to the faces, this option updates the facial positions
interactively.
- Close the Performance options window.
- Click-drag with the middle mouse button to see the various positions
of the open mouth. Note how the face updates as you drag.
Tip: If you drag past the end of the indicator,
the mouth keeps deforming. This is useful if the facial expression of your
key shape target wasn't extreme enough.
- Enter 0.33 to set the open mouth to exactly 1/3 open.
- Click the Perspective window to make it active. From the Render
menu, select Quick render. This shows you a better representation
of the new facial position.

Pick and move the Smile control
- With Xform
Move still selected, click with the right mouse button on the triangle
control next to Smile in the Front window.
- Click-drag with the middle mouse button to move the control along the
X-axis.

- The mouth is now smiling with a partially open mouth. ShapeShifter
has interpolated between the two target shapes.

- Click the Perspective window to make it active. From the Render
menu, select Quick render to see a better representation
of the new facial position.

Pick and Move the other controls
- Use the method shown above to create your own facial expression for
the frog. Use Quick render to see what they look like.

Reset the Controls
- S
elect Pick
Object. Click-drag a pick box around the four control sliders.
- S
elect Xform
Move and enter 0. The control sliders are now in their starting
positions. This is why the slider pivots were set at the origin.
What has Shapeshifter done?
The sliders make the facial positions move by creating
clusters for CVs involved in the facial movements, then linking them to
the slider. To find these clusters and the expressions that animate them,
you can look directly at the SBD and Action windows.
Open the SBD window
Select Pick
Nothing. From the Windows menu, select SBD.
In the SBD window, you see several icons representing the ShapeShifter
pieces.

The first is a curve that represents the geometry
of the control slider handle. The second is a template bone that represents
the slider range indicator. The third is a compressed dag node that contains
the CV clusters of the face.
These three nodes exist for each of the target shapes.
Select Pick
Object. Click on one of the compressed nodes to pick it.
- From the Object Display menu, select Expand SBD.
You can now see the three clusters appear as trapezoids since they have
animation channels applied to them. These channels are expressions.

Open the Action window
- With Pick
Object still picked, click on one of the animated cluster nodes.
- From the Animation menu, select Action Window.
Click the Timeview icon to display the expression channels of the picked
node. If you need to, click the expand item button at the left of the cluster.

This cluster node is linked to the triangular control
slider geometry using an expression. Basically, it is multiplied by a value
calculated by ShapeShifter.
Note: You don't have to understand or work
with the expressions created by ShapeShifter. They are pointed out here
to show you how ShapeShifter works. In the future, you can use ShapeShifter
without ever worrying about these nodes.
- Close the Action and SBD windows.
Setting Keyframes
Once the ShapeShifter controls are set up and you
are happy with the results, you can begin setting keyframes. With Shapeshifter,
keyframes are set on the control sliders instead of on the CV clusters
on the frog's head.
To complete this lesson, you'll set up a simple animation
where the frog croaks three times then opens his mouth with a sigh and
a contented smile. The following timeline shows how the various controls
should be set over a 200 frame animation.

The animation is focused on the ShapeShifter controls.
The values used are based on the X translation of the slider.
Setting up the Keyframing options
With Nothing
picked, select Pick
Object. Click-drag a pick box around all of the control sliders.
- From the Animation menu, select Param control.
In the Parameter Control window, the sliders are shown with all of their
parameters turned on. For the first slider, turn off all the parameters
by clicking on the check mark next to the name, then turn the Translate
X parameter back on.

Note: The order of the sliders in the parameter
control window may be different than what is shown.
- Repeat step 2 for the other three sliders. Since you are only going
to be animating the X translation of the sliders, this is the only parameter
that needs to be active.
- Close the Parameter Control window.
Set Keyframes on the Throat and Eyes
With Nothing
picked, select Pick
Object. Click the Throat and Eyes sliders
to pick them.
- From the Animation menu, select Set Keyframe -
.
Set the Parameters option to Local to use the parameter controls.
Set Frame to Prompt. This lets you set multiple frames in
one step.
- Set In Tangent Type and the Out Tangent Type to Linear.
Click Go.

Note: This makes the motion very mechanical,
but you can change this later in the Action window.
- Enter 1 10 20 40 50 70 80 100 110 to set keyframes for these
frames. The frame values come from the timeline. These keyframes set the
start and end of the croaking sequences.
With Nothing
picked, select Pick
Object. Click the Throat slider to pick it.
Select Xform
Move. Enter 1.0 to make the throat bulge out.
- Pick with the middle mouse button on the Eyes slider to pick
it.
- Enter 0.1 to make the eyes bug out a little.
With Nothing
picked, select Pick
Object. Click-drag a pick box around both the Throat and
Eyes sliders to pick them.
Tip: Pick both sliders to set keyframes
for them.
- From the Animation menu, select Set Keyframe.
Enter 15 45 75 105 to set keyframes for the throat and eyes. This
creates the frog's croaking motion.
Set Keyframes for the mouth opening and closing
- From the Animation menu, select Tgl time slider.
In the time slider, change the Start/End pop up to Min/Max.
In the Time Slider, change the current frame value to 120.
With Nothing
picked, select Pick
Object. Click the Open slider to pick it.
- From the Animation menu, select Set Keyframe -
.
Set Frame to Current. This lets you set one frame at a time.
Click Go. A keyframe is set for the Open slider at frame 120.
- In the Time Slider, change the current frame value to 150.
Select Xform
Move. Enter 0.75 to open the mouth.
- From the Animation menu, select Set Keyframe.
The new position is set for frame 150.
- In the Time Slider, change the current frame value to 180.
With Xform
Move selected, enter 0.2 to almost close the mouth.
- From the Animation menu, select Set Keyframe.
The new position is set for frame 180.
- In the Time Slider, change the current frame value to 210.
- From the Animation menu, select Set Keyframe.
The new position is set for frame 210.
Set Keyframes for the mouth smiling
With Nothing
picked, select Pick
Object. Click the Smile slider to pick it.
- In the Time Slider, change the current frame value to 150.
- From the Animation menu, select Set Keyframe.
The new position is set for frame 150.
- In the Time Slider, change the current frame value to 180.
Select Xform
Move. Enter 0.9 to create a strong smile.
- From the Animation menu, select Set Keyframe.
The new position is set for frame 180.
Play back the animation
- From the Animation menu, select Playback options. Under
the Play Blast section, make sure that Show Playblast
is turned Off. Close the Playback Options window.
- Click the Back to First frame button.
- Click the Play button in the Time slider.
- Click on Stop when you are finished viewing the animation playback.
Editing the Action Curves
In the playback, you may have noticed that the actions
were a little robotic or stiff. You can refine the quality of the movements
by editing the action curves.
Edit the feel of the croaking action
With Nothing picked,
select Pick
Object. Click-drag a pick box around the Throat and
Eyes sliders to pick them.
- From the Animation menu, select Action window.
Click the Curve view icon to show the action curves on the picked
objects.
- From the Views menu in the Action window, select Look
at.

- From the Pick menu in the Action window, select Keyframe.
Click-drag around the keyframes at the peaks of the croaking motion. This
should include the throat at 1.0 and the eyes at 0.1.

- From the Tangent Type menu on the Action window, select
Fast seg in. This makes the initial part of the croak faster.

- From the Tangent Type menu on the Action window, select Slow
seg out. This slows down the end part of the croak.

Edit the feel of the mouth actions
With Nothing
picked, select Pick
Object. Click-drag a pick box around the Open and
Smile sliders to pick them.
- From the Views menu in the Action window, select Look
at. Now the action curves belonging to the Open and
Smile sliders are visible.
- From the Pick menu in the Action window, select Keyframe.
Click the peak keyframe of both the curves.

- From the Tangent Type menu on the Action window, select Slow
seg in. This changes the action so the mouth opening and the smile
occur slowly.

- From the Tangent Type menu on the Action window, select Fast
seg out. This alters the action so the mouth closes quickly as
the frog smiles.

Make all geometry visible and target heads invisible
- From the Object Display menu, select Visible.
Now you can see the frog's body and the lily pad once again.
- Select Pick
Object. Click the target heads to make them active.
- From the Object Display menu, select Invisible.
Rendering and viewing the animation
Now that the animation is working, and all geometry
is visible, you can render it at a low resolution to see the final results.
Use the rendering workflow you learned earlier.

Conclusion
Shapeshifter is a powerful morphing tool that is
ideal for setting up facial animations. In this lesson you set up four
target shapes from a base shape. By combining the target facial shapes,
you added a high degree of expressiveness to the frog's face. ShapeShifter
automatically sets up any clusters and expressions that are needed to perform
the morphing.
The number of required facial extremes depends on
the level of realism your face requires. You can also include more facial
extremes than were used in this lesson.
In your own work, when it comes time to keyframe
the facial poses, you can use the method outlined in this lesson or use
Soundsync to accurately synchronize your facial poses with a voice track.
If you would like to use Soundsync, see the Alias Complementary Applications
manual for more information.
aliasdocs@aw.sgi.com
Copyright © 1997, Alias|Wavefront, a Silicon Graphics Company.
All rights reserved.