Jump to content

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

    • STiFU

      Anyone here played Inscryption? At first, I was like "no, I am not going to play a stupid card game", but this game is so much more than that. It is so meta, full of 4th wall breaks, and feels so damn spooky and weird because of it. Absolutely recommended, if you can stand the visuals. I recommend not reading up too much on it, as that could easily spoil half the incredible surprises. Just know that what you see in the beginning is by far not everything.
      · 2 replies
    • freyk

      Tried to make a tdm advertisement commentpost at one of civvie11 youtube videos about T2. Post got marked as spam. His problem (to not discover TDM for himself),..not my problem.
      But some help of some fellow TDM yt-videocomment posters would be nice. To ask him and others, to play TDM. To get more players/creators. 
      · 2 replies
    • datiswous

      Currently Profile Information has 3 fields, these are shown in forum posts under your avatar:
      1. Gender
      2. Location
      3. Interests
      I think that it could be useful to have an extra field called "Operating system" (under location). It can be useful for tech support and to see what people use.
      Alternatively it could be a more general term, like PC system, so that you can for example state that you use an AMD gpu.
      · 2 replies
    • OrbWeaver

      Greetings fellow kids.
      · 11 replies
    • Crafty_Creeper

      Keep on Creeping on...
       
      · 3 replies
×
×
  • Create New...