Get Our Free Ebook
Beginners Guide to HTML


Emile Ghorayeb Articles Jul 29, 2004

What are mathematical exressions?

Also known as Float expressions in Max, mathematical expressions are expressions that can be used to control such things as object parameters (length, width, etc.), transform (rotation, position, scale) and modifier values, mapping coordinates, materials, etc. The pssibilities are endless.

 What I am going to show you here is a way to link morph targets to widen your range of facial expressions ten fold.

I will be going through a number of steps:

  • Initial breakdown of Max3's Morpher
  • Quick glimpse at the Track View
  • Creating the facial targets
  • Setting up the original mesh for facial targets
  • How to create progressive morph in Max3
  • How to link your facial targets to your original mesh
  • Final result/ Trouble Shooting

Max's Morpher

A modifier, Morpher is used to create morph targets.

Go to Modify/More and select the Morpher modifier. I will only explain what is useful fo the moment. The most important thing is to remember that your initial object and your morph target have to have the same numbered vertices which means that you can not morph an object into a completely different object, you can not delete half your object, work on only one half, mirror it, attach it and select it for a target. The rollout contains many sub-rollouts stated here:

Channel Color Legend:

  • self explanatory

Global Parameters:

  • Use limits: This controls your target spinners to stay between the values placed here.
  • Use vertex selection: you can choose to select only certain vertices to be morphed, not a whole object.

Channel List:

  • Save marker/Delete marker:  These markers are used as page breaks.
  • -empty-: These are the channels which will contain each morph target, 1 target per channel.
  • Load multiple targets: self explanatory
  • Reload all morph targets: This is used only when your computer can't refresh automatically.
  • Automatically reload targets: you should always have this clicked on so that your refresh rate is always automatic.

Channel parameters:

  • Channel is active: Used to activate/deactivate a channel.
  • Pick object from scene: self explanatory
  • Capture currnet state: self explanatory

Advanced Parameters:

  • Spinner increments (5.0, 1.0, 0.1): self explanatory
  • Approximate usage: self explanatory

How to use this modifier:

To select a target:

  • Click on the channel you want to add the morph target to;
  • Click on pick object from scene;
  • Click on the object you want to be the morph target;
  • Use the spinner to view the changes.

And that's about it. I advise you to play with it and familiarise yourself with the modifier before you attack anything of production. You might wanna group you targets in a manner to keep things clean. For example, after having modeled a face and its targets, I separate my lipsych shapes from my blinks with a page break (name your page break and click add marker to create a seperation) . I also suggest to keep the Automatically reload targets on, unless you want to reload everytime you make any changes.

Quick glimpse at the Track View

The Track View is where all the motion (animation) is delt with, from controllers to animation keys. Everything can be seen here. Objects, materials, mapping, video post, rotation and space warps are just a small percentage of what you can find here. It could be compared to a graph of the object/parameter selected. You can find it in the top right hand corner to the right of your named selection sets. Hereâ??s some explanation on this tool:

image 1

Basic usage of the Track View:

After having clicked on it you can find this icon in the top left hand side of the Track View.

image 2

If you click on it, another board opens up. This is the Filters. Filtering here means what you want to see and what you don't want to see. You can choose to see only certain objects like you can choose only certain aspects of those objects. This is usually the first thing you look at after entering the track view to filter out what you don't want to see, because it can get very clouded with information in there. Another is the Assign Controller button which we'll be using.

image 3  

What's important to undestand here, is that the Assign Controller button is used to tell 3DsMax what you want the specific track selected to be. It ranges from being a Bezier Controller to a Float Expression depending on what you choose.

There are many buttons in this board. What's important to remember, is that this is mostly used to edit animation. The only buttons we'll be intersted in here are the Filter and Assign Controller buttons.

So, we use the Filter button to filter out what we want to see, and what we don't. And the Assign Controller button is used to set a specific controller to an object or a parameter of that same object (Link control, Rotation, etc.)

Float Expression

Creating the facial targets

We will be using a character and her facial expressions for the example, namely Harley Quinn. To be ready to attack float expressions, being clear about your work is essential. Naming everything is important. You must follow every step accordingly or you're bound to fall into trouble.

What to know for everything to work out well:

  • What facial expressions to create
  • The right procedure on how to create them
  • Assigning the float expressions

