This repository contains a GPU implementation of real time dynamic fracture using Rod-Bonded Discrete Element Method and Position Based Dynamics (see Primal/Dual Descent Methods for Dynamics). There is an unoptimized version of the Cosserat bond model available at entropylost/primal_dual.
Install Rust, clone this repository, and then execute cargo build --release
. Note that this currently uses CUDA and so will fail on any machines without a dedicated NVIDIA gpu.
To launch the program, execute cargo r --release scenes/glassbreak-3.scene
. When running, the keys WASD[Space][Shift]
can be used to move the camera, and the mouse will rotate the camera, togglable via [Esc]
. The key \
will toggle the controls display, and [Enter]
will run/pause the simulation.
The files use the Rusty Object Notation (RON) serialization format, with files ending in the .scene
extension used to describe loadable scenes, and .pts
to describe sets of points which can be referenced by objects in the scenes. The parameters used for the objects and constants can be seen in src/data.rs
, as well as the default values. src/bin/generate.rs
also shows an example program that can be used to generate a .pts
file.
glassbreak-3 (see still) |
rigid-collide-4 (see video) |
glassbreak-large (front) |
The Illumaniti | rigid-collide-4 (front) |
glassbreak-large (back) |
glassbreak-3 using the alternate renderer |
tablecrush making a Hertzian cone |
Ball hitting a 200 by 60 by 60 block |
glassbreak-wide |