Jump to content
The Dark Mod Forums

Af Changes - Some Instability Now


Ishtvan

Recommended Posts

@AscottK: You made some changes to the guard_base AF file. There's now some instability in the AFs: The arms occasionally flop around for a second or two after the rest of them has come to rest, and sometimes this flips the whole body over a few seconds after they fall. It doesn't happen most of the time, but when they fall on their sides it seems to happen more. They can also come to rest now in some weird TDS-like positions (not so much by falling, but if you pick them up, bend them and let them go, they don't un-bend like before).

 

post-40-1173328757_thumb.jpg

 

I'm not saying any of your changes are "bad," they might be going in the right direction for some things, but creating some other problems that we have to address for others. (For example, adding mass on the arms might be good for the arm flopping problem, but that extra mass might be enough torque to keep them in weird bent positions).

 

What exactly was done, adding mass to the arms, or did you also change the "come to rest" criteria? Maybe we just have to make the waist joint a little more springy to compensate for the extra mass of the arms pulling back in that position above? Then we have to address the instability problem with the arms.

 

Because AFs coming to rest are so finnicky, it might be good to backup the last working version where they come to rest properly. Otherwise I'm worried that we'll make some changes and won't be able to recover.

Link to comment
Share on other sites

Well, I changed the type of the constraint for the forearms (I did change the mass of the bodies but I reverted to the previous version because that idea didn't work very well). Previously, the forearm constraints were cone shaped which resulted in backwards arm bending so I went with hinge-like constraints. AFs are finicky & I'll try to make them more stable.

 

Once we get the guard_base more stable, maybe we should make custom ones for the other AI. Currently guard_base is tailor made for the proguard. Since they are different sizes, then the size of the bodies in the AF should be customized. Maybe it won't make that much of an impact thoughm

Link to comment
Share on other sites

Yeah, I agree we should eventually tailor them a bit more, but it might be good to use one for all human AI except for one with shapes outside the norm like the forge worker and noblewoman. Otherwise it would be troublesome to maintain a lot of them since there doesn't seem to be an "inherit" key in the AFs.

 

So the only difference is the forearm constaint then, and the come to rest timing was not changed at all? That's weird that it would lead to back-bending behavior like that, but maybe it's the hands/forearms being in contact with the ground that won't let it them fall down to a rest position.

 

Btw, I would have guessed they should be a hinge too, based on the lower legs which do work well.

Link to comment
Share on other sites

Yeah, I agree we should eventually tailor them a bit more, but it might be good to use one for all human AI except for one with shapes outside the norm like the forge worker and noblewoman. Otherwise it would be troublesome to maintain a lot of them since there doesn't seem to be an "inherit" key in the AFs.

 

So the only difference is the forearm constaint then, and the come to rest timing was not changed at all? That's weird that it would lead to back-bending behavior like that, but maybe it's the hands/forearms being in contact with the ground that won't let it them fall down to a rest position.

 

Btw, I would have guessed they should be a hinge too, based on the lower legs which do work well.

There were more changes. I'll get back to you on the specifics. Luckily I still have the cvs version of the mod on my HD so I can compare the two. This AF is from january 28.
Link to comment
Share on other sites

I changed the body sizes & the limit types:

 

The new AF is on the left while the old one is the right (AF bodies):

AF_Bodies.jpg

I added upper legs & changed body types for some of them. The old one looks a little messed up. I'll try to get the bodies closer together without overlapping, & maybe change the upper arms' body type.

 

& here are the limits (can't see the limits on the new forearms since they are basically triangular planes):

AF_Limits.jpg

 

Here's part of the AF file on the new one:

articulatedFigure guard_base {

settings {
model "tdm_ai_proguard"
skin ""
friction 0.0099999998, 0.0099999998, 0.8000000119, 0.5
suspendSpeed 20, 30, 40, 60
noMoveTime 1
noMoveTranslation 10
noMoveRotation 10
minMoveTime -1
maxMoveTime -1
totalMass -1
contents corpse
clipMask solid, corpse
selfCollision 1
}

(I just changed "maxMoveTime -1" to "maxMoveTime 15" like the old one to see if that'll help)

 

Here's the old one:

settings {
model "tdm_ai_proguard"
skin ""
friction 0.0099999998, 0.0099999998, 0.8000000119, 0.5
suspendSpeed 20, 30, 40, 60
noMoveTime 1
noMoveTranslation 10
noMoveRotation 10
maxMoveTime 15
totalMass 200
contents corpse
clipMask solid, corpse
selfCollision 1
}

There's no minMoveTime for some odd reason.

 

This reminds me of Microsoft software, about a million ways to do the same thing :wacko: There's a lot to learn about AFs & we'll need a degree specifically for Doom 3 articulated figures :laugh:

Link to comment
Share on other sites

Changing maxmovetime should help a bit with the back bending thing hopefully. Unless -1 meant there's no limit, then it might make it worse.

 

That's really weird, with the old AF file, I noticed that the thighs were below the feet on the proguard as well, but on the other guards, it was fine. It seemed like there was a problem with the proguard specifically that the other ones didn't have. Are you sure he's the one we should be calibrating it for?

Link to comment
Share on other sites

That's really weird, with the old AF file, I noticed that the thighs were below the feet on the proguard as well, but on the other guards, it was fine. It seemed like there was a problem with the proguard specifically that the other ones didn't have. Are you sure he's the one we should be calibrating it for?
Since I'm using the citywatch's anims, I should use him & see how that goes if it makes a difference.
Link to comment
Share on other sites

Okay, Ish. Try it now. I did notice that dragging a body produces jumpiness so I temporarily disabled the dragging in tdm_ai_humanoid for testing because the results in the AF editor are closer to what we need. So I think something needs to be tweaked in the body dragging so the ragdolls don't jump around.

Link to comment
Share on other sites

That's vastly improved over the last version! The instability in the arms that was causing them to flop around when face down seems to be gone. Dragging them by the arms feels much better now than ever before. They don't stay in that position I posted above anymore, they flop down from there fine.

 

I only have three criticisms:

 

1. There's a new unnatural position you can get them into:

post-40-1173427429_thumb.jpg

This might be fixable by putting a little less contact friction (the third friction number in the vector) on the lower leg bodies, so that they can slide out from under them in this position.

[EDIT: I just realised that it looks kind've like there's an object at their feet in this picture. That's an optical illusion, it's just the first person bow.]

 

2. With the arms jointed as they are now, it's going to be very hard to drag them by their legs thru a narrow doorway:

post-40-1173427575_thumb.jpg

In this image, the arm kept getting caught on the corner and wouldn't bend up any more than that. This may be more realistic than before, I'm not sure. However, I would think a real person's arm in that situation would be able to bend more "up" (toward their head) at the shoulder, and you'd be able to drag them thru when their arm bent all the way up such that their upper arm was almost parallel to their neck. However, this would clip the arms into the pauldrons in this case, so maybe that's why they're constrained not to bend that far.

 

3. Falling when KO'd looks less natural now. Maybe that's because the whole system is more stable now that the arms aren't flopping every which way, so we get less random variation in falls. It looks virtually the same every time: unless they are running forward, they will fall backwards with a stiff, slow kind of "timber!" motion. Running forward is the only way they can fall forward.

 

Again the behavior we saw before could have been an accident due to an unstable AF. It's probably better to have it stable like this, and then on starting the KO'd state in the script, we can apply a random little push to them in the script (I wrote a scriptfunction for ropes that applies an impulse to a specified AF body). Or, we could try different death animations that start them out falling forward or back, but a random push might allow for more variation IMO.

 

Anyway, it's getting better. I know AF stuff is all cross-coupled so fixing one problem can introduce some others. I appreciate your patience working with it. :)

 

I did notice that dragging a body produces jumpiness so I temporarily disabled the dragging in tdm_ai_humanoid for testing because the results in the AF editor are closer to what we need. So I think something needs to be tweaked in the body dragging so the ragdolls don't jump around.

Yeah, the jumpiness is related to the code that restricts you from picking the AI up off the ground. I'm intending to make that toggle-able via cvar "cheat" so that mappers trying to get AFs in particular positions can pick them up off the ground with the normal frobbing methods. As you say, this can be temporarily disabled for now by commenting out that list of "grounding" joints in tdm_ai_humanoid_base.

Link to comment
Share on other sites

That's vastly improved over the last version! The instability in the arms that was causing them to flop around when face down seems to be gone. Dragging them by the arms feels much better now than ever before. They don't stay in that position I posted above anymore, they flop down from there fine.

That's good to know :)

I only have three criticisms:

 

1. There's a new unnatural position you can get them into:

post-40-1173427429_thumb.jpg

This might be fixable by putting a little less contact friction (the third friction number in the vector) on the lower leg bodies, so that they can slide out from under them in this position.

[EDIT: I just realised that it looks kind've like there's an object at their feet in this picture. That's an optical illusion, it's just the first person bow.]

Lowered friction in the legs & changed the limit angles as well as widened the limit degree.
2. With the arms jointed as they are now, it's going to be very hard to drag them by their legs thru a narrow doorway:

post-40-1173427575_thumb.jpg

In this image, the arm kept getting caught on the corner and wouldn't bend up any more than that. This may be more realistic than before, I'm not sure. However, I would think a real person's arm in that situation would be able to bend more "up" (toward their head) at the shoulder, and you'd be able to drag them thru when their arm bent all the way up such that their upper arm was almost parallel to their neck. However, this would clip the arms into the pauldrons in this case, so maybe that's why they're constrained not to bend that far.

I changed these so they go above the head now with widened & change angular limits.

 

3. Falling when KO'd looks less natural now. Maybe that's because the whole system is more stable now that the arms aren't flopping every which way, so we get less random variation in falls. It looks virtually the same every time: unless they are running forward, they will fall backwards with a stiff, slow kind of "timber!" motion. Running forward is the only way they can fall forward.

 

Again the behavior we saw before could have been an accident due to an unstable AF. It's probably better to have it stable like this, and then on starting the KO'd state in the script, we can apply a random little push to them in the script (I wrote a scriptfunction for ropes that applies an impulse to a specified AF body). Or, we could try different death animations that start them out falling forward or back, but a random push might allow for more variation IMO.

I haven't thoroughly tested this yet but I knocked out all of the AI in test_walk_ik & most of them fell forward if I remember right.

 

Anyway, it's getting better. I know AF stuff is all cross-coupled so fixing one problem can introduce some others. I appreciate your patience working with it. :)

Yeah, the jumpiness is related to the code that restricts you from picking the AI up off the ground. I'm intending to make that toggle-able via cvar "cheat" so that mappers trying to get AFs in particular positions can pick them up off the ground with the normal frobbing methods. As you say, this can be temporarily disabled for now by commenting out that list of "grounding" joints in tdm_ai_humanoid_base.

That's how I tested the last revision is to give those values a "0".
Link to comment
Share on other sites

  • 2 weeks later...

I was comparing the new AF to the old one again, and it seems to me like the joints are unrealistically stiff in the current one. For example, when an AI falls over, it looks very stiff, not like a real limp person would fall. It looks like they need some WD40.

 

Is it possible to dial down the joint friction on all the joints, or would that lead to other instabilities?

 

Also, the legs maybe don't need to be able to spread out that wide (some AI are doing the splits when they fall :) ).

 

Finally, are we planning to rig the pauldrons so that they move with the upper arms? Right now the upper arms just clip through the pauldrons when they bend up above the AI's head.

 

Other than that, I'd say it's perfect.

Link to comment
Share on other sites

I was comparing the new AF to the old one again, and it seems to me like the joints are unrealistically stiff in the current one. For example, when an AI falls over, it looks very stiff, not like a real limp person would fall. It looks like they need some WD40.

 

Is it possible to dial down the joint friction on all the joints, or would that lead to other instabilities?

I'll see if they can be toned down.

 

Also, the legs maybe don't need to be able to spread out that wide (some AI are doing the splits when they fall :) ).
We don't want splits? ;) That's easily fixed.

 

Finally, are we planning to rig the pauldrons so that they move with the upper arms? Right now the upper arms just clip through the pauldrons when they bend up above the AI's head.

 

Other than that, I'd say it's perfect.

Pauldrons, paudrons, pauldrons. <_< I hate those things. I was thinking about going 50/50 weighting with leftpad/rightpad and LeftArm/RightArm. Maybe that'll fix 'em but I won't know 'til I try.
Link to comment
Share on other sites

I'll see if they can be toned down.

If it can't be done without introducing instability, I think I remember seeing that you can speed up the ragdoll for the first few seconds after death. Maybe this is why they added that feature, or maybe it was intended to slow it down, I don't know.

 

We don't want splits? ;) That's easily fixed.

Oh, I have no problem believing that all of our guards are trained ballerinas, but if doing the splits in jeans is hard, imagine how hard it would be in chain mail. :) As long as the noblewoman can still do the splits...

Link to comment
Share on other sites

I think I remember seeing that you can speed up the ragdoll for the first few seconds after death. Maybe this is why they added that feature, or maybe it was intended to slow it down, I don't know.

 

Right now (or last I checked anyway) the ragdolls are set to slowmo for the first few microseconds. Sometimes it looks good, but I've had a few instances where it's looked a little like slapstick (a guard hit with an arrow sloooowly tipping back onto his heels and then collapsing like a board).

Link to comment
Share on other sites

Right now (or last I checked anyway) the ragdolls are set to slowmo for the first few microseconds. Sometimes it looks good, but I've had a few instances where it's looked a little like slapstick (a guard hit with an arrow sloooowly tipping back onto his heels and then collapsing like a board).

 

:laugh: That just gave me the best visual image.

Link to comment
Share on other sites

and decreased the overall (not the specific joints) friction in the AFs.

IMO it's the friction in the joints that needs reducing. I wouldn't reduce the contact friction or the air friction of the bodies, that seems fine. Also, the individual friction settings on the bodies end up overriding the overall friction setting if they are set, I think.

 

I haven't looked at the changes yet though, so I'll at least give it a try with the current settings, but I'm pretty sure it's the constraint frictions that need to go down, because their legs aren't buckling fast enough and their arms bend sluggishly when they go down. It looks more like stiff joints than problems with ground/air friction. Maybe that will make their feet slip out from under them a bit faster, but that's about it.

Link to comment
Share on other sites

Ack, I think we need to go back to the commented values or previous revision. The decreased contact friction means you can slide them across the floor like a greased Scotsman. It gives the impression that the weigh nothing, and you can also kill them by shaking them back and forth to death. :)

Link to comment
Share on other sites

  • 2 weeks later...

Btw, I think the AF's air friction is set way too high right now. If you turn on the free dragging cheat (tdm_af_drag_free 1 in console), and drop them, you can see they fall thru the air like molasses. I'm sure this is effecting the believability of how they fall as well, so reducing this air friction should help.

Link to comment
Share on other sites

IMO it's the friction in the joints that needs reducing. I wouldn't reduce the contact friction or the air friction of the bodies, that seems fine. Also, the individual friction settings on the bodies end up overriding the overall friction setting if they are set, I think.

 

I haven't looked at the changes yet though, so I'll at least give it a try with the current settings, but I'm pretty sure it's the constraint frictions that need to go down, because their legs aren't buckling fast enough and their arms bend sluggishly when they go down. It looks more like stiff joints than problems with ground/air friction. Maybe that will make their feet slip out from under them a bit faster, but that's about it.

First of all, let's get our terminology straightened out:

Air friction? There's Linear, Angular, Contact, and Constraint.

 

According to the editor:

Linear - translational friction

Angular - rotational friction

Contact - friction with contact surfaces

Constraint - well duh :wacko: constraint friction. What kinda helpful hint is that anyway? It's like mousing over a button that says "Help" and a hint popup that says "Help" :huh: Taking lessons from Microsoft, id?

 

Ack, I think we need to go back to the commented values or previous revision. The decreased contact friction means you can slide them across the floor like a greased Scotsman. It gives the impression that the weigh nothing, and you can also kill them by shaking them back and forth to death. :)
Greased Scotsman? Watching too much Simpsons or something?

 

Btw, I think the AF's air friction is set way too high right now. If you turn on the free dragging cheat (tdm_af_drag_free 1 in console), and drop them, you can see they fall thru the air like molasses. I'm sure this is effecting the believability of how they fall as well, so reducing this air friction should help.
So I'm assuming "air friction" is the linear or angular frictions.

 

I just tried a few things & it's just too damn frustrating. If you want to try anything look through the af file & edit the friction lines:

articulatedFigure guard_base {

settings {
model "tdm_ai_citywatch"
skin ""
friction 0.0799999982, 0.0799999982, 0.8000000119, 0.3000000119
suspendSpeed 20, 30, 40, 60
noMoveTime 1
noMoveTranslation 10
noMoveRotation 10
minMoveTime -1
maxMoveTime 15
totalMass -1
contents corpse
clipMask solid, corpse
selfCollision 1
}

body "waist" {
joint "origin"
mod orientation
model octahedron( ( -5, -6, -4.5 ), ( 5, 6, 4.5 ) )
origin bonecenter( "Hips", "Spine1" )
density 0.400000006
friction 0.0099999998, 0.0099999998, 0.8000000119
contents corpse
clipMask solid, corpse
selfCollision 1
containedJoints "*origin  -*spine1 -*leftupleg  -*rightupleg"
}

. . .

The values are in the order I just posted:

  • Linear
  • Angular
  • Contact
  • Constraint (only in the main settings)

Link to comment
Share on other sites

Yeah, linear and angular both apply to friction in the air, so those are the ones that are too high now. Contact is contact friction that applies when you're say dragging them along the ground.

 

I can try tweaking the linear and angular friction lower. Why is it frustrating though? Does it make the joint behavior unstable if you lower those?

Link to comment
Share on other sites

Yeah, linear and angular both apply to friction in the air, so those are the ones that are too high now. Contact is contact friction that applies when you're say dragging them along the ground.

 

I can try tweaking the linear and angular friction lower. Why is it frustrating though? Does it make the joint behavior unstable if you lower those?

It's a balancing act with way too many variables, nudge one thing & it knocks the rest out of balance. I'll take another stab at it though <_<
Link to comment
Share on other sites

And in the meantime, it's good for a laugh. ;)

 

(This looks like an 'in action' screenshot, but it isn't...these guys were hit by a gas arrow and actually stopped in these poses.) :)

post-9-1175959679_thumb.jpg

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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • 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
       
      · 7 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
×
×
  • Create New...