Creating the facial expressions

Names and colors of objects:


Note: "CHA" means the 3 first letters of the character. For example, Harley quinn would be HAR, Poison Emilio would be EMI, etc.

CHAm_lipsynch_Aup    CHAm_lipsynch_A        CHAm_lipsynch_Adown

CHAm_lipsynch_Bup     CHAm_lipsynch_B        CHAm_lipsynch_Bdown

CHAm_lipsynch_Cup    CHAm_lipsynch_C        CHAm_lipsynch_Cdown

CHAm_lipsynch_Dup    CHAm_lipsynch_D        CHAm_lipsynch_Ddown

CHAm_lipsynch_Eup     CHAm_lipsynch_E        CHAm_lipsynch_Edown






Blinks(which includes eyebrows):

CHAm_eyes_ntrl01          CHAm_eyes_ntrl02           CHAm_eyes_ntrl03

CHAm_eyes_mad01        CHAm_eyes_mad02         CHAm_eyes_mad03

CHAm_eyes_sad01          CHAm_eyes_sad02           CHAm_eyes_sad03                          


Blinks: create the initial eyes (worried, sad, etc.), then create the eyes closed. Here's the trick to speed things up. Take the initial eyes, add a Morpher, add the closed eye target, put it at 50%, Collapse the object, and move your vertices accordingly to get the midclosed eye you want.

Lipsynch: create the initial lipsynch targets (A, B, C, D , E), then create the up and down targets using these. Most of the time you can move only the corners with a little readjusting of the mouth to get what you want. You can also create mouthshapes with these, or vice-versa.

Depending on your character, you might have to separate your left eyes from your right which means that you'll have 3 targets for your left eye mad, 3 targets for your right eye mad, etc. It should look something like this:

CHAm_Leye_ntrl01          CHAm_Leye_ntrl02          CHAm_Leye_ntrl03

CHAm_Reye_ntrl01          CHAm_Reye_ntrl02          CHAm_Reye_ntrl03


CHAm_Leye_mad01        CHAm_Leye_mad02        CHAm_Leye_mad03

CHAm_Reye_mad01        CHAm_Reye_mad02        CHAm_Reye_mad03


CHAm_Leye_sad01          CHAm_Leye_sad02          CHAm_Leye_sad03

CHAm_Reye_sad01          CHAm_Reye_sad02          CHAm_Reye_sad03



image 4
Click to enlarge

CHAm_*_expr: red

CHAm_eyes_* : orange

CHAm_mouth_* : blue

CHAm_lipsynch_* : green

Setting uo the oroginal mesh for facial targets

This is an important step in the creation of the character. You must setup your character now so it can receive the targets which will contain other targets and float expressions. Here's how you do it:

  • Select your mesh
  • Apply  Morpher (modify/more/morpher)
  • This is what it should look like:
image 5
Click to enlarge

What is important to do here, is to set the neutral target (a duplicate of the original head that you will call CHAm_ntrl) in the __MOUTHMOOD__ and __BLINK__ targets. We will use these after while we are setting up float expressions.

NOTE: in order for you to see the __MOUTHMOOD__ and __BLINK__ targets, you must go in the track view, select both of them, click assign controller, and assign a TCB Float controller, or you will not be able to see them come the time to set the expression.

1 page per set of expressions.

How to create progressive morph in Max3

Now that we have created all our targets, we need to link them all with float exressions in order to get the final result. But this poses a problem. If we want the character to talk while smiling, or being sad, or to blink while the eyes are in a particular shape, we need what is called progressive morph. Progressive morph means going from one target to another with the intermidiate of a third.

Note: The CHAm_eyes_*_expr's are duplicated from the first of the three blinks. Here's some examples:

CHAm_eyes_ntrl01           becomes    CHAm_eyes_ntrl_expr

CHAm_eyes_mad01         becomes   CHAm_eyes_mad_expr

CHAm_eyes_sad01           becomes    CHAm_eyes_sad_expr

For the lipsynch:

CHAm_lipsynch_Aup   becomes    CHAm_lipsynch_A_expr

CHAm_lipsynch_Bup     becomes    CHAm_lipsynch_B_expr

CHAm_lipsynch_Cup    becomes    CHAm_lipsynch_C_expr

