Game Development Reference
In-Depth Information
Figure 14.7 Reconstruction of the subsoil of the Morges region. (Illustration: INRIA/Prisme, with
permission)
the subsoil of the region of Morges in the Alps using a digital terrain model and a
certain number of sections. Meshes are used essentially to represent the real (acquired
data) rather than for design activities. Generally, the adaptive structures are not used
as models but as an intermediate step for calculation, mainly for the calculations of
intersection. The visual rendering of solid models requires either a conversion into
a surface model or using special techniques like the OpenGL Volumizer software
(http://www.sgi.com/software/volumizer).
14.2.2 Constructive solid geometry
CSG becomes a special modelling technique because it does not prejudge the real
representation. It can be used along with surface primitives, even though the surface
resulting from the intersection of a sphere and a cube will be difficult to calculate. Here,
we are interested in CSG as a representation of an object in 3D. Thus we consider a
set E of geometric primitives, made up of, for instance, balls, blocks, tori, etc. We can
also include the volumes obtained by extrusion or scanning in E , it does not have any
effect on the theoretical model. The field of constructible volumes is thus the set D
generated by E
.
The CSG primitives are widely used in CAD to create the shapes of parts. Though
most of the commercial 3D-modelling softwares support the CSG, povray software
(http://www.povray.org) of the public domain is one of the rare rendering softwares
that use it natively. It is very easy to create models of CSG objects using the script
language. The following example shows the creation of a boxwith three holes, of which
one hole is filled with a cylinder 1 The CSG tree related to the file is shown in figure 14.8.
{0} and the set-theory operators
,
and
1 In povray language, when two geometric primitives are used one after the other, they are
implicitly connected by the union operator.