Jump to content
The Dark Mod Forums

Ragdoll Props


Springheel

Recommended Posts

I've been doing some looking into ragdoll objects (swinging lights, hanging signs, etc). A lot of it is still over my head. For starters, how do you attach an md5mesh to world geometry? A light, for example...how do you make sure it stays connected to the ceiling when hit?

 

I found this in an AF file for a swinging sign, looks like it could be related...anyone know what it means?

 

fixed "wall" {
body1 "rod"
body2 "world"
}

Link to comment
Share on other sites

I've been doing some looking into ragdoll objects (swinging lights, hanging signs, etc). A lot of it is still over my head. For starters, how do you attach an md5mesh to world geometry? A light, for example...how do you make sure it stays connected to the ceiling when hit?

 

I found this in an AF file for a swinging sign, looks like it could be related...anyone know what it means?

 

fixed "wall" {
body1 "rod"
body2 "world"
}

 

from what I know of other engines, you typically have attachment point references that are ususally special data types or just "dummy bones" on a mesh and then you can attach them to other bone based meshes and then usually to some sort of static world entity.

I'm in yur forumz,

Makin' them frobbable.

Link to comment
Share on other sites

Heh, I've managed to get a ragdoll lantern working. I took one of the base D3 hanging lanterns and basically copied the weights and skeleton onto one of our own models. The size of the AF dimensions don't match exactly, so if you shoot the bottom of the lantern the arrow goes right through...I'll have to figure out the AF editor, which I've never used. Otherwise, it's pretty good. :)

 

I'll upload what I've got to SVN so you can try it out.

 

We'll have to decide whether we want to go this route for hanging objects or not, as there is definitely a small performance hit when it's in motion, and it also means the length of chain has to be set in advance.

 

Oh, there must be something wrong with the def file, however, since this is what it looks like in the editor (fine in game though):

 

af7.jpg

Link to comment
Share on other sites

I've been doing some looking into ragdoll objects (swinging lights, hanging signs, etc). A lot of it is still over my head. For starters, how do you attach an md5mesh to world geometry? A light, for example...how do you make sure it stays connected to the ceiling when hit?

 

I found this in an AF file for a swinging sign, looks like it could be related...anyone know what it means?

 

fixed "wall" {
   body1 "rod"
   body2 "world"
  }

 

Taken off of iddevnet :

 

4. Constraints

 

Several constraints can be used to connect the bodies of an articulated figures. A constraint is specified with a structure as follows: constraintType "name" {

key params

}

The constraintType is one of the following constraint types:

  • ballAndSocketJoint
  • universalJoint
  • hinge
  • spring

For each constraint two bodies are specified which are connected by the constraint. These bodies are specified with the body1 and body2 key. body1 "name"

body2 "name"

The body2 key may point to the special body called "world" and in this case the constraint will connect body1 to the world.

 

Other than the two connected bodies, each constraint has a number of settings specific to the constraint type as listed below.

 

Maybe the "fixed" constraint is just not documented on there, if you found it in use on an existing AF.

Link to comment
Share on other sites

Yeah, fixed constraint is like a bind. It's like you've taken a spike and nailed the two things together so that they can't move at all with respect to eachother.

 

With that in the AF, one joint will always be bound to the world. I think you can also use "bind" on an AF and it will bind dynamically to whatever entity you put in the "bind" spawnarg, and bind body #0 to that entity. This would be more useful since it doesn't restrict it to just the world, you could have a swinging lantern bound to a moving carraige, for example.

 

If you can't do that, we could easily add that in the code. I think I understand the constraint-adding code well enough to make a simple spawnarg that adds a fixed constraint to something on spawn. But I believe the bind spawnarg will already do that. If you want to bind a body in the AF other than body #0 to something, then I think we will need extra code. I have some old experimental code that lets you do that ingame if we decide that we need that.

Link to comment
Share on other sites

I'm finishing up a new head, but I'll come back to this. The swinging sign isn't working for me yet, so I'll have to do some tests.

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 Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 4 replies
×
×
  • Create New...