Jump to content
The Dark Mod Forums

AI Joint Parenting


Ishtvan

Recommended Posts

Since proper joint parenting is crucial for systems like melee damage, blackjacking, defining animation channels, I was wondering two things:

 

1. Can anyone explain how joints end up being parented in the MD5 files?

 

2. Can anyone fix the joint parenting in our current AI? Right now it things that all the joints are children of "Hips". In Doom3 AI, only stuff below the waist is a child of Hips. Is there some joint other than the one called Hips that actually defines the hips?

Link to comment
Share on other sites

Here's the relevant thread that explains the issue: http://forums.thedarkmod.com/index.php?s=&am...st&p=162282

Link to comment
Share on other sites

  • 2 weeks later...

Hm, well the parenting is done in Maya. Usually everything a child of hips, because that's conceptually what's going on. Everything moves from the hips. All animation rigs are built like this.

 

If there's an issue with this, we need to sort this out right now, before squill and I make any anims with the new rig we just made.

 

Maybe it is like what Spring said - hips and torso are child of origin, but not connected to each other. I think we should import one of the doom3 models.

 

I just quickly imported the player.md5mesh from Doom3\base\pak002.pk4\models\md5\characters\player\mocap\

I rotated the "Hips" joint, and the entire upper body leant forwards, which is a sure way of testing if it's actually the child. Around that area I also found "Body" and "Body2" bones, which both seem to do the same thing. These are the parent of the hips, it seems, because they rotate the entire body, but do not move when the hips rotate.

 

Also around that area I found a "Waist" and a "Waist2" bones, which both seem to do the same thing, rotate the upper body as if bending from the hips.

Link to comment
Share on other sites

Also around that area I found a "Waist" and a "Waist2" bones, which both seem to do the same thing, rotate the upper body as if bending from the hips.

 

Perhaps the player model is different from the other AI? He seemed to be pretty limited in movement ingame. Heck, looking down made him bend over to touch his toes in 3rd person. lol

Link to comment
Share on other sites

Hm, well the parenting is done in Maya. Usually everything a child of hips, because that's conceptually what's going on. Everything moves from the hips. All animation rigs are built like this.

Apparently not the Doom3 ones, or they used a different name for the joint you're describing. They used "Hips" as a parent for the lower body only, to divide upper and lower bodies at the waist, for stuff like anim channels and damage zones. It doesn't matter much what it's called, as long as we have something like that. I didn't see anything like that in our rig though. LeftHip_Dummy and RightHip_Dummy seem to be parents of only the legs, but they don't cover the groin area, so that leaves stuff out when trying to define the lower body.

Link to comment
Share on other sites

isn't this all defined with animation channels?

 

i changed some joint names before in anim channels for the walk and idles because it excluded any movement on the spine and shoulders joints for the upper body. I think it's important to know which joints are part of a channel, but i'm not sure this answers your question.

 

i haven't checked on the doom models but i'm pretty sure they have a similar parent/child setup for characters. Otherwise we would need an extra joint (somewhere above the hips) to split the upper from the lower body.

Link to comment
Share on other sites

isn't this all defined with animation channels?

 

i changed some joint names before in anim channels for the walk and idles because it excluded any movement on the spine and shoulders joints for the upper body. I think it's important to know which joints are part of a channel, but i'm not sure this answers your question.

It's the other way around, anim channels use the joint parenting to define them. We can change anim channels to be whatever we want in the def file, but they use the joint parenting as a quick way of specifying what joints are in what channel. For example, in the builder guard:

 

tdm_ai_builder_guard . def

	channel torso		( *Spine)
channel legs		( *origin - *Spine_Dummy)

*Spine means "every joint that is a child of spine"

*origin - *Spine_Dummy means "every joint that is a child of origin (i.e., every single joint in the rig), excluding every joint that is a child of Spine_Dummy (and I'm not sure what those would be, is everything on the upper body parented to Spine_Dummy?).

 

i haven't checked on the doom models but i'm pretty sure they have a similar parent/child setup for characters. Otherwise we would need an extra joint (somewhere above the hips) to split the upper from the lower body.

The doom creatures use similar setup for the channels

monster_zombie_boney . def

	channel torso					( *Waist )
channel legs					( *origin -*Waist SPINNER )

 

But in the damage zone setup (in the same file), you can see that their joint "Hips" is not the parent of everything:

	"damage_zone head"				"*Neck"
"damage_zone chest"				"*Waist -*Neck"
"damage_zone left_arm"			"*Luparm"
"damage_zone right_arm"			"*Ruparm"
"damage_zone legs"				"*Hips origin Body2"

 

The "legs" damage zone is saying "everything that's the child of Hips, plus individual joints origin and Body2". If Hips were the parent joint of everything, as it is on our rigs, including *Hips would define the "legs" zone to be every single joint, and the damage zone setup wouldn't work (which is exactly what happens on our TDM AI if you try to use joints Hips the same way D3 used it).

 

I'm not saying we have to change anything in our current rig, I just want to understand how the joints are parented so that I can correctly set up the damage zones. I need to know how to specify children of joints and individual joints so that there are unique groups for legs and torso (i.e., no joints assigned to both groups legs and torso). This is what I have right now.

 

our damage zones in tdm_ai_humanoid

	"damage_zone head"							 "*Neck"
"damage_zone chest"				"*Spine2 -*Neck"
"damage_zone left_arm"				"*LeftArm"
"damage_zone right_arm"				"*RightArm"
"damage_zone legs"				"*Hips -*Spine2"

 

