I saw Smash Hit the other day and was amazed by the physics of the game, specially the shattered glass effect:

I've read other posts about this subject but I still feel that they don't share enough details to let me get started on implementing this on my own with OpenGL/GLSL.

Is it possible for somebody with an enhanced perception and graphics understanding to watch the gameplay and give some pointers on how this effect could be replicated?

I rather not use 3rd party physics engine and do the entire thing on my own for educational purposes, so could you mention some of the physics that goes behind this as well?

References to other documents and demos are highly appreciated.

  • \$\begingroup\$ IMO You really need to pick up some scholarly articles and books and begin researching this. It's not suitable for SE. \$\endgroup\$ Commented Aug 12, 2014 at 16:42
  • \$\begingroup\$ 1) detect collisions 2) fracture the glass geometry 3) apply an impulse to the pieces 4) simulate physics in general. not necessarily in that order. \$\endgroup\$
    – user13213
    Commented Aug 12, 2014 at 16:55
  • 2
    \$\begingroup\$ The developer's blog at tuxedolabs.blogspot.se has some discussion of the techniques he used. \$\endgroup\$
    – GuyRT
    Commented Aug 12, 2014 at 17:03
  • 1
    \$\begingroup\$ @karlphillip: I have plenty of experience in computer graphics. \$\endgroup\$ Commented Aug 12, 2014 at 17:04
  • \$\begingroup\$ Looks fake. The edges are curved unrealistically. Straight edges followed by sharp bends followed by sharp edges again? Not going to happen. Unprepared glass doesn't break in L shapes. \$\endgroup\$
    – MSalters
    Commented Aug 12, 2014 at 17:04

1 Answer 1


This is a pretty advanced topic. Generally people like to use Boolean Set Operations implemented with a BSP tree for this kind of destruction, which revolves around splitting polygons over planes. Take a look at this paper by Naylor to learn how.

This will let you overlay one mesh upon another and perform a subtraction. The results of the subtraction can give you the mesh with a carved out volume.

You'll also perform an intersection to find the carved out volume itself. Given this intersection volume, you can use any sort of approximation to simulate a shatter effect. Generating random planes and slicing the volume can work! The sliced up intersection can then be simulated as a bunch of rigid bodies, and you can just let them all fall.

Since all of these operations work with meshes you'll need some kind of boundary representation of your geometry. Generally people like half-edge mesh the most (myself included).

Here the author briefly talks about his technology for the destruction in this game.


Not the answer you're looking for? Browse other questions tagged .