SoftBody Plasticity

Post Reply
Xcoder79
Posts: 42
Joined: Sun Aug 07, 2011 5:27 am

SoftBody Plasticity

Post by Xcoder79 »

Hi,

Here, is a short video below showing plasticity
using bullet physics.

https://www.youtube.com/watch?v=pc3W8nVOCf4
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland
Contact:

Re: SoftBody Plasticity

Post by benelot »

Hi Xcoder79,

What you show here looks interesting, would you be interested in providing a simple example of plasticity for the bullet example browser? Just a box falling onto a sphere or something.
Xcoder79
Posts: 42
Joined: Sun Aug 07, 2011 5:27 am

Re: SoftBody Plasticity

Post by Xcoder79 »

Hi,


Sorry for taking so long to respond.

Here is a demo showing plasticity in simplest form.

https://www.youtube.com/watch?v=uMODXFtOWhM

And the modifications applied to SoftDemo.cpp file.

//changing the shape of rigidbody

// Big plate
//
static btRigidBody* Ctor_BigPlate(SoftDemo* pdemo,btScalar mass=30,btScalar height=8)
{
btTransform startTransform;
startTransform.setIdentity();
startTransform.setOrigin(btVector3(0,height,0));
btRigidBody* body=pdemo->localCreateRigidBody(mass,startTransform,new btBoxShape(btVector3(4,1,2)));
body->setFriction(1);
return(body);
}

//SoftBody Sphere

// Plasticity
//
static void Init_Plasticity(SoftDemo* pdemo)
{
//TRACEDEMO
btSoftBody* psb=btSoftBodyHelpers::CreateEllipsoid(pdemo->m_softBodyWorldInfo,btVector3(0,-6,0),
btVector3(1,1,1)*3,
512);



psb->setTotalMass(250,true);

pdemo->getSoftDynamicsWorld()->addSoftBody(psb);

Ctor_BigPlate(pdemo);

pdemo->m_autocam=true;


}

I have turned gravity down for this demo it is unstable otherwise.

m_softBodyWorldInfo.m_gravity.setValue(0,-1,0);

I hope this can be easily integrated into the example browser.

Thx
Post Reply