mesh partition method in Bullet?

xnhyzhyh
Posts: 2
Joined: Wed Nov 10, 2010 3:42 pm

mesh partition method in Bullet?

Post by xnhyzhyh »

Hi all,I'm new to Bullet and just wondering if i can get some help on a few issues I've run into with mesh decomposition/partition methods in Bullet.

I'm basically trying to create a building collapse shot in an earthquake situation:
I have a mesh file(off format) of a building,and since it should be active,GImpact Library is used to read the mesh.

My basic question is,
How to partition the mesh into seperate small parts in the bullet development environment(since the mesh building will become fractured)? Better if size of each mesh could be defined by us.I've used Metis(a mesh processing open source software)to partition meshes,but the partition process takes a long time,and the seperate parts are always equal.

I've found out Blender offered an Python script named Crackme(http://bulletphysics.org/Bullet/phpBB3/ ... kme#p12260),and the results are wonderful (http://www.youtube.com/watch?v=7CzsJpL0Fss),
Could Bullet implement this alone without Blender?And anyone know which algorithm it uses?

I've puzzled with this problem for nearly 2 weeks and many thanks if anyone could help me :)
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: mesh partition method in Bullet?

Post by Erwin Coumans »

It is better to ask the original author of 'Crackme' in the BlenderArtists forum topic here:
http://blenderartists.org/forum/showthr ... ost1292960

You could try using convex decomposition, see Bullet/Demos/ConvexDecompositionDemo, or use a modeler.

Then add the convex parts in a btCompoundShape. Here is a work-in-progress fracture demo http://code.google.com/p/bullet/issues/detail?id=90
Thanks,
Erwin
btranbo
Posts: 3
Joined: Tue Nov 30, 2010 11:41 am

Re: mesh partition method in Bullet?

Post by btranbo »

Erwin Coumans wrote: You could try using convex decomposition, see Bullet/Demos/ConvexDecompositionDemo, or use a modeler.
I have the same problem. I have seen the ConvexDecompositionDemo, and i use another model. however, the model using convex decomposition is not as clear as using btBvhTriangleMeshShape. My question is can I use btBvhTriangleMeshShape for mesh partition to make fracture effect?
btranbo
Posts: 3
Joined: Tue Nov 30, 2010 11:41 am

Re: mesh partition method in Bullet?

Post by btranbo »

Although I am new to Bullet, I find it helpful. I want use it to make a fracture effect, espically using mesh model for its reality. Could Erwin give me some suggestion?

Thanks
xnhyzhyh
Posts: 2
Joined: Wed Nov 10, 2010 3:42 pm

Re: mesh partition method in Bullet?

Post by xnhyzhyh »

btranbo,we could communicate via e-mail more frequently about this stuff,
my email address is : xnhyzhyh1987@yahoo.com.cn :D how about your progress now?
btranbo
Posts: 3
Joined: Tue Nov 30, 2010 11:41 am

Re: mesh partition method in Bullet?

Post by btranbo »

OK. My email is wubogfkd@yahoo.com.cn
I am just trying to do only a little step to make the mesh into subparts even not physics