Rigid bodies inside soft bodies
Posted: Wed Nov 17, 2010 6:50 pm
Hello,
I am unsure if this is possible using Bullet, however I am trying to produce a simple simulation whereby some rigid bodies (spheres) are "trapped" inside a soft body.
The closest analogy for this I can think of is a balloon filled with ball bearings.
I have studied the softbody demo in great detail and managed to get to the point where I have a SB ellipsoid (generated using the helper), which nicely deforms and rebounds a rigid body if it hits it on the outside, but any rigid body which initially starts within its bounds (but not contacting) and is then made to contact the outer edge, simply passes through. There appears to be some collision response as the internal RB's trajectory appears affected, and the SB deforms, but given the same SB will repel even a very fast moving sphere of the same size as the one inside it that just passed through, I'm a little stumped.
I did think that perhaps it could be to do with the normals for the ellipsoids nodes facing outwards (as you would reasonably expect) and this caused the collision impulses to either be generated in the wrong direction or not at all, however after creation I tried inverting the soft bodies normals manually (by modifying its m_n array). To my surprise, not only did this not fix the problem, but it didn't actually seem to effect the external spheres impact response. So perhaps I am misunderstanding something (extremely likely!)
I have messed around with all the setup material parameters etc., and while I can alter how the SB deforms when the external RB hits it, the internal RB still just passes through, I have also ensured clustering etc. is enabled and have upped the helpers resolution all the way to 10000 (massive overkill just to see) with no results.
Any help anyone can provide would be very much appreciated.
I am unsure if this is possible using Bullet, however I am trying to produce a simple simulation whereby some rigid bodies (spheres) are "trapped" inside a soft body.
The closest analogy for this I can think of is a balloon filled with ball bearings.
I have studied the softbody demo in great detail and managed to get to the point where I have a SB ellipsoid (generated using the helper), which nicely deforms and rebounds a rigid body if it hits it on the outside, but any rigid body which initially starts within its bounds (but not contacting) and is then made to contact the outer edge, simply passes through. There appears to be some collision response as the internal RB's trajectory appears affected, and the SB deforms, but given the same SB will repel even a very fast moving sphere of the same size as the one inside it that just passed through, I'm a little stumped.
I did think that perhaps it could be to do with the normals for the ellipsoids nodes facing outwards (as you would reasonably expect) and this caused the collision impulses to either be generated in the wrong direction or not at all, however after creation I tried inverting the soft bodies normals manually (by modifying its m_n array). To my surprise, not only did this not fix the problem, but it didn't actually seem to effect the external spheres impact response. So perhaps I am misunderstanding something (extremely likely!)
I have messed around with all the setup material parameters etc., and while I can alter how the SB deforms when the external RB hits it, the internal RB still just passes through, I have also ensured clustering etc. is enabled and have upped the helpers resolution all the way to 10000 (massive overkill just to see) with no results.
Any help anyone can provide would be very much appreciated.