Jump to content
The Dark Mod Forums

Look Joints


Ishtvan

Recommended Posts

The AI don't seem to be that good at following you with their head/body anymore. This is especially noticeable in melee combat. When looking at the D3 creatures, I notice all these look-related joints and settings:

 

monster_zombie_generic

"look_min"						"-90 -125 0"
"look_max"						"25 125 0"
"look_joint Waist"				"0.1333 0.1333 0"
"look_joint Chest"				"0.1333 0.1333 0"
"look_joint Shoulders"			"0.1333 0.1333 0"
"look_joint headcontrol"		"0.6 0.6 0"
"look_joint Ruparm"				"-0.4 0 0"
"look_joint Luparm"				"-0.4 0 0"

 

I don't know what these vectors are exactly. The first two appear to be angular limits (pitch, yaw, roll). I'm not sure if the others are weightings or what. I'm not sure what a negative weighting would be, maybe they turn that part counter to the rest of the turn? Presumably they're documented somehwere.

 

In our AI, look joints are applied very inconsistently. Only the Blecher and the Spider queen have a full set of look joints. Our default human AI have:

atdm:ai_humanoid_base

"look_min"	  "-80 -90 0"
"look_max"	  "25 90 0"
"look_joint Spine"	  "0.3 0.3 0"
"look_joint Head"	  "0.7 0.7 0"

 

So they only bend at the spine and turn their head to look. Would it improve anything to set up the other look joints that we have on our other AI (and D3 has on theirs?).

 

As I said it's very inconsistent right now. In addition to those humanoid_base joints, the Undead have:

00049: "look_joint Waist"	  "0.4 0.4 0"
00050: "look_joint Head"	  "0.6 0.6 0"

 

The Builder forger has:

"look_joint Spine2" "0.1333 0.1333 0"

 

The Belcher has:

"look_joint Spine" "0.1333 0.1333 0"
"look_joint Neck" "0.1333 0.1333 0"
"look_joint Head" "0.2 0.2 0"
"look_joint RightArm" "0.1333 0.1333 0"
"look_joint LeftArm" "0.1333 0.1333 0"
"look_joint tail1" "0.1333 0.1333 0"

 

 

This seems like one of those things that will come back to bite us later if we don't get it sorted out now. We should probably make a standard set of look joints and settings for our humanoid AI (including undead). Does anyone already know what these settings do?

Link to comment
Share on other sites

I don't know what these vectors are exactly.

 

Those just control how far AI will turn their head and what other joints will move when they do it. We used to have it set up so that the AI moved their torso and shoulders when looking around, but that just didn't look very good (when their shoulders moved, their arms started clipping into them while walking, for example). I've tried to set values on the humanoid AI that make sense (I haven't bothered with AI that aren't in working order, like the Forger, and have not changed anything on the non-human AI).

 

Angua added a new set of spawnargs to cover random head turning, and I'm not 100% sure how they interact....I think the D3 values set how far the AI will turn their head under any circumstances, and Angua's values only affect random, idle head turning, but I could be wrong.

 

 

The AI don't seem to be that good at following you with their head/body anymore. This is especially noticeable in melee combat.

 

