Benedikt Bitterli
Video Thumbnail
Video Screenshot 1

Video Screenshot 2

Video Screenshot 3

Video Screenshot 4

Tensile

Tensile was a real-time 64k demo written in collaboration with Simon Kallweit and Vitor Bosshard in early 2013. It was submitted to Revision 2013 (a competition for demos), where it won 2nd place in its category. Most of the development was done in our free time over a period of 3 months, next to studying at ETH.

64k demos are an interesting challenge. The purpose of this type of program is to generate an entertaining and engaging music video in real-time, with the restriction that the entire program and all of its data have to fit into a single 64kb executable file. To illustrate how small this is, a single uncompressed frame of the video is already more than 50 times larger than the program that generated it. Similarly, one second of uncompressed audio is twice as large as the entire program.

It is clear that ordinary approaches to programming don't work here - for example, it is not possible to have a composer make an audio track and then play back the audio file at runtime, since the file would exceed the size restrictions by several magnitudes. Instead, all of the sound must be synthesized at runtime; that is, a fully real-time software synthesizer fitting into 64kb is required, which then has to be programmed by an artist to generate a good sounding audio track. Similarly, storing complex meshes or textures is almost impossible to do within 64kb, so all geometry and textures have to be generated procedurally at runtime, in real-time.

My job on the team was to create a robust mesh generation pipeline with complex procedural content and mesh fracture. It was capable of taking procedural primitives such as vector graphics or procedural trees and convert them into watertight meshes, which could then be fractured using voronoi partitioning implemented using 3D Delaunay tetrahedralization. I used a space colonization-type algorithm to generate procedural trees and complex interlocking gear mechanisms, seen towards the end of the video. I also implemented compressed environment maps using spherical harmonics and compressed vector graphics, the latter being implemented as a partially SVG-compliant rasterizer with a custom binary format for SVGs to save space. Vector graphics were used to generate the text, after extruding and beveling the text geometry. I also made most of the visual content seen in the video

The major challenge in this project was to implement a robust fracturing algorithm. Voronoi partitioning produces visually pleasing results, but it is maddeningly difficult to implement, especially in the presence of round-off errors due to limited precision floating point. If not for the size restrictions, using an existing robust implementation such as CGAL or at least a variable precision library such as GMP would have been a less work-intensive choice, but 64 kilobytes are not enough space to harbor these libraries. Implementing the fracturing algorithm took more than 4 weeks, followed by an additional 2 weeks of making it stable for our input meshes.