A wicked awesome face animation / morph target tutorial
by Adam deGrandis · 08/14/2006 (2:51 pm) · 33 comments
Since I feel like a bad business owner if I don't pimp the unstoppable art house power of Games Extract every plan I write, here is a quick bit of news. As I mentioned before, the car pack is done and the people pack is scrapped for the tutorial that follows this paragraph. Being that that's the case, I was trying to think of feasible pack options for the future and was stuck. I wasn't even sure if I even wanted to do another one. While doing some client work, I stumbled upon the joys of making explosions.

4.25 megs of explosive entertainment in WMV format
The effects in order are artillary shell, molotov, frag grenade, flak, and what im calling a "plasma molotov".
New content pack? So we'll see what happens. Ok, let's get on to the tutorial.
The Games Extract morph animtion solution
how to unleash the power of Torques animtion system and let your inner animator run wild
I've read quite a few forum posts asking how successfully export morph animation. These threads are, of course, referring to the actual Torque animation type called "morph animtion". This is an old animtion type that, if I'm recalling stories from the old Dynamix guys correctly, was used as a hacky fix for one or two issues, but never considered a viable option for anything else. The lesson learned here is that if the people who designed the tech didn't think morph animation was useful, you shouldn't either.
"Thats blows 98%", you may be saying. "I'm making a post modern / post apocolyptic hybrid MMORPGRTS. How is anyone going to take it seriously if Duchamp's face isn't realistically animated when he's throwing saucy french insults at the nuclear zombie Warhol?"

Don't worry. No one will play your crappy game because, just like that last joke, no one understands it. But I won't stop you from trying. There is, in fact, a way to get things like animated faces (or anything else that traditionally uses morph targets) into Torque. The best part (for me as a teacher and Torque knowledge knower) is that it illustrates that the Torque art pipeline isn't this confusing, rigid "do this, then this, then this" system. It's this incredibly fluid, artist-designed-for-artists system, that allows an someone to make art however they want to and be able to get their result in-game, provided they have a few required elements such as a bounding box, detail markers, etc.
So let's get started.
To begin with, you need to know that anything can be used as a bone as far as the exporter is concerned. This goes back to the "torque is an artists system"; It's a wide open playing field with very few hard rules of play. You can use max bones, you can use biped, you can use meshes, you can use dummy objects, etc, etc. It's all about what you prefer to use. Good ol' buddy of mine and GG creative director Joe Maruschak likes using meshes, because he makes his skeletons super low poly version of the character. I prefer to use bones because Im too lazy to do what Joe does. Just joking, I like the speed that comes with quickly clicking out bone chains. The original Tribes characters (and thus, Kork the ork) are done with biped.
The reason all of these options are possible is because the exporter is only looking at the transforms, rotations, and scale of the pivots, not the actual objects themselves. That means if you have a mesh with no detail number on it (like a bone), its pivot information is exported while its actual shape is not. Conversely, if you put detail numbers on, for example, biped parts, you'll export out the biped geometry.
So, if all you need is something with a pivot, a dummy object or a simple spline or max shape will make a fine candidate for a bone. And as long as they're under the two node base hierarchy (usually named base01>start01), their pivot info will be exported.
Knowing that bit of light theory, you're now well prepared to take on a practical task. If you make a collection of dummy objects, add them as bones under the skin modifier, and weight the mesh to them, you'll have a bunch of morph targets that can be used to do anything you want.
For an example, take a look at this head. It has a face rig that was constructed in the exact way Im talking about up above.


The rectangle shapes are added to the bone list in the skin modifier, and the face vertices were weighted appropriately. I made several animation sequences that were set to blend animation, which makes the following results possible.

Whats more, because they are blend animation, they can be mixed together to produce different results. Here is happy and angry mixed together to get a pretty crazy looking smile.

And here is sad and angry combined to make "utter disbelief".

So that's just a face, but the applications of "dummy objects as bones" are numerous. Animated muzzle flares. Waterfall made out of geometry. The Blob. The thing to keep in mind, though, is that this isn't a "special approach" or -gasp- a "hack". This is doing exactly what the creators of the exporter intended. You have an mesh. You need to make it move. You make something to make it move.
Thats all from me for now. Im more than happy to answer any questions either in this plan or in email regarding this stuff. As always, thanks for reading.

