Here are two images I captured to show the problem:
Picture 1: softbody tube and softbody rabbit
Picture 2: rigidbody tube and softbody rabbit
I am looking for help to solve the leakage problem, and your insights are sincerely appreciated! Source code is attached for your reference. In order to select different types of tube meshes for testing (softbody mesh vs. GImplact rigidbody mesh vs. solid object etc), you need to adjust the following code:
Code: Select all
static void Init_RabbitTube(SoftDemo* pdemo)
{
//Step 1: model ground with rigid body
init_ground_rigid(pdemo);
//Step 2: model rabbit
float rabbitMass = 10;
btVector3 rabbitPosition(0,0,0);
float rabbitScale = 4; //When data is loaded, the rabbit's height is about 1.
init_rabbit_soft(pdemo, rabbitMass, rabbitPosition, rabbitScale);
float tubeMass = 10;
btVector3 tubePosition(0,0,0);
float tubeScale = 1.0; //When data is loaded, the tube's length is 10 and radius is 5.
//////////////////////////////////
//Step 3: Choose one of the functions below to model tube.
//Option 1: Solid tube
//init_tube_solid(pdemo, tubeMass, tubePosition, tubeScale);
//Option 2: Soft tube
init_tube_soft(pdemo, tubeMass, tubePosition, tubeScale);
//Option 3: Bvh mesh rigid tube
//init_tube_rigid_BvhMesh(pdemo, tubeMass, tubePosition, tubeScale);
//Option 4: GImpact rigid mesh
//init_tube_rigid_GImpactMesh(pdemo, tubeMass, tubePosition, tubeScale);
}
lakeeast