I don't think any of those values should have anything to do with AI looking directly at you. I've never noticed this issue outside of combat (in fact, I've had AI turn their heads to look right at me, seemingly on purpose, as they walk by). In combat it does seem off, but perhaps the animations are taking control of the head?

Link to comment
Share on other sites

They used to tilt their bodies up and down more when you were above or below them. It's affecting melee combat a bit because they don't tilt up or down enough to physically hit you, unless the bounding box on the weapons is expanded ridiculously.

 

About those values controlling "what other joints will move when they do it," what do the numbers mean exactly? Is it a weighting of how much turning each joint does? EDIT: Can we set it so that their shoulders and arms turn vertically (pitch) but not yaw? I think that would be just the first coordinate, right?

Link to comment
Share on other sites

About those values controlling "what other joints will move when they do it," what do the numbers mean exactly? Is it a weighting of how much turning each joint does? EDIT: Can we set it so that their shoulders and arms turn vertically (pitch) but not yaw? I think that would be just the first coordinate, right?

 

Yes, the values have something to do with how much influence each joint gets, but I don't remember the specifics; it was well over a year ago that I looked into it. I just remember something about the values having to add up to 1.

 

It probably is desirable to use Angua's settings to set how far AI will turn randomly (a minimal amount) and the other settings should be set higher to cover cases where the AI intentionally need to turn more, for combat, or to cut down on the amount of 'spinning' they do while searching. If you want to experiment feel free, or you can put it on the tracker and assign it to me.

Link to comment
Share on other sites

I'm mostly interested in adding those other joints again but only in the "pitch" axis (which I think is the first coordinate of the three), to see if I can get them to move their arms up/down in melee combat to better hit you. I'm pretty sure they used to do this when we had all the joints set. If we don't set the yaw, hopefully they won't turn in such a way that their arms clip into them.

 

Not sure if I'll have time to look at it, so I guess I'll add it to the tracker and assign it to you.

Link to comment
Share on other sites

We used to have it set up so that the AI moved their torso and shoulders when looking around, but that just didn't look very good (when their shoulders moved, their arms started clipping into them while walking, for example).

Ah really... that sucks, because I was really impressed with that.

 

I remember sneaking up on a hammer guy and he turned and looked over his shoulder at me, half turning his torso, it was very natural and realistic looking. Most games would just rotate the head in a stupid akward puppet looking way.

 

I hope there is a way to get that back. Surely a little clipping is okay? We have to put up with a certain amount of it in the game anyway.

Link to comment
Share on other sites

It wasn't a little clipping, it was arm-right-through-the-torso clipping. The animation continues to play, so if they're swinging their arm and they turn their shoulder, then their arm swings right through their torso. I suspect there will be problems even if I just adjust the pitch. If they look up while walking, their arms will tilt too and they'll look like they're doing the robot. There's also the issue of their neck sticking out when they look up too far. But I'll play around with it when I'm done with the two things I'm working on right now.

 

edit: Btw, have you done these tests only with the builder guard Ishtvan? I know his settings are much more restricted than the default AI due to the metal collar.

Link to comment
Share on other sites

edit: Btw, have you done these tests only with the builder guard Ishtvan? I know his settings are much more restricted than the default AI due to the metal collar.

Yeah, the Builder guard is the only one set up for melee. It's possible to set up others, but we need to set up the sword attachment points, which seems like a waste of time if they're going to change with the new skeleton.

Link to comment
Share on other sites

  • 3 weeks later...

Is it just a matter of adding attachment points? If so, I'll do it for a few of the other characters...even if they're not perfect it's better than them just running at you. I can do it for the proguard too as I think Domarius has uploaded some attack animations, hasn't he?

Link to comment
Share on other sites

I think the reason they run at you is a lacking frame command that tells them they have drawn a weapon in their draw weapon animation, or a lacking is_weapon_melee on the object attached to them. Not sure though. Greebo would know more about that.

 

Beyond that, they need all the frame commands in the animations that the builder guards have in their def (can we inherit these?), and yes, attach positions for the sword if they're still using the "old method" where the sword was part of the mesh.

Link to comment
Share on other sites

I don't think the proguard have a draw weapon yet, so that probably won't work for them. But the citywatch has the same animations as the builder guard.

 

Beyond that, they need all the frame commands in the animations that the builder guards have in their def (can we inherit these?),

 

Apparently model declarations can inherit from each other, I recently discovered. I can add those frame commands. Is it just the draw and sheath weapon animations?

Link to comment
Share on other sites

Apparently model declarations can inherit from each other, I recently discovered. I can add those frame commands. Is it just the draw and sheath weapon animations?

It's that plus all the melee attack and parry animations (and frame commands within). The animations need to have those same names as well, the script looks them up by name.

 

I think there might be an unsolved mystery at work as well, because I remember trying this for another AI a while ago, trying to get it to work and it was still just running at me. Could be wrong though.

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

    • 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
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...