Jump to content
The Dark Mod Forums

Does TDM support soft body physics?


killhour

Recommended Posts

If you want it to give the impression of it being pushed aside, there is no animation for this at present but a passable effect might be achieved.

 

Firstly, this is what I do to make soft curtains more realistic when you push past them at the side:

 

Create the banner and give it the property solid 0 so you can walk through it.

Create a common/tdm_nodrawsolid_cloth brush inside it of roughly the dimensions but make it slightly narrower (sideways) maybe 6 units (to taste.)

 

In an open space the player can brush past the above very close and slightly clip into it so it doesn't feel so 'hard'.

 

Now you want it to push aside?

 

Select the nodraw brush in grid view right click and create entity from the menu.

Select darkmod > movers > atdm:mover_door

Give it a name such as DoorBanner

Set rotate 0 0 0

Set translate 0 24 0 [where 24 is the width of the brush] You need to also try 24 0 0 or even use negatives -24 0 0 to get the correct direction.

set translate_speed 1 [or whatever speed you want]

Set snd_open nosound [or if you can find a whooshing curtain sound good luck with that!]

Set snd_close nosound

 

On the banner add:

bind DoorBanner

 

I think the above works if you walk up and frob it blind. If you want the banner to highlight then add to the banner:

 

frobable 1

frob_peer DoorBanner

 

Adjust the translate values how you want - you might prefer to make the brush *very* narrow just enough to block the player but only translate (move) a small amount so the player pushes (clips) through a lot of banner. (it is also possible to make the banner tilt slightly as well by converting it to a rotating door as well - so in combination with the sideways translation it might look more effective.)

 

If instead, you want it to trigger when you go near without highlighting then you might use a trigger_once brush and target the brush door. Depends exactly what effect you want.

 

Not tested above so apologies if I missed out anything. Post again if more help needed.

Link to comment
Share on other sites

It could be made like a ragdoll. Just use the same process you would to make an animated character, just put it directly in the ragdoll mode and use a differente skeleton, obviously.

 

Good idea. Does the skeleton have to be in a hierarchical format, or can I set it up like a grid?

Link to comment
Share on other sites

Good idea. Does the skeleton have to be in a hierarchical format, or can I set it up like a grid?

 

I'm not sure what you're asking but It's hard to imagine a bone structure that doesn't need a hierarchy.

 

Here, thanks to my insomnia, I've made a rough sketch of a possible solution:

post-119-125929935286_thumb.jpg

 

edit: I have no idea how to set up the ragdoll, but I belive it's in this stage that you 'tell' the bones not to make weird movements (overlaping, for example)

Edited by Diego
Link to comment
Share on other sites

I'm not sure what you're asking but It's hard to imagine a bone structure that doesn't need a hierarchy.

 

Here, thanks to my insomnia, I've made a rough sketch of a possible solution:

post-119-125929935286_thumb.jpg

 

edit: I have no idea how to set up the ragdoll, but I belive it's in this stage that you 'tell' the bones not to make weird movements (overlaping, for example)

 

Yeah, the only problem with that solution is that there's no way to stop two columns of bones from moving in totally opposite directions, stretching the model ridiculously.

 

That, and I'm not particularly proficient with any modeling programs.

 

I'd love to hear some input from whoever set up the ragdolls for the AI, if at all possible.

Link to comment
Share on other sites

You can make the skeleton like that and still put AF constraints between all the adjacent points. AF files are not hierarchical; they're just a collection of bodies and constraints. Each body is associated with one or more joints. There's a really good overview here: http://www.iddevnet.com/doom3/afs.php

 

So I guess what you'd do is have a bunch of AF bodies (one for each joint in your banner skeleton) and connect adjacent ones with spring joints. Then do a lot of parameter tweaking. :)

 

I'm not sure whether the player imparts a collision force onto AF bodies or not. I guess yes, but I don't remember seeing it happen on ropes. Maybe ropes are just heavy.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

Yeah, the only problem with that solution is that there's no way to stop two columns of bones from moving in totally opposite directions, stretching the model ridiculously.

That's what I meant when I said "I have no idea how to set up the ragdoll, but I belive it's in this stage that you 'tell' the bones not to make weird movements (overlaping, for example)" And Crispy kinda clarified that.

 

I wouldn't use one bone/body/dummy/thingie per vertex. Having an extra row of vertex between each row of bones/whatever, so to create a more smooth deformation, as it'll be influenced by more than one bone/etc.

Link to comment
Share on other sites

I wouldn't use one bone/body/dummy/thingie per vertex.

You seem to be confusing bones (more precisely called joints) with AF bodies. They are two different things. I'm advocating having one AF body per joint, not per vertex.

 

You could have more than one joint per AF body, but then the joints associated with each body (and hence the vertices which those joints influence) would be rigidly locked at a constant distance from each other. Which is not desirable for cloth.

 

Anyway, one vertex per joint would look fine. Cloth simulation is often done like this, since it gives optimum quality; the deformation stays smooth thanks to the spring forces pulling in all directions, and it means you can have very tight folds if the situation demands it.

 

If you have too many joints, however, it will be computationally expensive, so weighting multiple vertices to one joint is a sensible way to make it cheaper without sacrificing the degree of tesselation on your cloth mesh.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

I'm not sure whether the player imparts a collision force onto AF bodies or not. I guess yes, but I don't remember seeing it happen on ropes. Maybe ropes are just heavy.

 

Most ragdolls I can think of are flagged as corpses, so the player doesn't collide with them at all.

Link to comment
Share on other sites

There are a few "contents" types that you can use for ragdolls. The ones that I can think of off the top of my head are corpse, monster, water, playerclip, body, and moveableclip. You may want to try that last one for it to collide with essentially everything (including player, AI, moveables, and the static world.)

yay seuss crease touss dome in ouss nose tair

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

    • 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.
      · 5 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
    • 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
×
×
  • Create New...