Tower Demoliton …. 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
- PixelFlow, by myself, https://github.com/diwi/PixelFlow
The towers are created by stacked layers of bricks. 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_TowerDemolition.java