blog projects

procedural form creation with fugu

Fugu is a system for generating procedural animated forms using the Lua scripting language. While it is not complete, a quite functional version of fugu is available from

Ever since I was 7, when I created my first program with help from my dad — a hot-air balloon sprite that flew diagonally across the screen of our C64 — I’ve been interested in programming, and how we can create things and worlds using code. While this interest has manifested primarily in my enjoyment and creation of computer games, I am also interested in creativity and how computers and code can enable us to create and explore interesting forms and worlds.

This last 6 months, working within CEMA’s research agenda, I have been building software for generating static and animated forms by writing code. It is called fugu, for now. On loading fugu the user/artist/creator/explorer is presented with a code pane on the left, and a form pane on the right. Unlike traditional 3D modellers, there are no geometric tools to manipulate the form, there is only the code pane, where, using a language known as Lua, a user specifies the construction and animation of a 3D model. Here are some research videos.

A variety of geometric and mathematical functions are available, such as extrusion, edge split, spherical interpolation, vector and matrix operations, etc. (Here is a peek at the preliminary reference documentation for fugu.) These functions form the core of fugu, axiomatic operators, which, through composition and collection, more complex form operators will eventually be constructed. Ideally, on release of this software, I’d like to have a number of higher-level operations, such as tentacle, deform, and cover_with_spikes.

There are similar programs out there, processing, for instance; fugu differs because it is targetted specifically towards the generation of procedural animated 3D forms. Therefore it provides a core which is geared toward that goal, for instance, the triangular mesh is a core data structure, optimised for certain operations. Fugu is more closely related to structure synth, or blender, than processing. While structure synth provides a particular model of creation (a rule-based grammar), fugu is currently more procedural — a user writes setup and update functions (just like in Processing!) However; once higher-level models are constructed, this mode of working will probably be ditched in favour for a descriptive-level of specification. Most 3D modelling packages, like Blender, come with scripting language support, in fact, you can set up Blender to look very similar to fugu. However, fugu differs from these in two important facets: Firstly, fugu is an app, but it is also an engine, which can be embedded in any application (e.g., a game or an art installation) and so you can run your animations in real-time (CPU power permitting). Secondly, fugu is a minimal tool designed to mediate the play between code and form — not at all like the behemoth modelling and animation packages which often cost in the thousands of dollars. (fugu’s current interface is even not minimal enough for me…)

So, when will fugu makes it debut? With my game moonman in the works, my steam on this project has condensed, and I may be switching priorities to help out on another project; but hopefully I’ll be able to finish up the main components of fugu and release it before my contract expires in April. I’d love to see what people’s are able to glean from such a system — like programming it’s easy to make a mess, but also like programming sometimes something beautiful will emerge.

Update: Fugu now has a website and the alpha is available! Check it out at


8 replies on “procedural form creation with fugu”


I hack on a game called Pioneer[1]. For a couple of years we’ve had something similar in spirit to this – all our models are actually Lua scripts which use code to build models out of various primitives. The system is by no means as deliberate or as well thought out as what you have here, and we’re actively moving away from models built up from primitives towards a more traditional model system, but I was fascinated to see the same basic concept employed in this way.


Thanks Rob, my initial goal was to apply this in a game setting, and I have built the core as a library which (theoretically) could be used within a game (I have a slow prototype of fugu running in ogre3d!).

I checked out your game … elite inspired … I like it. :)

Hi, I am interested in your process for using the output obj files in an animated sequence. Did you take them all into a program like maya or cinema 4d?
If so, how did you keep the changing form positioned properly?

I’m referring to the videos here –


Hiya. The .objs were imported into Blender to render those videos. There is an import script for Blender packaged with the fugu download (or available in the source distribution here. Importing the objs into any 3D package should be a similar process. I think all the forms in those videos were centred at the origin, and so they didn’t change position when I imported them..

Hi! Vertex colours and (I believe) UV coords are exported with the mesh. But the system doesn’t use textures itself.

Comments are closed.