Configuring the Soft Body Parameters

Ludobaka
Posts: 2
Joined: Fri Jun 28, 2013 9:11 am

Configuring the Soft Body Parameters

Post by Ludobaka »

Hello,

I'm sorry if the answer of my question is already on the forum but i didn't find it.

I'm using Bullet Library to deform a volume mesh of a hollow cylinder. By moving points of the front of the cylinder and blocking points of the back, I expect to deform my volume mesh and have a constant volume.

I used Tetgen to generate my volume mesh but I use a custom output mesh file.

When importing this data, i set in Bullet vertices positions, tetrahedrons, links and faces as on the CreateFromTetgenData of btSoftBodyHelpers. I'm able to configure the linear stiffness coefficient of my Material but when I try to configure angular stiffness and volume stifness, these parameters don't have any impact on my volume variation. Additionnaly, it seems that the angular stiffness (m_kAST) and the volume stiffness (m_kVST) are note used on softBody.

So what did I missed? Thank you in advance for the answer.

Below the configuring lines of my softBody and softWorld :

btVector3 worldAabbMin(-1000,-1000,-1000);
btVector3 worldAabbMax(1000,1000,1000);

const int maxProxies = 32766;
/*btBroadphaseInterface* */broadphaseSoft = new btAxisSweep3(worldAabbMin,worldAabbMax,maxProxies);

/*btSequentialImpulseConstraintSolver**/ solverSoft = new btSequentialImpulseConstraintSolver();

/*btDefaultCollisionConfiguration* */collisionConfigurationSoft = new btDefaultCollisionConfiguration();
/*btCollisionDispatcher* */dispatcherSoft = new btCollisionDispatcher(collisionConfigurationSoft);

/*btSoftRigidDynamicsWorld**/ softWorld = new btSoftRigidDynamicsWorld(dispatcherSoft, broadphaseSoft, solverSoft, collisionConfigurationSoft);

softWorld->setGravity(btVector3(0,0,0));

softBodyWorldInfo.air_density = (btScalar)1.2;
softBodyWorldInfo.water_density = 0;
softBodyWorldInfo.water_offset = 0;
softBodyWorldInfo.water_normal = btVector3(0,0,0);
softBodyWorldInfo.m_gravity.setValue(0,0,0);

softBodyWorldInfo.m_dispatcher = dispatcherSoft;
softBodyWorldInfo.m_broadphase = broadphaseSoft;

... Loading positions, tetra, links and faces to create my soft body

softBody->setVolumeMass(150);

softBody->m_materials[0]->m_kLST=.5;
softBody->m_materials[0]->m_kAST=1.;
softBody->m_materials[0]->m_kVST=.5;
softBody->m_cfg.kDF = 10. ;

softWorld->addSoftBody(softBody);
Ludobaka
Posts: 2
Joined: Fri Jun 28, 2013 9:11 am

Re: Configuring the Soft Body Parameters

Post by Ludobaka »

I still didn't find the solution.

It really seems like Bullet Material of SoftBody don't use angular and volume stiffness.

Someone can help me?