Moving Mouths ???


Effexx
06-03-2003, 05:16 AM
Time to tap the MSA for some help... Yesterday I tried to make moving mouths on the Skullhead Soldier models I whipped up... I added another bone to the head bone, and added a line in the .QC to add it is a controller... Assigned the proper vertices, compiled... and It turned out like "Brundel Fly" ... The thing was all messed up, but strangely enough the mouth controller worked... Is there a trick to adding moving mouths that I didn't do? Does anyone have instructions or a tutorial for this? I think I needed to do more with the bone... Thanks for any help..


...

DANZA
06-03-2003, 05:34 AM
its wicked hard. YOU need to rotate the head and stuff. takes a long time to get right

HEAD must be a submodel
OK BYE

Trp. Jed
06-03-2003, 05:36 AM
What bone did you add and what did you call it?

When I converted my old moving mouth models to 1.0 I had the same extra bone but I couldnt get the mouth to move at all.

As for the odd messed up skeleton, I think its if you add bones in Milkshape it messes up the animation because of the keyframing in Milkshape.

I actually added the bone manually via the ref SMD and re-imported that into Milkshape which for me didnt make things screwy.

- Jed

Effexx
06-03-2003, 06:01 AM
I added a bone to the immediate left of the "Bip01 Head" head bone, and named it simply "Bip01 Mouth" ... I didn't do any keyframing for it or anything... As far as the .qc goes I experimented by copying the line of text from the 3rd ID mouth models, and changed the verbage to match the naming convention I used... That may be part of the reason <shrug> ... Like I said, after recompiling the moth controller worked, but the model looked like it was in a bad car wreck...

Danza: The head is a submodel already.. If I add the extra mouth bone to the head submodel don't I also have to use that same skeleton for the rest of the reference meshes? Didn't think you could have two different skeletons in one model...


...

MaRzY
06-03-2003, 06:09 AM
I think the only way to add a bone to an existing animated model without screwing it up, is to do what Jed says, edit the smd file with notpad and add it manually. I had to use this method with the animated cromwell tank, when adding the bone that is used to align the tank in the map.

I'm sure Jed will be back, and will explain more about how to go about using this method, he's light years ahead of me...:) plus he knows milkshape like the wrinkles on he's face...:).he will probably CUFF me for saying that now....:)

Trp. Jed
06-03-2003, 07:31 AM
Watch it Marzy - your just bitter because I wont use Lightwave! ;)

(BTW, I checked a pick of a real dennison - the cuffs DO taper to the end! :p )

Anyway, quickest way to add a mouth bone to a model is to do it in the SMD
stage. I've tried doing it using the MS3D ASCII format but I dont know about the
internals and how the IK of the bones works in that format.

Basically, export you ref model as an SMD and then open up the SMD in a
text editor.

At the top of the file, you'll find the "nodes" list which is basically the
bones. Each bone is numbered, named and has the number of the bone its
attached to last.

So to add a bone to the head for the mouth, fine the entry for the bone
"Bip01 Head" and note the number on the left hand side.

At the bottom of that list, add another entry adding the next number on the
left and the number for bone "Bip01 Head" on the right. e.g

28 "Bone01" 13

The next step is to move down to the next section labeled "skeleton" and look
for the list starting "time0". This is the reference pose for the model.

What you need to do is add an entry for you mouth bone at the bottom of your
list telling it to place it slightly to the right of the head bone (so you can
select it easier).

So find the last line, and add another starting with number of your mouth
bone but with the values as follows:

28 0.000000 0.000000 2.000000 0.000000 0.000000 0.000000

That's it!

Save the SMD and then re-import it into Milkshape and you should have a
skeleton with a mouth bone but not all ****ed up.

The only problem is that the SMD format groups all objects sharing a texture
together so its a bit of a pain if you want to tweak anything afterwards. :mad:

Last step is to edit your QC file and add a controller for the mouth by added it to
the end of the controller list:

$controller mouth "Bone01" ZR 0.000000 20.000000

In this case, we're calling the controller mouth, the bone its attatched to is
"Bone01" and can move a maximum of 20 units. Increasing that number alters
how far the mouth can open and close.

- Jed

MaRzY
06-03-2003, 07:43 AM
Great post Jed..:).sticky would be good.

Originally posted by Trp. Jed

