Generative Modelling Language

From Wikipedia, the free encyclopedia

In generative computer programming, the Generative Modelling Language (GML) is a very simple programming language for the concise description of complex 3D shapes. It follows the "Generative Modelling" paradigm, where complex datasets are represented by lists of operations rather than by lists of objects, which is for instance the case in a relational database.

Contents

[edit] Generative 3D Modelling

Traditionally, 3D objects and virtual worlds are defined by lists of geometric primitives: cubes and spheres in a CSG tree, NURBS patches, a set of implicit functions, a consommé of triangles, or just a cloud of points.

The term generative modelling describes a paradigm change in shape description, the generalization from objects to operations: A shape is described by a sequence of processing steps, rather than just the end result of applying these operations. Shape design becomes rule design. This approach is very general. It can be applied to any shape representation that provides a set of generating functions, the 'elementary shape operators'. Its effectiveness has been demonstrated, e.g., in the field of procedural mesh generation, with Euler operators as complete and closed set of invertible shape generating functions for meshes, operating on the half-edge level.

Generative modeling gains its efficiency through the possibility of creating high-level shape operators from low-level shape operators. Any sequence of processing steps can be grouped together to create a new combined operator. It may use elementary operators as well as other combined operators. Concrete values can easily be replaced by parameters, which makes it possible to separate data from operations: The same processing sequence can be applied to different input data sets. The same data can be used to produce different shapes by applying different combined operators from, e.g., a library of domain-dependent modeling operators. This makes it possible to create very complex objects from only a few high-level input parameters, such as for instance a style library.

[edit] The Generative Modelling Language

The GML is a concrete implementation of the generative approach. It is a stack-based, interpreted programming language, very similar to Adobe's PostScript, but without any of the 2D layout operators. It provides instead a number of operators for creating 3D models (polygons, b-reps, subdivision surfaces). As a "shape programming language," it is a true generalization of "flat" 3D file formats like OBJ, DXF, or VRML that contain just lists of geometric primitives.

Together with its OpenGL-based runtime engine the GML can also be seen as a viewer with an integrated modeler, to overcome the usual separation of 3D modeling from interactive visualization. Both are interwoven instead:

  • GML permits a concise representation of parameterized 3D objects
  • which can be evaluated on-the-fly at runtime,
  • rendered with adaptive level-of-detail,
  • and allows for the interactive manipulation of all parameters.

[edit] GML Example

1:     (0,0,-2) (1,1,0) 2 quad
2: /cyan setcurrentmaterial
5 poly2doubleface
3: (0,1,1) extrude
4: (0,0,1) (1,0,1) normalize
0 project_ringplane
5: (2,0,0) (0,1,-1) 2 quad
6: /yellow setcurrentmaterial
5 poly2doubleface
7: 0 bridgerings
  Image:GML-example-gehrung.png

[edit] Applications

Image:GML-Gothic-Cathedral.jpg

With procedural models, the model complexity is no longer directly (i.e., linearly) related with the file size. The Procedural Cathedral, a basic model of the Cologne Cathedral, contains 70 tracery windows, and a single window in highest resolution contains about 7 million triangles. These are "unfolded" from only 126 KB of GML code (18 KB zipped).

Image:GML-Gothic-Window-Thickness.jpg

Gothic architecture is a prime example for the effectiveness of procedural shape design: In the Gothic style, all geometric constructions are exclusively executed using compass and ruler. Variations were obtained by procedurally combining in ever changing ways a set of simple basic parameterized geometric operations. Therefore it is practically impossible to find two tracery windows in different buildings that follow an identical geometric construction.

Image:GML-Cave-Designer.jpg

The interactive CAVE designer helps to fit a CAVE into a small room. Because of the concrete bars under the ceiling it is difficult to place it using only 2D plans of the room. Degrees of freedom (blue arrows) are the position and orientation of the projection screen cubicle, the opening angle of the projectors, and the position/orientation of the top mirror. The DOFs are mildly restricted to take only valid values. DOFs are kept consistent, i.e., when moving the cubicles, the projector centers move as well (or get reflected at the walls).

Image:GML-Autofelge.jpg

Given a set of about 30 CAD models of car wheel rims, the task was to find a common parametrization that is capable of generating each of the individual instances (generative surface reconstruction). As a result, new, similar wheel rims can be synthesized within the design space that is spanned by the given 30 rims, that were manually classified into 3 main categories. A few of the high-level parameters can be directly manipulated using sliders and buttons (arrows and balls).

Image:GML-Stuhl-Template.jpg

Generative modeling suggests to differentiate between structure and appearance (e.g., the style) of 3D models. Surprisingly many objects have the same structure as a chair, i.e., they are "close" to a chair on the structural level. The differentiation then permits (in principle) to apply the appearance of one object in this class to another.

Image:GML-Voronoi-Diagram.jpg

Didactic applet showing the construction of Voronoi diagrams: Is it possible to reconstruct the centers of the Voronoi cells from the region boundaries? The interactive applet conveys a good intuition of the idea behind the formal proof.

[edit] Further reading

  • The GML homepage on generative-modeling.org
  • Dissertation of Sven Havemann on UB TU Braunschweig describes why and how GML was created
  • Michael Leyton's book A Generative Theory of Shape, available from his homepage
  • The original inspiration came from John Snyder's book Generative Modeling for Computer Graphics and CAD: Symbolic Shape Design Using Interval Analysis (out of print). See the Caltech pages on GENMOD
Languages