Generative Modelling Language
Encyclopedia
Generative Modelling Language (GML) in computer graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

 and generative computer programming 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
Relational database
A relational database is a database that conforms to relational model theory. The software used in a relational database is called a relational database management system . Colloquial use of the term "relational database" may refer to the RDBMS software, or the relational database itself...

.

Overview

Usual 3D file formats describe a virtual world in terms of geometric primitives. These may be cubes and spheres in a CSG
Constructive solid geometry
Constructive solid geometry is a technique used in solid modeling. Constructive solid geometry allows a modeler to create a complex surface or object by using Boolean operators to combine objects...

 tree, NURBS patches, a set of implicit function
Implicit function
The implicit function theorem provides a link between implicit and explicit functions. It states that if the equation R = 0 satisfies some mild conditions on its partial derivatives, then one can in principle solve this equation for y, at least over some small interval...

s, a triangle mesh
Triangle mesh
A triangle mesh is a type of polygon mesh in computer graphics. It comprises a set of triangles that are connected by their common edges or corners....

, or just a cloud of points
Point cloud
A point cloud is a set of vertices in a three-dimensional coordinate system. These vertices are usually defined by X, Y, and Z coordinates, and typically are intended to be representative of the external surface of an object....

. The term "generative 3D modelling" describes a different paradigm for describing shape. The main idea is to replace 3D objects by object-generating operations: A shape is described by a sequence of processing steps, rather than the triangles which are the end result of applying these operations. Shape design becomes rule design. The approach can be generally applied to any shape representation that provides a basic set of generating functions, called in this context 'elementary shape operators'. Its effectiveness has been demonstrated, e.g., in the field of procedural mesh generation
Mesh generation
Mesh generation is the practice of generating a polygonal or polyhedral mesh that approximates a geometric domain. The term "grid generation" is often used interchangeably. Typical uses are for rendering to a computer screen or for physical simulation such as finite element analysis or...

, with Euler operator
Euler operator
In mathematics, Euler operators are a small set of functions to create polygon meshes. They are closed and sufficient on the set of meshes, and they are invertible.- Purpose :...

s as complete and closed set of invertible shape generating functions for meshes, operating on the half-edge level.

Generative modelling gains 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 modelling 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.

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
PostScript
PostScript is a dynamically typed concatenative programming language created by John Warnock and Charles Geschke in 1982. It is best known for its use as a page description language in the electronic and desktop publishing areas. Adobe PostScript 3 is also the worldwide printing and imaging...

, but without any of the 2D layout operators. It provides instead a number of operators for creating 3D models (polygon
Polygon
In geometry a polygon is a flat shape consisting of straight lines that are joined to form a closed chain orcircuit.A polygon is traditionally a plane figure that is bounded by a closed path, composed of a finite sequence of straight line segments...

s, b-reps, subdivision surface
Subdivision surface
A subdivision surface, in the field of 3D computer graphics, is a method of representing a smooth surface via the specification of a coarser piecewise linear polygon mesh...

s). As a "shape programming language," it is a true generalization of "flat" 3D file formats like OBJ, DXF, or VRML
VRML
VRML is a standard file format for representing 3-dimensional interactive vector graphics, designed particularly with the World Wide Web in mind...

 that contain just lists of geometric primitives.

Together with its OpenGL
OpenGL
OpenGL is a standard specification defining a cross-language, cross-platform API for writing applications that produce 2D and 3D computer graphics. The interface consists of over 250 different function calls which can be used to draw complex three-dimensional scenes from simple primitives. OpenGL...

-based runtime engine the GML can also be seen as a viewer with an integrated modeller, to overcome the usual separation of 3D modelling
3D modeling
In 3D computer graphics, 3D modeling is the process of developing a mathematical representation of any three-dimensional surface of object via specialized software. The product is called a 3D model...

 from interactive visualization
Real-time computer graphics
Real-time computer graphics is the subfield of computer graphics focused on producing and analyzing images in real time. The term is most often used in reference to interactive 3D computer graphics, typically using a GPU, with video games the most noticeable users...

. 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.

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
 

Applications



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
Cologne Cathedral
Cologne Cathedral is a Roman Catholic church in Cologne, Germany. It is the seat of the Archbishop of Cologne and the administration of the Archdiocese of Cologne. It is renowned monument of German Catholicism and Gothic architecture and is a World Heritage Site...

, contains 70 tracery
Tracery
In architecture, Tracery is the stonework elements that support the glass in a Gothic window. The term probably derives from the 'tracing floors' on which the complex patterns of late Gothic windows were laid out.-Plate 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).



Gothic architecture
Gothic architecture
Gothic architecture is a style of architecture that flourished during the high and late medieval period. It evolved from Romanesque architecture and was succeeded by Renaissance 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
Compass and straightedge
Compass-and-straightedge or ruler-and-compass construction is the construction of lengths, angles, and other geometric figures using only an idealized ruler and compass....

. 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
Tracery
In architecture, Tracery is the stonework elements that support the glass in a Gothic window. The term probably derives from the 'tracing floors' on which the complex patterns of late Gothic windows were laid out.-Plate tracery:...

 windows in different buildings that follow an identical geometric construction.



The interactive CAVE designer helps to fit a CAVE
Cave
A cave or cavern is a natural underground space large enough for a human to enter. The term applies to natural cavities some part of which is in total darkness. The word cave also includes smaller spaces like rock shelters, sea caves, and grottos.Speleology is the science of exploration and study...

 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).



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
Surface reconstruction
Surface reconstruction refers to the process by which atoms at the surface of a crystal assume a different structure than that of the bulk. Surface reconstructions are important in that they help in the understanding of surface chemistry for various materials, especially in the case where another...

). 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).



Generative modelling suggests to differentiate between "structure" and "appearance" (e.g., the style) of 3D models. Surprisingly many objects have the same structure as a chair
Chair
A chair is a stable, raised surface used to sit on, commonly for use by one person. Chairs are most often supported by four legs and have a back; however, a chair can have three legs or could have a different shape depending on the criteria of the chair specifications. A chair without a back or...

, 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.



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.

Further reading

  • Michael Leyton. A Generative Theory of Shape (available from his homepage)
  • John Snyder. Generative Modeling for Computer Graphics and CAD: Symbolic Shape Design Using Interval Analysis

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK