Mesh shattering with baked physics

Lightmap example from flipcode.com

Breaking a mesh

“In mathematics, a Voronoi diagram is a partition of a plane into regions close to each of a given set of objects.”

Shatter Studio with Voronoi mesh computed.

Physics and baking to a texture

Baked animation. One line per mesh. Animation time goes from left to right. Orientation is top half of picture. Translation is bottom half.

Display with NME

Global view of NME graph with loaded shattered mesh
Sampling of animation texture
Position is scale to the animation boundingbox. World position = Min + (Max-Min) * TexturePositionSample.

vec3 qtransform( vec4 q, vec3 v ){ return v + 2.0*cross(cross(v, q.xyz ) + q.w*v, q.xyz); }

Applying an orientation quaternion to the mesh position
Final world position = Animation Translation + Oriented Position
Same operation is performed on the normal and used for lighting

After words

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store