4.25 megs of explosive entertainment in WMV format
The effects in order are artillary shell, molotov, frag grenade, flak, and what im calling a "plasma molotov".
New content pack? So we'll see what happens. Ok, let's get on to the tutorial.
The Games Extract morph animtion solution
how to unleash the power of Torques animtion system and let your inner animator run wild
I've read quite a few forum posts asking how successfully export morph animation. These threads are, of course, referring to the actual Torque animation type called "morph animtion". This is an old animtion type that, if I'm recalling stories from the old Dynamix guys correctly, was used as a hacky fix for one or two issues, but never considered a viable option for anything else. The lesson learned here is that if the people who designed the tech didn't think morph animation was useful, you shouldn't either.
"Thats blows 98%", you may be saying. "I'm making a post modern / post apocolyptic hybrid MMORPGRTS. How is anyone going to take it seriously if Duchamp's face isn't realistically animated when he's throwing saucy french insults at the nuclear zombie Warhol?"

Don't worry. No one will play your crappy game because, just like that last joke, no one understands it. But I won't stop you from trying. There is, in fact, a way to get things like animated faces (or anything else that traditionally uses morph targets) into Torque. The best part (for me as a teacher and Torque knowledge knower) is that it illustrates that the Torque art pipeline isn't this confusing, rigid "do this, then this, then this" system. It's this incredibly fluid, artist-designed-for-artists system, that allows an someone to make art however they want to and be able to get their result in-game, provided they have a few required elements such as a bounding box, detail markers, etc.
So let's get started.
To begin with, you need to know that anything can be used as a bone as far as the exporter is concerned. This goes back to the "torque is an artists system"; It's a wide open playing field with very few hard rules of play. You can use max bones, you can use biped, you can use meshes, you can use dummy objects, etc, etc. It's all about what you prefer to use. Good ol' buddy of mine and GG creative director Joe Maruschak likes using meshes, because he makes his skeletons super low poly version of the character. I prefer to use bones because Im too lazy to do what Joe does. Just joking, I like the speed that comes with quickly clicking out bone chains. The original Tribes characters (and thus, Kork the ork) are done with biped.
The reason all of these options are possible is because the exporter is only looking at the transforms, rotations, and scale of the pivots, not the actual objects themselves. That means if you have a mesh with no detail number on it (like a bone), its pivot information is exported while its actual shape is not. Conversely, if you put detail numbers on, for example, biped parts, you'll export out the biped geometry.
So, if all you need is something with a pivot, a dummy object or a simple spline or max shape will make a fine candidate for a bone. And as long as they're under the two node base hierarchy (usually named base01>start01), their pivot info will be exported.
Knowing that bit of light theory, you're now well prepared to take on a practical task. If you make a collection of dummy objects, add them as bones under the skin modifier, and weight the mesh to them, you'll have a bunch of morph targets that can be used to do anything you want.
For an example, take a look at this head. It has a face rig that was constructed in the exact way Im talking about up above.


The rectangle shapes are added to the bone list in the skin modifier, and the face vertices were weighted appropriately. I made several animation sequences that were set to blend animation, which makes the following results possible.

Whats more, because they are blend animation, they can be mixed together to produce different results. Here is happy and angry mixed together to get a pretty crazy looking smile.

And here is sad and angry combined to make "utter disbelief".

