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.
Chainmail simulations with Bullet Physics
-
- Posts: 11
- Joined: Tue Dec 09, 2008 9:42 pm
Re: Chainmail simulations with Bullet Physics
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:

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?
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:

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?
-
- Posts: 141
- Joined: Tue Sep 16, 2008 11:31 am
Re: Chainmail simulations with Bullet Physics
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).

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).

-
- Posts: 11
- Joined: Mon Oct 19, 2009 12:41 am
Re: Chainmail simulations with Bullet Physics
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.
Thanks.
-
- Posts: 141
- Joined: Tue Sep 16, 2008 11:31 am
Re: Chainmail simulations with Bullet Physics
Using built-in Blender Game Engine.