A scriptable, generative modelling system for dynamic 3D meshes

A scriptable, generative modelling system for dynamic 3D meshes
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

We describe a flexible, script-based system for the procedural generation and animation of 3D geometry. Dynamic triangular meshes are generated through the real-time execution of scripts written in the Lua programming language. Tight integration between the programming environment, runtime engine and graphics visualisation enables a workflow between coding and visual results that encourages experimentation and rapid prototyping. The system has been used successfully to generate a variety of complex, dynamic organic forms including complex branching structures, scalable symmetric manifolds and abstract organic forms. We use examples in each of these areas to detail the main features of the system, which include a set of flexible 3D mesh operations integrated with a Lua-based L-system interpreter that creates geometry using generalised cylinders.


💡 Research Summary

The paper presents Fugu, a script‑driven system for the procedural generation and real‑time animation of dynamic 3D triangular meshes. The core of the system is the Lua programming language, chosen for its lightweight syntax, extensibility, and ease of embedding in C++ applications. A Fugu script is a single Lua module that must define two callbacks: setup()—executed once to create initial geometry and scene graph elements—and update(dt)—called repeatedly with the elapsed time step to modify the model dynamically.

Fugu’s runtime engine is written in C++ and relies on the VCGLib mesh library for low‑level representation of vertices, edges, and faces. To guarantee safety when multiple scripts run concurrently, vertices and faces are wrapped in proxy objects that expose a valid() method; this protects against dangling references caused by deletions or memory reshuffling performed by VCGLib. The engine also provides a simple scene graph (the “universe”) where mesh nodes and abstract anchor nodes can be added and hierarchically linked.

The user interface integrates a code pane with syntax highlighting, line numbers, and multi‑file tabs, a 3D view with trackball navigation, and a console for runtime errors. The 3D view supports several rendering modes (wireframe, ambient‑occlusion shading, textured) and optional Butterfly subdivision for smooth surface preview.

Fugu supplies a rich set of geometric primitives and operations. Basic transformation utilities (T for translation, S for scaling, R for rotation, Rv for vector‑to‑vector rotation) generate homogeneous matrices that can be applied to nodes or directly to mesh data. Primitive generators such as cube(), sphere(), icosahedron(), and the more flexible iso(r, f) (which builds an isosurface by marching cubes over an arbitrary scalar field f) enable rapid creation of complex shapes.

A standout feature is the support for generalized cylinders via a “turtle” interface. The turtle maintains a local coordinate frame that can be moved (move(d)), rolled, pitched, or yawed, and can record control points for piecewise cubic Bézier curves representing cross‑sections and carrier curves. After defining these curves, calling mesh() produces a triangular approximation of the cylinder, which can then be further processed with the full suite of mesh operations. This turtle‑based approach integrates naturally with Lua‑based L‑systems, allowing timed growth, branching, and symmetry to be expressed concisely.

Mesh manipulation functions are exposed both at the global level (e.g., mesh:smooth_subdivide(levels)) and locally (e.g., inset(v, s), extrude(v, d, m), flattenvl(mesh, vertex_list, p, n)). The library also provides neighborhood queries (loopv(v), nearbyv(v, n)) and utilities for iterating over Lua tables (borrowed from underscore.lua). Mathematical helpers include trigonometric functions, linear algebra, Perlin noise, and interpolation utilities.

Implementation details reveal that Fugu leverages LuaBind for seamless binding of C++ types (vectors, matrices, quaternions) to Lua, enabling operator overloading and natural arithmetic expressions in scripts. While computationally intensive operations run in C++, higher‑level logic remains in Lua, encouraging rapid prototyping and community‑driven extension. The authors discuss alternative mesh libraries (CGAL, OpenMesh) and justify the choice of VCGLib for its real‑time performance and existing subdivision tools, while acknowledging that OpenMesh’s LGPL license might be preferable for future releases.

Three illustrative examples demonstrate the system’s capabilities: (1) a Waratah flower generated by a simple extrusion script, (2) a “stalk‑covered rabbit” created by applying the extrusion script to the Stanford Bunny mesh, and (3) a complex Calcispongiae design built with timed L‑systems, generalized cylinders, and Lua scripting. These case studies showcase how Fugu can handle branching structures, scalable symmetric manifolds, and abstract organic forms.

In conclusion, Fugu offers a tightly integrated environment where procedural geometry creation, dynamic animation, and interactive visualization coexist within a single Lua‑driven workflow. Its design lowers the barrier for architects and designers to experiment with sophisticated organic forms, while providing enough low‑level control for researchers to extend the system. Future work includes expanding the library of reusable Lua modules, improving concurrency handling, and fostering a community‑driven ecosystem for sharing scripts and extensions.


Comments & Academic Discussion

Loading comments...

Leave a Comment