Generative Modelling Language

Last updated

Generative Modelling Language (GML) in computer graphics 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.

Contents

Overview

Usual 3D file formats describe a virtual world in terms of geometric primitives. These may be cubes and spheres in a CSG tree, NURBS patches, a set of implicit functions, a triangle mesh, or just a cloud of points. 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 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, with Euler operators 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, 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 modeller, to overcome the usual separation of 3D modelling 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.

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
  GML-example-gehrung.png

Applications

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,[ which? ] 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).

GML-Gothic-Window-Thickness (1).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.

GML-Cave-Designer (1).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).

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

GML-Stuhl-Template (1).jpg

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

GML-Voronoi-Diagram (1).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.

See also

Related Research Articles

Computational geometry is a branch of computer science devoted to the study of algorithms which can be stated in terms of geometry. Some purely geometrical problems arise out of the study of computational geometric algorithms, and such problems are also considered to be part of computational geometry. While modern computational geometry is a recent development, it is one of the oldest fields of computing with a history stretching back to antiquity.

<span class="mw-page-title-main">Voronoi diagram</span> Type of plane partition

In mathematics, a Voronoi diagram is a partition of a plane into regions close to each of a given set of objects. In the simplest case, these objects are just finitely many points in the plane. For each seed there is a corresponding region, called a Voronoi cell, consisting of all points of the plane closer to that seed than to any other. The Voronoi diagram of a set of points is dual to that set's Delaunay triangulation.

<span class="mw-page-title-main">Geometric primitive</span> Basic shapes represented in vector graphics

In vector computer graphics, CAD systems, and geographic information systems, geometric primitive is the simplest geometric shape that the system can handle. Sometimes the subroutines that draw the corresponding objects are called "geometric primitives" as well. The most "primitive" primitives are point and straight line segment, which were all that early vector graphics systems had.

<span class="mw-page-title-main">Constructive solid geometry</span> Creating a complex 3D surface or object by combining primitive objects

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 simpler objects, potentially generating visually complex objects by combining a few primitive ones.

<span class="mw-page-title-main">Solid modeling</span> Set of principles for modeling solid geometry

Solid modeling is a consistent set of principles for mathematical and computer modeling of three-dimensional shapes (solids). Solid modeling is distinguished from related areas of geometric modeling and computer graphics, such as 3D modeling, by its emphasis on physical fidelity. Together, the principles of geometric and solid modeling form the foundation of 3D-computer-aided design and in general support the creation, exchange, visualization, animation, interrogation, and annotation of digital models of physical objects.

<span class="mw-page-title-main">Polygon mesh</span> Set of polygons to define a 3D model

In 3D computer graphics and solid modeling, a polygon mesh is a collection of vertices, edges and faces that defines the shape of a polyhedral object. The faces usually consist of triangles, quadrilaterals (quads), or other simple convex polygons (n-gons), since this simplifies rendering, but may also be more generally composed of concave polygons, or even polygons with holes.

In the field of 3D computer graphics, a subdivision surface is a curved surface represented by the specification of a coarser polygon mesh and produced by a recursive algorithmic method. The curved surface, the underlying inner mesh, can be calculated from the coarse mesh, known as the control cage or outer mesh, as the functional limit of an iterative process of subdividing each polygonal face into smaller faces that better approximate the final underlying curved surface. Less commonly, a simple algorithm is used to add geometry to a mesh by subdividing the faces into smaller ones without changing the overall shape or volume.

In computer graphics, level of detail (LOD) refers to the complexity of a 3D model representation. LOD can be decreased as the model moves away from the viewer or according to other metrics such as object importance, viewpoint-relative speed or position. LOD techniques increase the efficiency of rendering by decreasing the workload on graphics pipeline stages, usually vertex transformations. The reduced visual quality of the model is often unnoticed because of the small effect on object appearance when distant or moving fast.

In 3D computer graphics, polygonal modeling is an approach for modeling objects by representing or approximating their surfaces using polygon meshes. Polygonal modeling is well suited to scanline rendering and is therefore the method of choice for real-time computer graphics. Alternate methods of representing 3D objects include NURBS surfaces, subdivision surfaces, and equation-based representations used in ray tracers.

<span class="mw-page-title-main">Geometry processing</span>

