Chainmail simulations with Bullet Physics

Show what you made with Bullet Physics SDK: Games, Demos, Integrations with a graphics engine, modeler or any other application
Post Reply
RBD
Posts: 141
Joined: Tue Sep 16, 2008 11:31 am

Chainmail simulations with Bullet Physics

Post by RBD »

A couple of chainmail (maille armour) simulations using Bullet Physics:

YouTube: Festive chainmail physics simulation test
YouTube: Chainmail and Basket of Balls in Cornell Box

Metals parts procedurally composed out of compound btCapsuleShape primitives.
magicchicken
Posts: 11
Joined: Tue Dec 09, 2008 9:42 pm

Re: Chainmail simulations with Bullet Physics

Post by magicchicken »

Wow!

I have been trying to weeks to build just a chain that looks half that good. Just creating this section of the chain would be nice:
Image

I saw you say that you're not using constraints. You just build the shapes and place them to interlock, and let the collision system handle the rest? What class of collisionShapes are you using? Any code snippets you can share regarding the properties you set on each body?
RBD
Posts: 141
Joined: Tue Sep 16, 2008 11:31 am

Re: Chainmail simulations with Bullet Physics

Post by RBD »

All metal parts, except spheres, are btCompoundShape composed of btCapsuleShape primitives, including the chains; no special properties...

The full details on the chain: each metal ring is one btCompoundShape composed of 8 btCapsuleShape primitives (could use as little as 6 or as many as desired); (physics shapes are invisible / don't have any mesh) the visible render mesh is simply a stretched torus (as high or low resolution as you need); the centre of gravity is in the middle and mass is material density multiplied by the volume of a cylinder of the same length; the more load you put on a chain, the higher you will need sim steps (and/or sub-steps); note that btCapsuleShape work best when margin is the entire radius (might become the default in the future, see issue 446).
Image
charles_west
Posts: 11
Joined: Mon Oct 19, 2009 12:41 am

Re: Chainmail simulations with Bullet Physics

Post by charles_west »

If I may ask, what method did you use to integrate Bullet with Blender? Did you use the Blender game engine or roll your own solution?

Thanks.
RBD
Posts: 141
Joined: Tue Sep 16, 2008 11:31 am

Re: Chainmail simulations with Bullet Physics

Post by RBD »

Using built-in Blender Game Engine.
Post Reply