Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bouncy Soft Body
#1
Is there a way to make soft body bounce from the floor? Similar to what can be achieved with Physic Material and Colliders in standard Unity's PhysX. Bounciness is missing from Obi Collusion Material. Thanks in advance for any reply or suggestion how it can be implemented.
Reply
#2
(23-06-2020, 07:17 PM)iliakot Wrote: Is there a way to make soft body bounce from the floor? Similar to what can be achieved with Physic Material and Colliders in standard Unity's PhysX. Bounciness is missing from Obi Collusion Material. Thanks in advance for any reply or suggestion how it can be implemented.

Hi,

The degree of bounciness of any object depends on its ability to store potential energy upon collision, and release it afterwards. When you drop a rubber ball to the floor, it compresses after touching the floor (storing potential energy), and then releases this energy by bouncing (de-compressing). A metal ball compresses a lot less, so it bounces less as it stores less energy. Though in games we approximate many objects as rigidbodies, in nature there are no pure rigidbodies: all materials can deform under enough stress, so in real life, everything's a softbody.

Obi Softbodies will bounce off the floor depending on how elastic they are, just like in real life. So there's no explicit "bounciness" in the collision material, as it's a kinda hackish way to allow rigidbodies (which can't compress) to bounce. Cloth, ropes, and fluids do not bounce either, so we saw no need for a bounciness parameter.

You can adjust your simulation parameters to make it a bit more "springy" (cranking up the amount of substeps / shape matching iterations is usually a good idea). Let me know you exact use case though, as if we see a real need for a restitution coefficient (actual name for bounciness) we might add it in the future.
Reply
#3
Hi!
In this test - https://www.dropbox.com/s/b0vv7uoq20kcdq...s.mov?dl=0 - bottle is an Obi Softbody and the bouncy cube is just PhysX Rigidbody + bouncy materials on the floor colliders. So, I like how the softbody wobbles and how the cube bounces, the goal is to combine these two behaviours somehow. Since it's game development probably some sort of faking would also work, but after couple of quick tests it looks like there is no trivial way to do so (will be happy to be wrong here - any suggestions are very welcome).
Reply
#4
(07-07-2020, 05:23 PM)iliakot Wrote: Hi!
In this test - https://www.dropbox.com/s/b0vv7uoq20kcdq...s.mov?dl=0 - bottle is an Obi Softbody and the bouncy cube is just PhysX Rigidbody + bouncy materials on the floor colliders. So, I like how the softbody wobbles and how the cube bounces, the goal is to combine these two behaviours somehow. Since it's game development probably some sort of faking would also work, but after couple of quick tests it looks like there is no trivial way to do so (will be happy to be wrong here - any suggestions are very welcome).

Hi there!

I see, unfortunately there's not an easy way to add extra bouncing to a softbody. The closest you can get is:

- Subscribe to the solver's OnCollision event.
- Iterate over all contacts in the frame.
- For each "bouncy "contact, and get its normal impulse magnitude/direction and apply an extra percentage of this impulse as a velocity delta to the involved particle.

This is of course a hack: won't work correctly for collisions against rigidbodies (since only the particle is affected by restitution), and does not work properly with collision materials.
Reply