Geometry processing, or mesh processing, is an area of research that uses concepts from applied mathematics, computer science and engineering to design efficient algorithms for the acquisition, reconstruction, analysis, manipulation, simulation and transmission of complex 3D models. As the name implies, many of the concepts, data structures, and algorithms are directly analogous to signal processing and image processing. For example, where image smoothing might convolve an intensity signal with a blur kernel formed using the Laplace operator, geometric smoothing might be achieved by convolving a surface geometry with a blur kernel formed using the Laplace-Beltrami operator.

<span class="mw-page-title-main">Procedural generation</span> Method in which data is created algorithmically as opposed to manually

In computing, procedural generation is a method of creating data algorithmically as opposed to manually, typically through a combination of human-generated assets and algorithms coupled with computer-generated randomness and processing power. In computer graphics, it is commonly used to create textures and 3D models. In video games, it is used to automatically create large amounts of content in a game. Depending on the implementation, advantages of procedural generation can include smaller file sizes, larger amounts of content, and randomness for less predictable gameplay. Procedural generation is a branch of media synthesis.

<span class="mw-page-title-main">Lloyd's algorithm</span>

In electrical engineering and computer science, Lloyd's algorithm, also known as Voronoi iteration or relaxation, is an algorithm named after Stuart P. Lloyd for finding evenly spaced sets of points in subsets of Euclidean spaces and partitions of these subsets into well-shaped and uniformly sized convex cells. Like the closely related k-means clustering algorithm, it repeatedly finds the centroid of each set in the partition and then re-partitions the input according to which of these centroids is closest. In this setting, the mean operation is an integral over a region of space, and the nearest centroid operation results in Voronoi diagrams.

<span class="mw-page-title-main">Mesh generation</span> Subdivision of space into cells

Mesh generation is the practice of creating a mesh, a subdivision of a continuous geometric space into discrete geometric and topological cells. Often these cells form a simplicial complex. Usually the cells partition the geometric input domain. Mesh cells are used as discrete local approximations of the larger domain. Meshes are created by computer algorithms, often with human guidance through a GUI, depending on the complexity of the domain and the type of mesh desired. A typical goal is to create a mesh that accurately captures the input domain geometry, with high-quality (well-shaped) cells, and without so many cells as to make subsequent calculations intractable. The mesh should also be fine in areas that are important for the subsequent calculations.

<span class="mw-page-title-main">UV mapping</span> Process of projecting a 3D models surface to a 2D image for texture mapping

UV mapping is the 3D modeling process of projecting a 3D model's surface to a 2D image for texture mapping. The letters "U" and "V" denote the axes of the 2D texture because "X", "Y", and "Z" are already used to denote the axes of the 3D object in model space, while "W" is used in calculating quaternion rotations, a common operation in computer graphics.

<span class="mw-page-title-main">3D computer graphics</span> Graphics that use a three-dimensional representation of geometric data

3D computer graphics, sometimes called CGI, 3D-CGI or three-dimensional computer graphics are graphics that use a three-dimensional representation of geometric data that is stored in the computer for the purposes of performing calculations and rendering digital images, usually 2D images but sometimes 3D images. The resulting images may be stored for viewing later or displayed in real time.

<span class="mw-page-title-main">Geometric design</span>

Geometrical design (GD) is a branch of computational geometry. It deals with the construction and representation of free-form curves, surfaces, or volumes and is closely related to geometric modeling. Core problems are curve and surface modelling and representation. GD studies especially the construction and manipulation of curves and surfaces given by a set of points using polynomial, rational, piecewise polynomial, or piecewise rational methods. The most important instruments here are parametric curves and parametric surfaces, such as Bézier curves, spline curves and surfaces. An important non-parametric approach is the level-set method.

<span class="mw-page-title-main">3D reconstruction from multiple images</span> Creation of a 3D model from a set of images

3D reconstruction from multiple images is the creation of three-dimensional models from a set of images. It is the reverse process of obtaining 2D images from 3D scenes.

<span class="mw-page-title-main">Tessellation (computer graphics)</span> Computer graphics terminology

In computer graphics, tessellation is the dividing of datasets of polygons presenting objects in a scene into suitable structures for rendering. Especially for real-time rendering, data is tessellated into triangles, for example in OpenGL 4.0 and Direct3D 11.

<span class="mw-page-title-main">Parametric design</span> Engineering design method

Parametric design is a design method where features are shaped according to algorithmic processes, in contrast to being designed directly. In this method, parameters and rules determine the relationship between design intent and design response. The term parametric refers to input parameters fed into the algorithms.

This is a glossary of terms relating to computer graphics.

References

Further reading