CHAm_lipsynch_Dup    becomes    CHAm_lipsynch_D_expr

CHAm_lipsynch_Eup     becomes    CHAm_lipsynch_E_expr

The CHAm_eyes_*_expr are the targets which will hold the mathematical expression:

  • Select your CHAm_eyes_ntrl_expr
  • Apply a morpher on it
  • Apply your 3 targets (CHAm_Leye_ntrl01, CHAm_Leye_ntrl02, CHAm_Leye_ntrl03)
  • Rename the targets (in morpher) in the Channel Paramaters rollout like so:

image 6

  • Go to the Track View
  • Filter out what you want to see (it should look like this):
Click to enlarge

Expand your objects to see the CHAm_lipsynch_A_expr (you can use the Zoom selected objects tool situated at the bottom left hand corner of the Track View)

Expand it so you can see the 3 targets in Morpher.

Select targets A and Adown by clicking on their names

Click Assign Controller

Select Float Expression and click OK.

Now to set the Expressions to each target:

Select the 2nd target (A)

Right click on it

Select Properties, a rollout pops up, this is the float expression rollout.

Type Aup and click Create where it says Name.

Do the same again but type Adown and click Create

Select the first variable (Aup)

Click Assign Controller

Go get Aup in the CHAm_lipsynch_A_expr's morpher, click on it, then click OK.

Select the second variable (Adown)

Click Assign Controller

Go get Adown in the CHAm_lipsynch_A_expr's morpher, click on it, then click OK.

In the expression box type: if(Aup<50,Aup*2,100-abs(Adown))

Click Evaluate(although you don't have to, but this is used to check if there are any errors in your mathematical expression).

Let's understand what we wrote:

We've selected the target A. It is important not to misunderstand what is the target and what is the variable. So, in A we wrote that variables Aup and Adown control the Aup and Adown targets. Knowing this we can look at the expression:

In A:

If Aup<50, then do Aup*2 , then do 100-absolute value of Adown.

All this should add up to the value of A, because it is written in the Float expression box of A. If you check now, you'll see that nothing works yet, we still have to set the exression on the Adown target for everything to work.

Select the 3rd target (Adown)

Right click on it

Select Properties, a rollout pops up, this is the float expression rollout.

Type â??Aupâ?? and click Create where it says Name.

Click Assign Controller

Go get Aup in the CHAm_lipsynch_A_expr's morpher, click on it, then click OK.

In the expression box type: (Aup*2)-100

Click Evaluate, then click Close.

Let's understand what we wrote:

We've selected the target Adown. It is important not to misunderstand what is the target and what is the variable. So, in Adown we wrote that variable Aup controls the Aup target. Knowing this we can look at the expression:

In Adown:

(Aup*2)-100   which means that the target Adown is always equal to double Aup minus a hundred.

Now to prove this, go play with the Aup target. Don't bother trying to play with A or Adown, you can't move them because they are intertwind with Aup.

If you put Aup at 34:

A will be at 68: If blinkA<50, then do blinkA*2 , then do 100-absolute value of blinkC.

Adown will be at 0: (blinkA*2)-100

Now, all that's left is to get Aup to be controlled by our original mesh (HQ_skin). If we can get HQ_skin to control Aup, then we simply put our CHAm_lipsynch_A_expr as a target in our morpher and it create a progressive morph. Here's how it's done:

You're gonna have to do this for every CHAm_lipsynch_*_expr:

Go back in the track view

Expand your objects to show your Morpher

Select the 1st target (Aup)

Click Assign Controller

Select Float Expression and click OK

Right click on it

Select Properties.

Type mood and click Create where it says Name.

Click Assign Controller

Go get the MOUTHMOOD target in your original mesh and click OK

Type mood in the expression box

You've just told Max3 that MOUTHMOOD in your original mesh controls Aup. So if MOUTHMOOD is at 50, then Aup is at 50. And since Aup controls A and Adown, your original mesh will be able to smile, be normal or pout correctly while talking. Do this for all your CHAm_lipsynch_*_expr's and all your Aup's will be controlled by one spinner on your original mesh, so you will be able to smile, be normal or pout while talking with one controller only.

Remember to do this for all the CHAm_lipsynch_*_expr's.

Since all your other targets are in your original mesh, you're done. Play and have fun!

subscribe to newsletter