Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Treating several soft bodies as a whole
#1
Bombilla 
Hello!

I'm struggling to figure this out, maybe you can help me.

I need a set of soft bodies to behave as a single entity, in terms of movements or how forces affect them, but each object should also have its own mesh and react to the environment following its individual rules.
For example, we can imagine these soft bodies being different links of a chain or, even better, cars of a train. Each one with its own shape and physical (soft body) properties, but conceptually linked, so if I pull from one end they all get affected, though not technically one big object (and not even really in touch for that matter).
See the beautiful diagram below for a graphical example.

Any ideas on how to approach this issue? I tried simple parenting structures and using fixed joints, but I don't think that's the way to go using Obi Softbody, or am I missing something here?

Thanks in advance! Let me know if you need more details, I don't want to overwhelm people with them at this point.

   
Reply
#2
(16-04-2021, 11:34 PM)Newbie Wrote: Hello!

I'm struggling to figure this out, maybe you can help me.

I need a set of soft bodies to behave as a single entity, in terms of movements or how forces affect them, but each object should also have its own mesh and react to the environment following its individual rules.
For example, we can imagine these soft bodies being different links of a chain or, even better, cars of a train. Each one with its own shape and physical (soft body) properties, but conceptually linked, so if I pull from one end they all get affected, though not technically one big object (and not even really in touch for that matter).
See the beautiful diagram below for a graphical example.

Any ideas on how to approach this issue? I tried simple parenting structures and using fixed joints, but I don't think that's the way to go using Obi Softbody, or am I missing something here?

Thanks in advance! Let me know if you need more details, I don't want to overwhelm people with them at this point.

Hi there!

I'll try to clarify a couple points first:

Quote:I tried simple parenting structures and using fixed joints, but I don't think that's the way to go using Obi Softbody, or am I missing something here?

Parenting simply stablished a hierarchical relationship between transforms, this doesn't work with physics (not with softbodies, but also not with rigidbodies). Using fixed joints works with rigidbodies, but Obi doesn't use rigidbodies (or Unity's physics engine at all) so it won't have any effect on softbodies.

Quote:I need a set of soft bodies to behave as a single entity, in terms of movements or how forces affect them, but each object should also have its own mesh and react to the environment following its individual rules.
For example, we can imagine these soft bodies being different links of a chain or, even better, cars of a train. Each one with its own shape and physical (soft body) properties, but conceptually linked, so if I pull from one end they all get affected, though not technically one big object (and not even really in touch for that matter).

To do what you want you first need to determine what it means by "multiple softbodies behaving like one", in terms of what relative degrees of freedom you want to limit and in what way. You mention "cars of a train", so I assume there's at least one rotational degree of freedom between them, right? like a hinge joint?

You could do this by writing a custom joint that limits relative motion of particles belonging to multiple softbodies, but this is far from trivial to do.

My advice would be to use particle attachments (http://obi.virtualmethodstudio.com/tutor...ments.html) to attach some particles in each softbody to a rigidbody, then use hinge joints or configurable joints to restrict the relative motion between these rigidbodies.
Reply