Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Softbodies clipping into each other
#1
Hi,

we currently evaluating if we can use this asset to approximate small bags of sand.
We have had some success but are currently running into the following issue:

When one of the softbodies shown below falls onto another, they "merge" together, practically getting pulled into each other.

[attachment=431]

Is this a problem with our setup and if so, how can we fix it?
Or is this simply not a supported use case?
Reply
#2
(15-10-2019, 05:22 PM)JanikH Wrote: Hi,

we currently evaluating if we can use this asset to approximate small bags of sand.
We have had some success but are currently running into the following issue:

When one of the softbodies shown below falls onto another, they "merge" together, practically getting pulled into each other.



Is this a problem with our setup and if so, how can we fix it?
Or is this simply not a supported use case?

Hi there,

Make sure their particles have different phase values. See:
http://obi.virtualmethodstudio.com/tutor...sions.html
Reply
#3
(15-10-2019, 05:27 PM)josemendez Wrote: Hi there,

Make sure their particles have different phase values. See:
http://obi.virtualmethodstudio.com/tutor...sions.html

Thank you very much for the quick response!
I did go through the docs, but must have missed that.
Reply
#4
(15-10-2019, 05:27 PM)josemendez Wrote: Hi there,

Make sure their particles have different phase values. See:
http://obi.virtualmethodstudio.com/tutor...sions.html

What about performance considerations? Should I have as few phases as possible?
And if I want to have a pile of trash bags, do I need to click on each one of them, open the particle inspector and change the phase for all particles, remember what phase was set last and check every time I have a new object, that I want to be able to collide, what the last set phase was?
I would like to know if there is a specific reason, why you can't just click on a checkmark that says = "assign individual phase" and everything just works automatically?
Reply
#5
(04-11-2019, 04:14 PM)HenryChinaski Wrote: What about performance considerations? Should I have as few phases as possible?
And if I want to have a pile of trash bags, do I need to click on each one of them, open the particle inspector and change the phase for all particles, remember what phase was set last and check every time I have a new object, that I want to be able to collide, what the last set phase was?
I would like to know if there is a specific reason, why you can't just click on a checkmark that says = "assign individual phase" and everything just works automatically?

Particles with different phases generate contacts when coming close to each other. These contacts then have to be solved -as any other constraint- and that has its associated cost. Particles with the same phase basically ignore each other. Note that the number of phases you use has no performance impact whatsoever. They're simply flags that determine when to generate contact constraints. The actual amount of contacts generated as a result is what determines performance.

So ideally you'd want to have everything in the same phase, and only assign different phases to these particles that need to collide with each other. Having each particle have a different phase by default would be very detrimental to performance, as every particle could potentially generate contacts with all other particles. As you can imagine this becomes very costly, very quickly.

Writing a system that automatically assigns each object its own phase is kinda trivial. Check out the ball pool sample scene, as it does exactly this. It keeps track of how many balls have been spawned, and assigns a different phase to each one.
Reply
#6
(04-11-2019, 05:33 PM)josemendez Wrote: Particles with different phases generate contacts when coming close to each other. These contacts then have to be solved -as any other constraint- and that has its associated cost. Particles with the same phase basically ignore each other. Note that the number of phases you use has no performance impact whatsoever. They're simply flags that determine when to generate contact constraints. The actual amount of contacts generated as a result is what determines performance.

So ideally you'd want to have everything in the same phase, and only assign different phases to these particles that need to collide with each other. Having each particle have a different phase by default would be very detrimental to performance, as every particle could potentially generate contacts with all other particles. As you can imagine this becomes very costly, very quickly.

Writing a system that automatically assigns each object its own phase is kinda trivial. Check out the ball pool sample scene, as it does exactly this. It keeps track of how many balls have been spawned, and assigns a different phase to each one.

Thanks for the hint with the ball example. Exactly what I was looking for. 
And thanks for the explanation!
Reply