One thing that became clear during IndieCade is that no-one seemed to understand that there is clever technology behind Tengami. Most observers could be heard to say things like ‘the animation is beautiful’, perhaps thinking that it was purely an artist generated effect. The reality is that the pop-up folding has no artist involvement at all. It is entirely mathematically driven.
Of course, this lack of tech visibility is entirely my fault as I made a conscious decision not to talk about tech when we present and describe Tengami. Generally I believe that tech should seamlessly fade into the background becoming invisible to the player, only becoming noticeable when it goes wrong. However, despite that I feel proud of what we’ve done technically with Tengami and so I feel compelled to start talking about it a little more.
Let me start by saying that it took over a year to create the tools that make Tengami possible, and that I don’t think anyone has ever created tools that do something similar before. All of these tools are ‘offline’ meaning they are not part of the game itself; they are used by a designer or artist to create the pop-ups in a 3D modelling tool and then exported through key-framed animation for the game. Originally I had envisioned a system where the math for the pop-ups was actually run in real-time, but it quickly became apparent as we created more and more complex pop-ups, that this would prove intractable performance-wise. Some of the most complex pop-ups in Tengami contain hundreds of individual folds.
The main tool we created, we rather plainly labelled the ‘paper kit’. The paper kit is a suite of plugins for a 3D modelling tool called modo that permit a designer to quickly and simply create unimaginably complex pop-ups without ever having to worry about whether it will fold correctly or not. The paper kit guarantees that anything you build will always fold correctly (within certain constraints). To build the paper kit I first had to learn how pop-ups really work. Fortunately I found a number of instructive books that explain the idea behind different fold types and more complex shapes that can be constructed from them. At heart there are really only two types of fold: the parallel-fold and the v-fold. All other shapes can be made from these.
Once I had a good grasp of what was needed I worked out the mathematics of these folds from first principles, and then proceeded to add more complex shapes such as boxes, pyramids and floating planes. With this collection of shapes complete I added the ability to connect them together. I learnt that there are well defined rules for where you can and can’t connect one shape or fold to another and this lead to a simple method for ‘plugging’ together shapes in a similar way to clicking Lego pieces together. The process of creating pop-ups for Tengami is actually really quick using the tool. Most of the time is spent figuring out how to reverse engineer a particular building or landscape to be built as a pop-up structure. This very much requires a different way of thinking and looking at construction that we’ve all got better at over time.
I’m still actively improving the paper kit, recently adding a layer of functionality that is even higher level, permitting a designer to specify a 2D silhouette of a building and then constructing this automatically using certain shape types. As we find certain construction patterns that are common these also get added as special shapes to speed up the process further.
When time permits I will put together a video that shows the paper kit in action and the process of building the skeleton of the first building you come across in the game: the forest shrine. At some point in the future I would like to do a full talk around the topic perhaps at GDC or something similar.