Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Softbody Collision Issue
#1
Hi,

I'm having an issue with collisions on my softbody.  See my video:
https://www.youtube.com/watch?v=xQY2KtbF...e=youtu.be

Basically, I'm seeing collisions go inside each other and sometimes when they touch they slide too.

Any ideas on how to make them not do that?

Also, are you planning on making the solver at some point use the jobs system?

Thanks!
Jeff.
Reply
#2
(06-02-2020, 05:22 PM)webjeff Wrote: Hi,

I'm having an issue with collisions on my softbody.  See my video:
https://www.youtube.com/watch?v=xQY2KtbF...e=youtu.be

Basically, I'm seeing collisions go inside each other and sometimes when they touch they slide too.

Any ideas on how to make them not do that?

Thanks!
Jeff.

Your particle sampling seems quite sparse, there's lots of empty space between particles. This can cause soft bodies to become "interlocked" with each other, like jigsaw pieces. In this situation, particles become entangled with each other and simultaneously try to get out of collisions, while shape matching constraints put them in a colliding-state again.

This can cause the "sliding", as particles are trying to simultaneously reach two mutually exclusive states at once: be collision-free, and strive to keep the undeformed softbody shape. This will cause them to try to "escape" the situation by moving to whatever direction the last constraint tries to project them.

Simply make your particle size larger, or use more particles. It's usually also good to let them overlap a bit.

(06-02-2020, 05:22 PM)webjeff Wrote: Also, are you planning on making the solver at some point use the jobs system?
Yes we are, but not for performance reasons but for portability. Under the hood we use our own job system, coupled with extensive SIMD use. Performance wise we are on par with Jobs+Burst, often even faster. You can read a bit more here:
http://obi.virtualmethodstudio.com/forum...p?tid=1619
https://forum.unity.com/threads/schedule...st-5368893
Reply
#3
Ah!

Thank you for the help!  That did help!  I was able to get it working much much better.

Interesting about the job system.


@[b]josemendez[/b] Have you seen this before?
https://youtu.be/GTj5iufnM3E?t=117

Looks like they're using the same barrels -- not sure if their using obi.  Is it possible to get that performance out of your system?  I tried 50 barrels (they used 500) and tried to optimize that but still only got about 15fps -- I have a very beefy pc too.  Any thoughts on if this performance is possible with Obi?

That's why I was asking about the job system/burst -- if that would help.

Thanks again!!
Jeff.
Reply
#4
Those are the same barrels from the Obi Softbody example -  great for testing deformations.  Gran sonrisa


Our Soft-Mesh Dynamics is not using Obi (It is all custom, written entirely by Studio Tatsu).
Obi is using a true Softbody Physics solution, which does far more than just deformation and it is superior to our approach.

Soft-Mesh is only deformed on impact, allowing it to handle far more objects in a scene as well as allowing them to be stackable.

Obi Softbody physics handles the collisions, weight, and mass more accurately. (which requires much more CPU power)

With that being said comparing performance between the two isn't apples to apples. Soft-Mesh != Softbody Physics

In my honest opinion, Obi Softbody Physics is the fastest and best softbody physics solution available for Unity.
For better performance, Test with a build - not in the Unity Editor.

Soft-Mesh is an alternative for Softbody Physics, not a replacement. Many advantages and disadvantages.
Reply
#5
(09-02-2020, 06:59 PM)StudioTatsu Wrote: Those are the same barrels from the Obi Softbody example -  great for testing deformations.  Gran sonrisa


Our Soft-Mesh Dynamics is not using Obi (It is all custom, written entirely by Studio Tatsu).
Obi is using a true Softbody Physics solution, which does far more than just deformation and it is superior to our approach.

Soft-Mesh is only deformed on impact, allowing it to handle far more objects in a scene as well as allowing them to be stackable.

Obi Softbody physics handles the collisions, weight, and mass more accurately. (which requires much more CPU power)

With that being said comparing performance between the two isn't apples to apples. Soft-Mesh != Softbody Physics

In my honest opinion, Obi Softbody Physics is the fastest and best softbody physics solution available for Unity.
For better performance, Test with a build - not in the Unity Editor.

Soft-Mesh is an alternative for Softbody Physics, not a replacement. Many advantages and disadvantages.


Great looking results! Sonrisa

I'd assume that they're basically rigid bodies, and you move mesh vertices around on impact. That's good for denting and small deformations! Out of curiosity, are you using (and updating) MeshColliders? Also, are you updating the inertia tensor on deformation, to account for the new mass distribution?
Reply
#6
(10-02-2020, 08:48 AM)josemendez Wrote: Great looking results! Sonrisa

I'd assume that they're basically rigid bodies, and you move mesh vertices around on impact. That's good for denting and small deformations! Out of curiosity, are you using (and updating) MeshColliders? Also, are you updating the inertia tensor on deformation, to account for the new mass distribution?

Thanks and Yes, inertia tensor and sometimes the center of mass is updated when deformed (only after the deformation reaches a certain threshold) 
This is still an early work in progress, but so far I'm satisfied with the results. Still, a long way to go.
Reply