Head, left arm and right arm work fine, they are unique groups and seem to include all the joints on those parts of the body. However, chest and legs are not working right. This setup seems to leave out some joints in the lower torso, that don't get assigned to any group.

 

My question:What combination of "children of this joint" and individual joints will give me everything on the legs and everything on the torso nice and separated? It would probably be obvious in Maya, but I don't have that.

Link to comment
Share on other sites

Okay, I was able to reconstruct the joint tree from the md5 text file, but I still need to link these joint names back to actual physical locations on the AI. Maybe there is a Doom3 debug ability that prints out the joint names at their actual location?

 

Aside, here is the basic overview of the tree, starting at the top level and working down:

 

Origin is parent of Hips

Hips is parent of: RightHips_Dummy, LeftHips_Dummy, Spine_Dummy, Sword, and Joint7

Sword and Joint7 have no children

RightHips_Dummy is parent of entire right leg

LeftHips_Dummy is parent of entire left leg

Spine_Dummy -> Spine -> Spine1 -> Spine2

Spine2 is parent of: LShoulder_Dummy, RShoulder_Dummy, Neck, joint8, joint9, leftpad, rightpad

LShoulder_Dummy is parent of entire left arm, starting at shoulder

RShoulder_Dummy is parent of entire right arm, starting at shoulder

Neck is parent of: head

joint8, joint9, leftpad and rightpad have no children

 

are leftpad and rightpad the shoulder pads?

 

[EDIT: Found the Doom3 command, it is r_showskel. This is very useful!]

Link to comment
Share on other sites

Okay I think these damage groups work:

 

"damage_zone head"							 "*Neck"
"damage_zone chest"				"*Spine_Dummy -*Neck"
"damage_zone left_arm"				"*LeftArm"
"damage_zone right_arm"				"*RightArm"
"damage_zone legs"				"*Hips origin -*Spine_Dummy"

 

This assigns the lower torso to group "legs", because the AF body representing the lower torso is anchored to joint "Hips" (this also happeend in Doom3, I tested it). We could, if we want, call the "chest" damage group "torso" instead, and include the Hips joint in it. This counts hits to the lower torso as doing damage at the torso scale (100%), not leg damage (40%). So shooting them in the belly or groin will do as much damage as shooting them in the chest. However, because of the way it's set up, shooting them in the butt will also do torso same damage.

 

The setup is not easy to change, so would we rather that hitting them in the lower belly/groin/butt does leg damage, or chest damage? (We could also assign a separate damage group for belly/groin/butt and put it somewhere inbetween legs and chest...)

 

Below is the setup for grouping the lower torso in and calling it "torso" instead of "chest."

"damage_zone head"							 "*Neck"
"damage_zone torso"				"Hips *Spine_Dummy -*Neck"
"damage_zone left_arm"				"*LeftArm"
"damage_zone right_arm"				"*RightArm"
"damage_zone legs"				"*LeftHips_Dummy *RightHips_Dummy origin"

Link to comment
Share on other sites

so would we rather that hitting them in the lower belly/groin/butt does leg damage, or chest damage? (We could also assign a separate damage group for belly/groin/butt and put it somewhere inbetween legs and chest...)

 

How awkward is the latter?

Link to comment
Share on other sites

Not too awkard, I think we just assign a separate group for "Hips" (note *Hips, just the single joint Hips), and this should cover the AF body that makes up the lower torso. There's also this weird joint at their butt, joint6 or something. Not sure what that does, maybe animates their clothing? It doesn't seem to make a differenec what group that joint is in though, collisions never seem to identify it as the closest joint hit.

Link to comment
Share on other sites

Joints 5,6,7 and 8 are used to control the lower tunic on AI that have them. I'm surprised it never registers a collision.

Link to comment
Share on other sites

id's characters indeed use a different parent setup then ours. It's also more ideal they way they've set it up because it allows for independent hip movement.

 

i've imported one of the zombies (monster_zombie_boney) which shows some extra joints. The hips and upper body joints are children's of 2 extra joints (share the same position with hip joint) which are a child of the origin.

 

i assume this would make assigning the damage zones easier?

It would also mean we have to adjust the skeleton Domarius and i are working on.

Link to comment
Share on other sites

Well the new skeleton has the same basic structure as the current one, so if the anim channels are working in the current one then it should in the new one (if not, we stuffed up and would have to fix it). squill is going to finalise the skeleton soon and then we'll do anims with it and we'll find out if it all works.

Link to comment
Share on other sites

I'm not sure, Squill knows more detail than me on how the Doom3 monsters were set up. Damage zones work fine with the structure as-is, do the anim channels work okay?

 

i believe so, most animations i've seen ingame seem to be playing properly.

 

Well the new skeleton has the same basic structure as the current one, so if the anim channels are working in the current one then it should in the new one (if not, we stuffed up and would have to fix it). squill is going to finalise the skeleton soon and then we'll do anims with it and we'll find out if it all works.

 

we could make the decision to setup the hip the same way as the doom characters. It has some mayor advantages over the current spine/hip setup, mainly independent hip rotation. This means you don't have to counter animate the upper body once you rotate the hips.

 

Almost 90 percent of the cycles would benefit from this change, but it would also mean we would have to redo most of the weighting.

Link to comment
Share on other sites

but it would also mean we would have to redo most of the weighting.

 

Yes, that would be a major undertaking.

Link to comment
Share on other sites

The more the skeleton changes, the more work has to be done re-weighting. A week or two might seem fast when you're only doing one character, but multiply that by the fifteen or so that we currently have.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
×
×
  • Create New...