Obi Official Forum

Full Version: Softbody basics
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there!

Playing around with Obi softbody, trying to figure out how to get a proper behavior. Some help needed here.

1. I'm loading a BallPool scene, limiting its borders so that a ball is limited from all sides. 
2. Adding a cube with a default OBI collider, setting its scale to 0.2,1,0.2 so it looks like a vertical bar.
3. Trying to press a ball with the cube. The ball starts to deform and then after just a little pressure my bar simply gets into the centre of the ball.

[attachment=1848]

I don't want it behave like that at all, the ball should not let it pass inside at all but now it happens almost effordless. Tried numerous combinations of parameters, but could not find a solution. Please help me solve it.

Thanks in advance!
(18-08-2023, 12:14 PM)PlatonSk Wrote: [ -> ]Hi there!

Playing around with Obi softbody, trying to figure out how to get a proper behavior. Some help needed here.

1. I'm loading a BallPool scene, limiting its borders so that a ball is limited from all sides. 
2. Adding a cube with a default OBI collider, setting its scale to 0.2,1,0.2 so it looks like a vertical bar.
3. Trying to press a ball whe cube. The ball starts to deform and then after just a little pressure my bar simply gets into the centre of the ball.



I don't want it behave like that at all, the ball should not let it pass inside at all but now it happens almost effordless. Tried numerous combinations of parameters, but could not find a solution. Please help me solve it.

Thanks in advance!

Hi!

If you’re pushing the cube just by setting its transform position, the simulation will at some point break (in this case, allowing the softbody to be penetrated by the cube). The exact same thing would happen if using regular rigidbodies instead of softbodies, as setting transform properties directly completely disregards any physics simulation.

It’s possible to make the simulation more resilient to non-physical interaction by using more substeps, but at a performance cost. The manual contains an in-depth explanation of how iterations and substeps affect the results: http://obi.virtualmethodstudio.com/manua...gence.html

However, it’s best to include the cube in the physics simulation: make sure the bar is a rigidbody and is moved by applying forces to it. This way the softbodies will be able to push back and prevent the cube from moving when they’re under too much pressure and can’t be further squashed.

Kind regards,