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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 1 reply
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...