Cell Fracture …. A Rigid-Body experiment from the weekend, done in Processing3 and some libraries:
- PeasyCam, by Jonathan Feinberg, http://mrfeinberg.com/peasycam
- bRigid (jBullet), by Daniel Koehler, http://www.lab-eds.org/bRigid
- HE_Mesh, by Frederik Vanhoutte, https://github.com/wblut/HE_Mesh
- PixelFlow, by myself, https://github.com/diwi/PixelFlow
A Voronoi Tesselation of a Cube, generated with HE_Mesh, is used for creating around 300 convex rigid bodies. The initial sampling locations are focused at the cubes center, so that the inner cell-bodies (colored in red) are overall smaller.
The physics simulation is done using bRigid. PixelFlow’s Skylight Renderer and some post processing (Bloom, DoF) is used for rendering the scene.
Rigid Bodies are fairly cheap to render since the geometry doesnt change, only the transformation matrix needs to be updated.
This makes it possible to achieve some fairly stable FrameRate of about 40-50 fps.
Demo source-code (github): Skylight_BulletPhysics_CellFracture.java