So that's just a face, but the applications of "dummy objects as bones" are numerous. Animated muzzle flares. Waterfall made out of geometry. The Blob. The thing to keep in mind, though, is that this isn't a "special approach" or -gasp- a "hack". This is doing exactly what the creators of the exporter intended. You have an mesh. You need to make it move. You make something to make it move.
Thats all from me for now. Im more than happy to answer any questions either in this plan or in email regarding this stuff. As always, thanks for reading.
About the author
#2
08/14/2006 (3:16 pm)
great post Adam... now how do you rig the facial expressions of a character that is staring at a sandwich and really wants to eat it, but his animator/artist is already chowing down on it.
#3
08/14/2006 (3:23 pm)
<3
#4
Just a quick heads up to anyone who reads this and instantly thinks "I'm gonna use morph animation all over the place!" I'd just like to point out that doing really complex things with morph animation can start creating really HUGE dts files :D Complex being many points and many frames. If I see anyone with a full character animations done soley in morph animation I will hunt you down and throw cabbages at you from afar :D
You have however given a stellar example of when to use it: facial expressions and using blend animtions. Kudos again for great .plan.
[quick edit]
Just viewed vid of the explosions, more Kudos for you :) They look great.
08/14/2006 (3:27 pm)
Great stuff Adam!Just a quick heads up to anyone who reads this and instantly thinks "I'm gonna use morph animation all over the place!" I'd just like to point out that doing really complex things with morph animation can start creating really HUGE dts files :D Complex being many points and many frames. If I see anyone with a full character animations done soley in morph animation I will hunt you down and throw cabbages at you from afar :D
You have however given a stellar example of when to use it: facial expressions and using blend animtions. Kudos again for great .plan.
[quick edit]
Just viewed vid of the explosions, more Kudos for you :) They look great.
#5
I love the artillery explosion :) Great tut
08/14/2006 (3:27 pm)
If "La fontaine" of Duchamp would have to insult a Warhol campbell soup it would probably say: "Vous copiez mon ready-made de 40 ans plus vieux que vous, spice de boite de conserve!" Or something like that...I love the artillery explosion :) Great tut
#6
Thanks much!
@Benjamin
hahaha oh man. I completely forgot about the sandwich photo. Good times good times.
@Koves
Right back at you, sweetie.
@Craig
YES! This is an excellent point and I'm glad you made it. And thanks for the kind words.
@Ben
Hahah, Ben I don't speak french and the babelfish translation is hilarious.
08/14/2006 (3:29 pm)
@SurgeThanks much!
@Benjamin
hahaha oh man. I completely forgot about the sandwich photo. Good times good times.
@Koves
Right back at you, sweetie.
@Craig
YES! This is an excellent point and I'm glad you made it. And thanks for the kind words.
@Ben
Hahah, Ben I don't speak french and the babelfish translation is hilarious.
#7
08/14/2006 (3:32 pm)
I am but a simple programmer, and your talk of this "art" confuses and frightens me..
#9
08/14/2006 (3:57 pm)
Nice work Adam. I know a few people have asked about doing something like this and we have always told them "just setup a face rig and use blend animations", now it will be good to show them a few extra examples even as screenshots.
#10
08/14/2006 (4:00 pm)
Great stuff Adam. Really like the explosions.
#12
So what about simple items, like cloth that moves and flows when the player is walking or running. you could rig it with bones and the animation for a cap blowing in the wind. or dress geometry pieces that move with the motion of the hips. I wonder could this work with Milkshape. :)
I been altering some of my meshes that I purchase from some fine content packs, but things like caps, and dresses or robes dont move like they suppose too. Rigging a flat plane and giving it bones and animating the motion sounds a lot easier than having it do it dynamically. and just mounting the pieces on the main body a la Warcraftish like.
08/14/2006 (5:01 pm)
@AdamSo what about simple items, like cloth that moves and flows when the player is walking or running. you could rig it with bones and the animation for a cap blowing in the wind. or dress geometry pieces that move with the motion of the hips. I wonder could this work with Milkshape. :)
I been altering some of my meshes that I purchase from some fine content packs, but things like caps, and dresses or robes dont move like they suppose too. Rigging a flat plane and giving it bones and animating the motion sounds a lot easier than having it do it dynamically. and just mounting the pieces on the main body a la Warcraftish like.
#13
Thats a great question and probably fodder for a whole tutorial onto itself, but I'll lay out my basic views on capes, cloth, and the like here.
Basically You have to look at how something moves. Things like a face, for example, are really free moving. There isn't a logical chain of action. Its a bunch of single points that move in different directions at the same time.
Capes and clothes and the like do have a logical chain of motion. if the bottom of a robe is moving, it means the middle is moving too, albiet less than the bottom. The top is probably moving too, but less than the middle or bottom.
Since that's the case, I would deal with clothing like that by mostly rigging it to a generic player skeleton (legs, arms, whatever) and then partially rigging it to any number of secondary rig pieces (dressChain, robeChain, capeChain) that I would make to get the job done. This way, the clothing would move with the legs or arms or whatever as it needed to, but then Id also have a third chain or a series of chains to control the subtlety of motion, like a subtle blowing in the breeze or something like that.
08/14/2006 (5:33 pm)
@JohnnyThats a great question and probably fodder for a whole tutorial onto itself, but I'll lay out my basic views on capes, cloth, and the like here.
Basically You have to look at how something moves. Things like a face, for example, are really free moving. There isn't a logical chain of action. Its a bunch of single points that move in different directions at the same time.
Capes and clothes and the like do have a logical chain of motion. if the bottom of a robe is moving, it means the middle is moving too, albiet less than the bottom. The top is probably moving too, but less than the middle or bottom.
Since that's the case, I would deal with clothing like that by mostly rigging it to a generic player skeleton (legs, arms, whatever) and then partially rigging it to any number of secondary rig pieces (dressChain, robeChain, capeChain) that I would make to get the job done. This way, the clothing would move with the legs or arms or whatever as it needed to, but then Id also have a third chain or a series of chains to control the subtlety of motion, like a subtle blowing in the breeze or something like that.
#15
This type of rig has been on my "want to do" list for a while. To take it to the next level, put the bones on splines that follow face musculature. Much like where this thread ended up going.
@Craig's concern: If I'm reading this right, we aren't actually using the 'morph' animation feature for this, so we actually don't get the same position-per-vertex-per-frame file size hit. :)
08/14/2006 (9:14 pm)
Well written Adam, informative and enertaining. Classic: "just like that last joke, no one understands it." This type of rig has been on my "want to do" list for a while. To take it to the next level, put the bones on splines that follow face musculature. Much like where this thread ended up going.
@Craig's concern: If I'm reading this right, we aren't actually using the 'morph' animation feature for this, so we actually don't get the same position-per-vertex-per-frame file size hit. :)
#17
Note to everyone else: thats an inside joke from when I was still at GG. Consider yourselves informed.
08/14/2006 (10:17 pm)
HAHAHAHAH! Nice one Matt. :)Note to everyone else: thats an inside joke from when I was still at GG. Consider yourselves informed.
#18
'Vertex animations' in TGE are records of vertex info per frame and create very large files. This may be what Craig F was referring to above.
Please let me know if I misunderstand what you are getting at. I really like the fact you point out about not having to use bones to animate your character: very useful.
08/14/2006 (11:54 pm)
I am confused on your terminology, are you calling the end bone positions for each expression/phenome a morph target? This somewhat makes sense to me, but morph targets usually refer to target positions of verticies, not bones/nodes, at the beginning and end in an animation... similar to your write up, but not the same thing. manipulating the end positions of verticies gives very fine control of your animations and many tools make them very easy to create and use. This resource is a great implementation of a true morph target technique.'Vertex animations' in TGE are records of vertex info per frame and create very large files. This may be what Craig F was referring to above.
Please let me know if I misunderstand what you are getting at. I really like the fact you point out about not having to use bones to animate your character: very useful.
#19
In either case though, this is a great idea (even some people doing movie type work have started to move over to bone controlled facial animation since it can be a whole lot more flexible in some ways, morphs are linear blends while bones can be set up to be animated along arcs etc for example). I did the exact same thing for some facial animation work a few months back, it works great (and looks totally sweet when hooked up to a realtime phoneme/viseme extractor... ehm =).
08/15/2006 (12:02 am)
I have to agree it's a bit confusing bringing in the term "morph" in this case, since this has nothing to do with what that term traditionally refers to. What this is is just a regular bone setup with weighted vertices etc. In either case though, this is a great idea (even some people doing movie type work have started to move over to bone controlled facial animation since it can be a whole lot more flexible in some ways, morphs are linear blends while bones can be set up to be animated along arcs etc for example). I did the exact same thing for some facial animation work a few months back, it works great (and looks totally sweet when hooked up to a realtime phoneme/viseme extractor... ehm =).
#20
We may have to dock Adam a couple points for not making that distinction clear.
08/15/2006 (1:40 am)
Yes, you are correct, this really isn't morph animation per se. But, in terms of what people are generally trying to accomplish when they ask about "morph animation" support, this is a better approach than using blend shapes the "morph" option in the exporter. We may have to dock Adam a couple points for not making that distinction clear.
Torque 3D Owner Surge