Previous Blog Next Blog
Prev/Next Blog
by date

A wicked awesome face animation / morph target tutorial

A wicked awesome face animation / morph target tutorial
Name:Adam deGrandis
Date Posted:Aug 14, 2006
Rating:5.0 out of 5
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Adam deGrandis

Blog post
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.

Recent Blog Posts
List:12/05/06 - What's new with Games Extract
11/01/06 - Games Extract FX Pack
08/14/06 - A wicked awesome face animation / morph target tutorial
08/07/06 - Games Extract open for business!
06/03/06 - Games Extract sells out!
04/28/06 - Why my life is filled with more change than yours
01/31/06 - Humvees, education, wrongful death, and time machines
10/14/05 - Plan for Adam deGrandis

Submit ResourceSubmit your own resources!

Surge   (Aug 14, 2006 at 15:06 GMT)
Great work, and information, Thanks

Benjamin Bradley   (Aug 14, 2006 at 15:16 GMT)
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.

Justin Kovac   (Aug 14, 2006 at 15:23 GMT)
<3

Craig Fortune   (Aug 14, 2006 at 15:27 GMT)
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.
Edited on Aug 14, 2006 15:30 GMT

Ben -Djaggernaut- Chavigner   (Aug 14, 2006 at 15:27 GMT)
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

Adam deGrandis   (Aug 14, 2006 at 15:29 GMT)
@Surge
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.
Edited on Aug 14, 2006 15:59 GMT

David .NfoCipher. Bunt   (Aug 14, 2006 at 15:32 GMT)   Resource Rating: 5
I am but a simple programmer, and your talk of this "art" confuses and frightens me..

Aaron E   (Aug 14, 2006 at 15:51 GMT)
@Adam

Nice vid. Love the explosions. I'd buy them.

Logan Foster   (Aug 14, 2006 at 15:57 GMT)
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.

Todd Pickens   (Aug 14, 2006 at 16:00 GMT)
Great stuff Adam. Really like the explosions.

Chris \"C2\" Byars   (Aug 14, 2006 at 16:58 GMT)
Explosion content pack for sure.

/wants

Johnny Hill   (Aug 14, 2006 at 17:01 GMT)
@Adam

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.

Adam deGrandis   (Aug 14, 2006 at 17:33 GMT)
@Johnny
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.

bank   (Aug 14, 2006 at 20:26 GMT)   Resource Rating: 5
really great blog-post!
btw, I very like your explosions :) how much? :))

Mark McCoy   (Aug 14, 2006 at 21:14 GMT)
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. :)

Matthew Langley   (Aug 14, 2006 at 21:29 GMT)
Awesome Adam!



Adam deGrandis   (Aug 14, 2006 at 22:17 GMT)
HAHAHAHAH! Nice one Matt. :)

Note to everyone else: thats an inside joke from when I was still at GG. Consider yourselves informed.

Jameson Bennett   (Aug 14, 2006 at 23:54 GMT)
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.

Magnus Blikstad   (Aug 15, 2006 at 00:02 GMT)
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 =).

Mark McCoy   (Aug 15, 2006 at 01:40 GMT)
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.

Robin   (Aug 15, 2006 at 10:12 GMT)
Where is the nuke explosion ? :)

Adam deGrandis   (Aug 15, 2006 at 14:22 GMT)
@Jameson, Magnus, Mark

This is correct. Technically speaking, this is standard bone/skin modifier animation and not any kind of morph animation, but Mark hit it on the head when he said that this is what people are typically trying to acccomplish when they speak of morph animation.

Timothy Aste   (Aug 15, 2006 at 15:00 GMT)
Haha, DuChamp? Sandwiches? Explosions? When is this perfect game coming out? Adam, I don't know you, but I want to be your friend. Can we hang out sometime?

Timothy Aste   (Aug 15, 2006 at 15:00 GMT)
PS That vid is awesome.

Adam deGrandis   (Aug 15, 2006 at 15:06 GMT)
Tim

Yeah, Id say the sum of this plan makes it the greatest human accomplishment in recorded history. And glad you like the video. I have a confession.

I made it for you.

Edit: that was wicked creepy. over the line creepy. sorry pal.
Edited on Aug 15, 2006 15:07 GMT

Ward De Langhe   (Aug 15, 2006 at 17:54 GMT)
Great explosions!! Are those completly made of particle effects? Or mixed with billboards and IFL?

Adam deGrandis   (Aug 15, 2006 at 18:12 GMT)
Particles and debris dts shapes. No billboards or IFL.

Eric Johnson   (Aug 15, 2006 at 19:01 GMT)
Interesting. I thought for sure you had IFL's in there. Impressed I am. Great work!

Alex Swanson   (Aug 15, 2006 at 19:22 GMT)
I think I saw Ben hitting Zombie warhol with a fire extinguisher in the breakroom earlier this afternoon...

Thomas Shaw   (Aug 19, 2006 at 04:23 GMT)
@Adam and @johnny

"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."

Wait so, you are saying you can animate a cape or hat or something, mount it to the player, and somehow, it all syncs up?? How do you get the cape to billow out when the player runs? How does it know what animation to play?

Jojimbo   (Aug 31, 2006 at 12:12 GMT)
awesome adam i would definately buy an explosion pack,maybe
you could fiddle around with great big plumes of smoke too,ie
as if a town is burning,oil fires etc

Anthony Potamitis   (Feb 26, 2007 at 17:19 GMT)
hi, i know its a bit old now, but the pics are coming up as the white boxes with red x's.

Kory James   (Jul 01, 2007 at 00:10 GMT)
I'm working on a character and i want to make face animation on it does TGEA support shape animation or do i have to rig the head? And is it good to separate the head and the body so the head can have it own animation to make the character talk and to do other body animations?

thanks for your time

You must be a member and be logged in to either append comments or rate this resource.