I have spend the past few days trying to solve my issue, but I could not find a solution. Our production deadline is end of December, therefore I need to find a solution before Christmas - in other words I am quite in a rush
Basically, what I am trying to achieve is to have a kinematic rigid body (convex decomposition shape) colliding with a soft body patch. The rigid body will move forward, and will stop some time after it has collided with the soft body (let's say the final distance will be about 3x or 4x the aircraft length).
On each side of the patch, there is a static stick (capsule shape), and each vertex on the left and right side of the patch are anchored to their respective stick.
The behavior I want is that the patch should extend until the aircraft stops...
However, what happens is that the soft body doesn't extend enough, and the aircraft pierces into the patch:
I have tried all I could: clusters/no clusters (no cluster seems to behave better), with or without bending constraints generation, increasing all iteration types, stiffness coefficients, etc...
Bellow are the settings that I currently use (I wrapped bullet to abstract it, so variable names are a bit different, but my wrapper has the same properties and the same default values as the Bullet ones):
Code: Select all
// create physic object
imPhysicControllerSoftBody* pSoftBodyCtrl = new imPhysicControllerSoftBody(imCOLLISIONGROUP_WORLD, imCOLLISIONGROUP_ENTITIES);
pSoftBodyCtrl->SetMass(100.0f);
// mass of 1.0 for each node
pSoftBodyCtrl->SetNodesMass(arrNodesMass);
// this will call btSoftBody::setPose() or not
pSoftBodyCtrl->GetProperties().m_bPoseMatching = imFALSE;
// this will call btSoftBody::generateBendingConstraints()
pSoftBodyCtrl->GetProperties().m_bGenerateBendingConstraints = imTRUE;
pSoftBodyCtrl->GetProperties().m_iBendingConstraintDistance = 2;
// Positions solver iterations
pSoftBodyCtrl->GetProperties().m_ipiterations = 12;
// Cluster solver iterations
pSoftBodyCtrl->GetProperties().m_iciterations = 12;
// Anchors hardness [0,1]
pSoftBodyCtrl->GetProperties().m_fkAHR = 0.7f;
pSoftBodyCtrl->GetProperties().m_bRandomizeConstraints = imTRUE;
// this will call btSoftBody::generateClusters() or not
pSoftBodyCtrl->GetProperties().m_bGenerateClusters = imFALSE;
pSoftBodyCtrl->GetProperties().m_nClusterCount = 0;//64;
// material used for standard links
pSoftBodyCtrl->GetProperties().m_fMaterialkLST = 0.4f;
pSoftBodyCtrl->GetProperties().m_fMaterialkAST = 0.4f;
// material used for bending constraints generation
pSoftBodyCtrl->GetProperties().m_fBendingMaterialkLST = 0.4f;
pSoftBodyCtrl->GetProperties().m_fBendingMaterialkAST = 0.4f;
// Rigid contacts hardness [0,1] 1.0
pSoftBodyCtrl->GetProperties().m_fkCHR = 1.0f;
// Kinetic contacts hardness [0,1] 0.1
pSoftBodyCtrl->GetProperties().m_fkKHR = 0.1f;
// Soft contacts hardness [0,1] 1.0
pSoftBodyCtrl->GetProperties().m_fkSHR = 1.0f;
// Soft vs rigid hardness [0,1] (cluster only) 0.1
pSoftBodyCtrl->GetProperties().m_fkSRHR_CL = 0.1f;
// Soft vs kinetic hardness [0,1] (cluster only) 1.0
pSoftBodyCtrl->GetProperties().m_fkSKHR_CL= 1.0f;
Really, this is very important for us, so, any help would be really, really, welcome !!
Thanks,
Greg