(BTW, I checked a pick of a real dennison - the cuffs DO taper to the end! :p )

- Jed

CUFFING HELL!!! don't tell me that....they look so much better......:)..i demand artistic license over reality.....:).....lol.

Effexx
06-03-2003, 08:31 AM
Smooth.. It works.. I had no idea you could edit the .smd like that... Thank you...


Sticky is a good idea.. or at least have someone add this to the FAQ thread...


..

06-03-2003, 08:36 AM
moving mouths would be so awsome. You guys gonna do it?

Oh, and you could as the IOS team how they did it.

http://www.planethalflife.com/ios/

Trp. Jed
06-03-2003, 08:42 AM
Yeah, adding it in the SMD is handy plus if he animation SMD's dont have a reference
to that bone in them, then the new bone just follows its parent.

- Jed

Effexx
06-04-2003, 08:50 AM
ok.. Do I have to add anything else to the .smd? Everytime I compile the model the head texture is all sorts of messed up... I double check everything before the compile... then BAM!... its screwed...


...

Trp. Jed
06-04-2003, 09:46 AM
The head *texture*?

That is odd altering the skeleton shouldn't in any way effect the UVW mapping on the actual meshes.

- Jed

06-04-2003, 11:01 AM
Smoothing errors perhaps?

Trp. Jed
06-04-2003, 11:04 AM
I dont think Half-Life pays so much detail to smoothing to be honest.

if you look at the structure of a SMD file, there are no specific smoothing groups defined, I just think the normals for each triangle.

Anyway Effexx, can you post a screenshot so I can see what this problem looks like?

- Jed

Effexx
06-04-2003, 11:36 AM
I'm still stumped... without the extra bone everything works great... Add the bone and the ehad goes south... <shrug>

here's what happens...


http://home.attbi.com/~effexx/Files/BadHead.jpg


...

Trp. Jed
06-04-2003, 12:25 PM
My god, that is bizarre!

I've not seen that before. I looks like all the UVW assignments for the head have been reset by the looks of it.

What does the layout look like in Milkshape if you select the head and open the texture co-ordinate editor? Is it all screwed up there?

- Jed

06-04-2003, 12:42 PM
First, lemme suggest you move the bone away from the head bone a bit. If you look at the default Gordon model in the SDK, there's a separate dummy bone for the jaw, and its moved forward and up a bit from the head bone (which is basically where the base of the head should be, top of the neck). The jaw bone should be at the point where your jaw rotates, which is different from the point where your head rotates. This should make your final model look better, and reduce that freakish death scream you get when the jaw opens all the way.

As for the MS3D fubaring the model, I've done that before, and got the same "my guy just swallowed a grenade" look. I did manage to get milkshape to do it properly once, but I'm not sure what happened exactly. As someone mentioned, its due to the way it writes the skeleton into the smd. Something to do w/ the order or rotations I think, because the skeleton is hierarchical, each bone's position only a relation to its parent bone. Anyways, I started with a unedited file from the original, re-applied my bone addition, and exported the ref smd. That seemed to work, but YMMV.

If you can't make it work, you could use the smd editting method still. Just export a test skeleton with your new bone, look in the SMD for the bones XYZ coords, and copy those into your original smd manually. As with everything else we do, its all about the hackjobs :D

-DarK

06-04-2003, 06:22 PM
Yeah I've seen moving mouths in International Online Soccer...whenever people talk on the mike the lips move. It's pretty cool I'd love to see it for DoD.

Effexx
06-04-2003, 11:22 PM
Originally posted by Trp. Jed
What does the layout look like in Milkshape if you select the head and open the texture co-ordinate editor? Is it all screwed up there?

OK.. I'll admit I haven't open up the Texture Coordinate Editor to have a look... I should have... I'll be willing to bet it's probably not mapped properly... I just didn't think it could do that because the texture is displayed properly on the .smd before exporting it... I was thinking it was during the compile that it freaked out... hmm... I'll have another look when I get home...


...

Effexx
06-05-2003, 07:20 AM
OK.. you were right... the vertices were not even mapped to the texture in the Coordinate Editor... What's strange is that even though they were completely off the texture was still mapped correctly in the viewport in Milkshape... I moved the vertices back onto the texture, compiled, and voila... it worked... Thanks again...


...

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.