07-03-2018, 11:11 AM
(This post was last modified: 07-03-2018, 11:11 AM by josemendez.)
(06-03-2018, 12:32 AM)Nikowill Wrote: Hello,
I'm trying to use the OBI to simulate the artery and aneurysm, and facing a problem that really hard to solve, hope if anyone can help me out.
What I'm trying to do is aneurysm clipping, use the clip on the aneurysm and it will deform when I clip it, the old way I'm doing it by direct moving the vertex in vertex shader, which works but not realistic enough. So I bought OBI cloth and trying to use physic to simulate this. The picture below shows how old way works.
Here is the problems I encountered:
1) when I set up a obi version soft body, its too soft I have to increase iteration and add a bunch of constrains to make it looks real, which kills the performance. I'm using a 400 vertex mesh as particle base and use a 1300 vertex mesh as proxy. Is there any solution which can find a balance between visual and performance?
2) when I add some obi collider on the clip is not working, my clip is moved by Unity physic, and I have a hierarchy of rigidbody and fixed joint on it to work with clipholder. Any idea how to set up the obi collider to work with unity physic joint and rigidbody?
3) I'm trying to use two obi colliders(move by transform) to squeeze this soft body, it works when the collider is big enough, if the collider is the same size of the clip(which is small) soft body just go through the collider when I try to clip it. Any idea how to improve the collision detection with small colliders?
4) When I trying to make the soft body more rigid and looks real when I touch it, it seems hard to deform as I expected. When I trying to make it deform realistic, I have to make it very soft, which looks too soft when I touch it. It seems have a paradox between these two situations. Any idea how to solve this?
It will be great appreciated if anyone can help me solve this out!
HI Niko,
The images you posted are not visible, but I'll try my best to help:
1) Obi is intended to simulate balloons (air filled closed cloth pieces), not actual soft bodies. Most soft bodies are not hollow (a rubber ball, for instance) and are generally best implemented trough shape matching or volumetric (tetrahedral) meshes. If you want a really stiff softbody using Obi, your best bet is to decrease the physics timestep. However keep in mind that using cloth to simulate arteries (which have rubbery consistence) is not a very good option.
2) Make sure you have set up collisions (specially when it comes to layers and phases) correctly: http://obi.virtualmethodstudio.com/tutor...sions.html
3) Obi is a particle based simulator. That means each mesh vertex has a particle attached to it, and they're used for collision detection as well as mass discretization. Chances are your particles are too small and leave gaps trough which small colliders can slip. You can debug the particle representation of your mesh by adding a ObiParticleRenderer component to it:
http://obi.virtualmethodstudio.com/tutor...ering.html. In case you need to increase the particle's radii, you can do so using the particle editor:
http://obi.virtualmethodstudio.com/tutor...iting.html
4) Play with the mass ratio. If you increase the cloth particle's mass, it will be more difficult to move them around if the object touching them has lower mass. This is completely independent of the material rigidity.