Jump to content
The Dark Mod Forums

Recommended Posts

Posted

For our purposes, the head is the reference point for the FOV cone and the "mouth position" for drowning.

 

I guess I could change the behavior of the D3 function so that it doesn't crash but returns some invalid number (-1), and change the code to take body 0 as the default if that "find AF body for name" function returns -1, but changing the D3 physics function might effect behavior elsewhere.

  • Replies 82
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted

Hmm, it's just called "head" so I'm not sure how that would be causing problems.

 

One thing that's confusing me is that the following line:

 

"ragdoll" "monster_spider"

 

seems to suggest there should be a file called monster_spider.md5mesh for the ragdoll, right? But there is no such file in the spider folder. Commenting out that line doesn't seem to do anything, so I have no idea if it is significant.

 

I tried adding:

"head_bodyname" "body"

 

to the entityDef, but that didn't work either--just got the error that:

ERROR: GetBodyId: no body with the name 'body' is not part of the articulated figure.

Posted

Hmm, yeah I do see 'head' in that hierarchy.

 

It could be that the way this is set up now, it requires an AF in order for that to work. Do we have any other AI without ragdolls that work? Fire elemental?

 

I didn't think so, because I thought this was just the articulated figure controller that any animated AI needs.

Posted

Okay, the spider does have an AF file, but it has no "head" body in there. It has "waist" "legs1" "legs2" and "waist" again (didn't know they could have the same name...).

 

I'd try changing it to "waist". When I wrote this, I wanted AI to be able to drown when unconscious, so I guess I was checking things in the ragdoll file. Some things have no ragdoll though, so I'm not sure why they wouldn't get this error. I don't quite understand how the ragdoll and the articulated figure used for animation interact.

Posted

Just to confirm that this is the body name of the head in the AF file. It is meant for calculating where the mouth is for the purposes of drowning while unconscious, and maybe for other things later. I added a fix that this will not be checked if the AI has no ragdoll.

 

If the AI does have a ragdoll though, this must be set to a valid body name in the AF file for that AI. (Those are in the darkmod/afs directory).

 

I tried setting it to 'waist' for the spider, and put the spider ingame. Its physics are quite screwed up. I can't hit it with any sort of weapon, they all go right through, I can only radius damage it with the fire arrow. I think the materials are set up to be nonsolid or something.

 

The bounding box is too tall, that's easy to fix, but the ragdoll is crazy. It seems that one of the bodies has a constraint binding it to the origin of the world, so whenever you kill a spider, it will fly to 0,0,0 in world coordinates, but the collision models for some parts of the AF stay behind. As far as physics is concerned, the AF has fallen apart and part of it flew to the origin. This is kind've amusing if you kill several spiders, you get a mass of spiders at 0,0,0. :)

Posted

I checked and yes, the trites have a ragdoll. It would be under /base/af/monster_demon_trite. Maybe we can adapt it for spiders?

 

The only problem with them not having a ragdoll is that I'm not sure even rigid body physics keeps going after they die if they don't have one. So if they died on a ledge, they would just hang out into space looking pretty crappy. The ragdoll isn't that hard to do in principle, it's just some text, and there is an ingame editor for them, we just have to figure out how to do them. :)

Posted

Ok, I got the spider in game too, but it has some big problems. Here's a comparison shot, with the static mesh on the left and the animated version on the right. Clearly the normalmap is not being used by the animated version, and the head is below the legs?? Not sure what's causing either of those problems.

 

spiders.jpg

Posted

Ah, progress. I've got the spider showing up properly, and it now is affected by arrows. Still flies away when it dies though. We need to engage the death animation somehow.

Posted
A spider doesn't need a "ragdoll" as such, it just needs a rigid corpse. The legs should be drawn up under the body, but otherwise it can be treated as a moveable sphere.

I'm not sure how D3 handles rigid corpses of AI. AFAIK, the only AI in vanilla D3 that didn't have a ragdoll was the Lost Soul, and it switched to a death model that was a particle effect explosion, not a rigid body model. I'm not sure what happens when they switch to a death model with a collisionmodel. It might just hang in the air, or it might keep using physics_monster which is an axis aligned box that can't rotate. Neither of these things would work too well if it died near a ledge.

 

What you want is for it to switch to a moveable and start using physics_rigidbody, but I don't know if that can be done without extra SDK modification. To do what you want without a lot of work, you may still have to make a simple "ragdoll" that's just one simple AF body that encompasses the whole model.

 

@Spring: The reason it's flying away upon death is in the AF file. One of the ragdoll constraints is binding it to 0,0,0 in world coordinates. A death animation won't matter if it later switches to the ragdoll, because the ragdoll always flies away like that. I'm not sure what the best way to fix that AF file is, the whole thing looks incomplete. Someone on the team eventually needs to learn how to use the AF editor. I'm interested but don't really have time right now. I think Odd has some experience with it.

Posted

Huh?? :huh:

 

I haven't made any changes to the spider's def file, but now I'm getting the same bodyId error, with a message that there's no "chest" joint. But I haven't mentioned "chest" anywhere. It's still set to "waist", just like it was a few hours ago when it worked fine. :huh:

Posted

Did anyone make any changes to anything that might have affected the spider's ragdoll in the last twenty-four hours?

 

Yesterday morning I was able to get them into a map by changing the "head_bodyname" to "waist". I may have synced after that, I can't remember. But by the evening, I was getting the bodyID error again: "GetBodyId: no body with the name 'chest' is not part of articulated figure" and maps with spiders were crashing. There is nothing different in the spider's Def file; it is still set for "waist". I have no idea where the "chest" is coming from. The only change I made locally was to the size of the AAS box, but that shouldn't have had anything to do with it.

Posted
Did anyone make any changes to anything that might have affected the spider's ragdoll in the last twenty-four hours?

 

You should see that when you check out and you can check the log. That's what it is for. And if you would provide a valid email address you also would get the email notfications. ;)

Gerhard

Posted

Seeing the log just tells me what files were modified but doesn't tell me what was done to them.

 

And since when did I not give a valid email address? I used to get notifications fine under CVS.

Posted

I was working under the assumption that the spiders wouldn't have any ragdoll, which is why I did a death animation.

It's not really necessary for them. It's not as if you're going to be hiding their corpses or anything.

Did the spider-like things in doom have a ragdoll? IF so you can look at that and use it as a base for the spider ragdoll.

I did do a tutorial for setting up ragdolls on custom characters, it's on the wiki I believe, but that was for humanoids, I'm not sure how much more difficult it might be for a spider.

Civillisation will not attain perfection until the last stone, from the last church, falls on the last priest.

- Emil Zola

 

character models site

Posted
Seeing the log just tells me what files were modified but doesn't tell me what was done to them.

 

Well, that, of course is because "some" people don't put appropriate comments in the log. Do I hear a "Guilty of charge" now from you? ;)

 

And since when did I not give a valid email address? I used to get notifications fine under CVS.

 

Hmmm. Strange. I removed your address from the notifaction, because I got tired of all the "Returned from mailer demon" error mails. Not only from you, but from a number of people.

Gerhard

Posted

Okay, a rough af for the spider is on svn. This guy needs some fixing up because the idle animation is pointing to the wrong animation . . . I think. I'll take a closer look tonight.

 

BTW, AFs have some standard naming conventions I guess. They need chest, waist, head, ruparm, luparm, lupleg, and rupleg in order for them to work.

Posted
Well, that, of course is because "some" people don't put appropriate comments in the log. Do I hear a "Guilty of charge" now from you?

 

Appropriate comments in what log? First I've heard of it.

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...