Jump to content
The Dark Mod Forums

Does TDM support soft body physics?


killhour
 Share

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.

 Share

  • Recent Status Updates

    • duzenko

      Please, can we finally group the missions by year in the game menu?
      · 6 replies
    • duzenko

      I vaguely recall someone recently complained about two-sided materials (curtains?) not getting lighting from both sides
      I just found a piece of code that's supposed to do just that
      Where was that discussed? (@nbohr1more?)
      · 9 replies
    • Xolvix

      I still play classic Doom (albeit with user-made mods and maps rather than the original campaign) on a regular basis. A game from the early 90's which has still got a healthy following in 2022. Pretty amazing.
      · 3 replies
    • Nort

      I'm beginning to understand why people who aren't into social clubbing "don't last long" on this project, and why it's so full of holes. When moderators are siding with bullies, by closing down threads that they derail, then I start to wonder if I should support the platform to begin with.
      I'm sure that the core development is solid, but when you're constantly tone policed and bullied, and moderators are playing into it too, then the project will just drive away talent, and replace it with socialites instead. ...and without talent, you only end up with a small skeleton crew trying to do everything themselves.
      ...so Dragofer and Airship Ballet, and all you other socialites, you win. From now on I'll just keep to myself. You'll never be able to do my work, but at least you'll be happy together, and that's what matters to you.
       
      Update
      Actually, I have to revise my statement:
      I actually messaged greebo - the top dog, I gather - about nbohr1more's outburst of insanity below, and since I haven't even heard back from him, I just have to assume that there's not a single core programmer here, who's not backing nbohr's threats. ...and that's bad.
      ...so if you're a newbie reading this, or an honest soul like ZergRush, then just slowly back out of these forums, run, and don't look back. This is nothing more than a cult posing as a game development project, using Thief and IDTech4 to sucker hopefuls in, to do work for them, while trying to cajole them into something going on behind the scenes, which apparently - according to nbohr - is something that should be hidden from the state. These people aren't programmers - they don't even understand things like how to fix the simplest bugs. All they have, is an engine, and an IP, and some sort of fascist social cult. There was some other project I saw being made in the Unreal Engine. Try joining that project. ...or start a project of your own. Anything but this asylum.
      Hopefully that was "divisive" enough for a final post, because at this point I really want people to leave this place. This project is, on a management level, just awful garbage, run by garbage people, apparently from the top down, and I'm just glad that they have a garbage place to stay, together, and hopefully forever.
      Nort
      · 14 replies
    • The Black Arrow  »  Araneidae

      A spidey! I love spideys 🕷️
      · 0 replies
×
×
  • Create New...