Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Softbodies clipping into each other
#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


Messages In This Thread
Softbodies clipping into each other - by JanikH - 15-10-2019, 05:22 PM
RE: Softbodies clipping into each other - by josemendez - 04-11-2019, 05:33 PM