Interactive Graphics Systems
Triangle meshes models
Triangle strips
If a triangle mesh is represented as a contiguous strip of
triangles, then the information needed (once the first triangle of
the strip is coded) is just a vertex and a bit per triangle. This is
a very compact representation, supported by OpenGL. There exist
efficient algorithms for triangle mesh conversion into triangle
strips. See El-Sana'00.
Compression and progressive transmission
There exist very efficient algorithms for mesh compression, optimizing the transmission time over the network, for instance. See Pajarola'99
Relationship between point models and volume models
As we have seen, a triangle mesh is usually represented with two lists or arrays: one for triangles and one for vertices. Every triangle has three vertex pointers (as other information like color), and each vertex is represented by its (x,y,z) coordinates.
A point cloud model is just an array or list of points. Each point may have additional information apart from its coordinates, such as color, normal vector, etc. The basic difference with triangle meshes is that there is no information about point connectivity.
A volume model (voxelization) is an array containing information on a regular N x N x N mesh of uniform cells that divide a universe cube in space. This mesh consists of cells, all having the same size, limited by mesh edges and vertices. There are a number of variants of volume models (encoding one or more objects using information of mesh vertices inside / outside object, encoding one or more objects using information of mesh vertices inside /outside object and information about intersection points and normal vectors between object surface and mesh edges, etc.). Here we focus on volume models that represent scalar fields, storing a scalar value in each mesh vertex: array [0..N, 0..N, 0..N] of float. A particular case of volume models that represent scalar fields is distances fields. In this case, the value stored at each mesh vertex is the value of the distance (signed or unsigned) to the object surface being represented. Instead, we say that a voxelization is binary if information stored in vertices is just in / out.
We can convert a triangle mesh in a point cloud simply removing the list of triangles. If the triangle mesh contains too large triangles, a more precise sampling that generates points inside triangles may help.
On the other side, converting a point model into a triangle mesh is not so trivial. This is called the reconstruction problem. There are several solutions, like Alpha Shapes algorithms (and derivatives from them), discrete membrane reduction-based algorithms or Hornung and Kobbelt algorithms, based on calculate the minimum cut of distances field delimited by a discrete crust. Point clouds can be operated and visualized, see for instance the PointShop project: www.pointshop.com
Calculate a volume model (field of distances) from a triangle mesh is not so complex. It needs the minimum distance from each point in the mesh to triangles of the mesh. This calculations can be accelerated by obtaining, in first place, the distance from cell's vertices that contain surface's triangles to the mesh itself, and then these values are extended to the rest of the vertices of the mesh.
There exist two classical algorithms that allow transforming a volume model to a triangle mesh: the Marching Cubes algorithm and the Dual Contouring algorithm. More information about these algorithms in section 2.5.
Volume models are often interesting as an intermediate model for performing some operations:
reconstructing surfaces from a point cloud
repair models of triangle meshes
simplification of models of triangle meshes (section 3.4)
Boolean operations between meshes
In
this section we are going to study a boolean operation algorithm
between two triangle meshes O1, O2. These meshes can be either open
or closed, but they must be oriented (triangles must have a
compatible orientation). The algorithm calculates a mesh containing
O1+ and O2+ (outer side of O1 which is external to O2, and
outer side of O2 which is external to O1), but the algorithms for
the rest of operations would be identical:
IniList (Ll1); IniList (Ll2); IniList (Ar1); IniList (Ar2)
for
each triangle t of O1 do
if
Intersects (t, O2) then
CalculateSubtriangles (t, O2, Ll) /* Calculates subtriangles
of t in O2+ and returns them to L1
Insert (Ll, Ll1 )
InsertPossiblyNonIntersectedEdge_of_t_if_InsideOfO2Plus (t, Ll, Ar1)
endif
endfor
while not empty ( Ar1) do
(a,t) := FirstEdge ( Ar1 )
r :=
ContiguousTriangle (t,a,O1)
if
NotPresent (r, Ll1) then
Insert (r, Ll1)
InsertRemainingEdgesOf_r (r, Ar1)
endif
endwhile
for each triangle t of O2 do
if Intersects (t, O1) then
CalculateSubtriangles (t, O1, Ll) /* Calculate subtriangles of
t in O1+ and returns them to Ll
Insert (Ll, Ll2 )
InsertPossiblyNonIntersectedEdge_of_t_if_InsideOfO1Plus (t, Ll, Ar2)
endif
endfor
while not empty ( Ar2) do
(a,t) := FirstEdge ( Ar2 )
r :=
ContiguousTriangle (t,a,O2)
if
NotPresent (r, Ll2) then
Insert (r, Ll2)
InsertRemainingEdgesOf_r (r, Ar2)
endif
endwhile
Comments:
Final mesh consists of all triangles of Ll1 and all triangles of Ll2.
Given a triangle t, the triangle which is contiguous to t going through an edge of t can be found easily, if data structure is extended adding to every vertex its corresponding face list.
The critical point of the algorithm is detecting if a triangle belonging to a mesh intersects the other mesh or not. We need the most efficient implementation possible. One of the best solutions consists of having an octree per mesh. Each terminal node of this octree contains a list of triangles intersecting the node's cube. Additionally, every triangle in the mesh has information about the list of nodes intersected (optionally, we can add to each vertex in the mesh a pointer to the node cointaining it).
It is assumed that a triangle r belongs to the list Ll1 if r or some piece of r intersected by the other mesh belongs to Ll1.
Some further reading
Cignoni,P., Ganovelli,F., Montani,C., Scopigno,R.,
"Reconstruction of Topologically Correct and Adaptive Trilinear
Isosurfaces", Computers and Graphics Vol. 24, 2000, pp 399-418
(Generation of triangle meshes from volumetric models of voxels. It
is an improvement of the Marching Cubes algorithm)
Vigo,M., Pla,N., Brunet,P., "Directional Adaptive Surface Triangulation", Computer-Aided Geometric Design, Vol. 16, 1999, pp 107-126 (Generation of triangle meshes from an isosurface, in an adaptive way, creating more triangles in more curved regions)
Zorin,D., Schroeder,P., Sweldens,W., "Interactive Multiresolution Mesh Editing", ACM Computer Graphics, Proc. of Siggraph 1997, pp 259-268 (Sophisticated algorithm for triangle mesh edition, featuring multiresolution for editing simplified versions of the model. Algorithm adds automatically details to edited model)
Kobbelt,L.P., Bareuther,T., Seidel,H-P., "Multiresolution Shape Deformations for Meshes with Dynamic Vertex Connectivity", Computer Graphics Forum Vol. 19 (3), Proc. of Eurographics'00, 2000, pp 249-259 (Very sophisiticated edition of triangle meshes, featuring multiresolution and dynamic edition of mesh structure)
Meek,D.S., Walton,D.J., "On Surface normal and Gaussian curvature approximations given data sampled from a smooth surface", Computer-Aided Geometric Design, Vol. 17, 2000, pp 521-543 (Calculating the normal vector and gaussian curvature in mesh-approximated surfaces)
Loop,C., "Smooth Subdivision Surfaces Based on Triangles", Master thesis, University of Utah, Dept. of Mathematics, 1987 (Triangle mesh subdivision algorithm). An improvement can be found at ACM Siggraph'1994 proceedings, p. 295-302: Hoppe, DeRose, Duchamp, McDonald, Schweitzer, Stuetzle, "Piecewise Smooth Surface Reconstruction"
Doo,D., and Sabin,M., "Behaviour of Recursive Division Surfaces near Extraordinay Points", Computer-Aided Design, Vol. 10 (6), 1978, pp 256-360 (Mesh subdivision algorithm, non strictly triangular)
Taubin,G., "A Signal Processing Approach to fair Surface Design", ACM Computer Graphics, Proc. of Siggraph 1995, pp 351-358 (Mesh smoothing, noise removal)
El-Sana,J., Evans,F., Kalaiah,A., Varshney,A., Skiena,S., Azanli,E., "Efficient Computing and Updating Triangle Strips for Real-Time Rendering", Computer-Aided Design Vol. 32 (13), 2000, pp 753-772 (Simplification of triangle meshes and efficient generation of triangle strips)
Pajarola,R., Rossignac,J., Szymczak,A., "Implant Sprays: Compression of Progressive Tetrahedral Meshes", Proc. of IEEE Visualization, 1999 (Very efficient compression and transmission of triangle meshes)