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

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 0 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...