SoftBody help

kelmer
Posts: 5
Joined: Wed Sep 16, 2009 8:25 am

SoftBody help

Post by kelmer »

Hi,

I just got my hands on Bullet, and I want to create 'elastic' character models with it, that being that you can click your mouse on any point on the character and "stretch" it as you move the mouse, and then if you release the mouse button the mesh will behave as though it was made of rubber or something like that, with an elastic movement similar to those of springs. I think SoftBody physics would do the trick, wouldn't it?

I'm currently playing a bit with the SoftBody demos, but they have a lot of mixed code from too many files, it's quite complex to understand, so I was wondering if there was some other samples, simpler than those coming with the engine. I tried to use this sample here and convert it into a SoftRigidBodyDynamicWorld and then add a SoftBody ellipsoid like the one on Pressure demo, but I'm getting access violation errors all over the place.

Can anyone point me out to where is softBodyWorldInfo initialized?
kelmer
Posts: 5
Joined: Wed Sep 16, 2009 8:25 am

Re: SoftBody help

Post by kelmer »

Ok, now I've got a new question, how do the vertices and faces need to be structured for them to work with CreateFromTriMesh?? I tried to look at bunnymesh.h from the samples but I can't figure it out, it seems to me that the x, y and z coordinates are just put in the array in a strip, so that it looks like this:
x,y,z,x,y,z,x,y,z, ...

and then the faces just point to three coordinates, instead of three vertices (three groups of three coordinates). Can anyone throw some light into this for me? :cry: :roll:
kelmer
Posts: 5
Joined: Wed Sep 16, 2009 8:25 am

Re: SoftBody help

Post by kelmer »

...please??
kelmer
Posts: 5
Joined: Wed Sep 16, 2009 8:25 am

Re: SoftBody help

Post by kelmer »

okay, can anyone tell me how does bullet implement soft body behavior? do you use a spring-mass system using verlet integration or what? I'm trying to make my own implementation of elastic tissues so it would be great help to know how you do it.

I'd appreciate any help in this regard