Presentation is loading. Please wait.

Presentation is loading. Please wait.

Surface Approximation with Triangle Meshes

Similar presentations


Presentation on theme: "Surface Approximation with Triangle Meshes"— Presentation transcript:

1 Surface Approximation with Triangle Meshes
1

2 Outline Classification of surfaces
Approximating surfaces with triangle meshes Encoding triangle meshes Compressed mesh representations 2

3 What is a surface? A surface S embedded in space is a subset of R3 that is intrinsically two-dimensional For any neighborhood uP of a point P on S uP contains at least half of an open disk (i.e., no part of S is less than two-dimensional) uP does not contain any open ball (i.e., no part of S is solid) 2

4 Surface Modeling Surfaces defined in the continuum:
Sources: mathematics, CAD Problem: a finite (digital) representation is necessary for surface analysis and rendering Surfaces known at a finite set of points: Source: sampling (range scanners, photogrammetry, medical data), simulation (finite element methods) Problem: a surface in the continuum must be defined through a reconstruction process 3

5 Topological Characterization of Surfaces
Manifold without boundary a surface S in R3 such that any point on S has an open neighborhood homeomorphic to an open disk in R2 3

6 ...Topological Characterization of Surfaces...
Manifold with boundary a surface S in R3 such that any point on S has an open neighborhood homeomorphic to an open disk or to half an open disk in R2 3

7 ...Topological Characterization of Surfaces...
An example of a non-manifold situation 3

8 Geometric Representation of Surfaces
Implicit form: an implicit surface is the locus of solutions of an equation F(x,y,z) = 0 where F is a mathematical expression of three variables Problems: definition is too general: some expressions give objects that are not intrinsically two-dimensional we might not know expression F(x,y,z) even if we know F, we might not be able to solve the equation Remark: surfaces which cannot be described in an analytic form are called free-form surfaces 3

9 ...Geometric Representation of Surfaces...
Parametric form: a parametric patch is the image of a continuous function y: W R R3 W is called parametric space R3 is called physical space boundaries of W and of y(W) are formed by trimming curves

10 ...Geometric Representation of Surfaces...
Parametric surface: a collection of parametric patches properly abutting

11 ...Geometric Representation of Surfaces...
Explicit surfaces: Special case of a parametric surface A surface can be represented as a bivariate function when it is the image of a scalar field f: W R R Example: topographic surfaces 8

12 Hypersurfaces Generalization of explicit surfaces to higher dimensions Image of a scalar field f: W R where W is a compact domain in Rk Example: volume data (for k=3) 8

13 Approximating surfaces with triangle meshes
Surface representation: mesh of triangles (i.e., a set of triangles such that any two of them either do not intersect or share a common edge or vertex) Each triangle approximates a surface patch within a given accuracy Triangle meshes are easy to represent, manipulate, visualize Triangle meshes can be constructed from irregularly sampled data 8

14 Approximating a 2-dimensional scalar field with a triangle mesh
K=2: A 2-dimensional scalar field is described as a function z = f(x,y) A triangle meshes in 3D is obtained by triangulating the domain of f and lifting it to three-dimensional space 8

15 Approximating a 3-dimensional scalar field with a tetrahedral mesh
k=3: A 3-dimensional scalar field is defined by a function z = f(x1,x2,x3) An approximation is obtained by discretizing the domain of f with a tetrahedral mesh A tetrahedral mesh is a set of tetrahedra such that any two of them either do not intersect or share a common face, edge or vertex 8

16 Approximating a k-dimensional scalar field with a simplicial mesh
Discretization of the domain of a k-dimensional field z = f(x1,x2,…,xk) with a simplicial mesh Defines a linear approximation of f in (k+1)-dimensional Euclidean space 8

17 How to compute the approximation?
How well does a mesh approximate a given surface? We are not given surfaces but mesh of triangles for free-form surfaces set of points at which the field is known for scalar fields (hypersurfaces) 8

18 dE (P,Q) = sup { d(p,Q) | p in P }
The Error Metric Euclidean distance between a point p and a set Q Rk: d(p,Q) = inf { d(p,q) | q in Q } where d(p,q) is the Euclidean distance between point p and q “Distance” from a set P to a set Q dE (P,Q) = sup { d(p,Q) | p in P } However dE(P,Q) <> dE (Q,P) P Q dE(P,Q) dE (Q,P) 8

19 dH (P,Q) = max { dE (P,Q), dE (Q,P) }
...The Error Metric... Hausdorff distance defined as: dH (P,Q) = max { dE (P,Q), dE (Q,P) } It follows that dH (P,Q) = 0 iff P = Q Thus, we can express the distance between a surface S and its approximating triangle mesh T as dH (S,T) 8

20 ...How to compute the approximation?
Free-form surfaces: Surface S given as a fine mesh of triangles TS ==> we measure distance between two triangle meshes Hypersurfaces: Scalar field f is known at a finite set of points Q ==> we measure the distance of the points of Q from the triangle mesh T approximating the hypersurface 8

21 ...The Error Metric... The Metro tool [Cignoni et al. 98]
Given two triangular meshes T1 and T2 , Metro : scan converts each triangle t of T1 with a user-selected scan step, or, alternatively, chooses a set P of points distributed randomly on t for each point p in P, computes d(p,T2) (distances are computed efficiently using a bucketing data structure) and switches meshes to be symmetric. precision of the evaluation depends on sampling resolution ! with a sufficiently fine sampling step, almost equal results in both directions (e.g., 0.01% of mesh bounding box diagonal)

22 ...The Error Metric... Metro returns
accurate numerical distance estimation a visual representation of the approximation error tool runs on SGI ws (OpenInventor) available in public domain

23 ...The Error Metric... Approximating the error on scalar fields
Error of a point p of set Q defined as e(p) = | f (p) - fT (p) | where f (p) is the known value of the field at p fT (p) is the approximated value of the field at p computed on the basis of simplicial mesh T 8

24 ...The Error Metric... Error function defined by a discrete norm:
E(T,Q) = || e(p) || E(T,Q) = max {e(p), p Q } Example: two-dimensional scalar field (terrain) 8

25 Remarks Tradeoff between accuracy and space / time:
More accurate representation ==> more triangles More triangles ==> higher storage and processing time Tradeoff between accuracy and space / time: adapting the accuracy to the needs of an application can improve efficiency accuracy might be variable over different portions of the object 8

26 Encoding Triangle Meshes
Two types of information encoded: Geometrical position in space of the vertices surface normals at the vertices Topological mesh connectivity information relations among triangles of the mesh 8

27 Data Structures for Triangle Meshes
List of triangles: it encodes the list of triangles of the mesh for each triangle, it maintains its three vertices by explicitly encoding the geometrical information associated with the vertices (position in space of the vertices, and, usually, surface normals at the vertices) connectivity described through a relation between a triangle and all its vertices. Drawback: each vertex is repeated for all triangles incident in it Storage cost: in a triangle mesh with n vertices, there are ~2n triangles cost: 18n floats, if geometric information associated with a vertex is just its position in space 8

28 ...Data Structures for Triangle Meshes...
Indexed data structure: list of vertices + list of triangles + relation between triangles and vertices for each vertex: its geometrical information for each triangle: three references to the list of vertices Storage cost: 6n log n bits + 3n floats (cost of storing geometrical information) since a vertex reference for a triangle requires log n bits 8

29 ...Data Structures for Triangle Meshes...
Indexed data structure: difficult to obtain triangle adjacency information Triangle adjacencies are useful for algorithms which “navigate” a triangle mesh Idea: store, for each triangle, the indexes to its three edge-adjacent triangles as well t t1 t2 t3 P1 P2 P3 8

30 ...Data Structures for Triangle Meshes...
Indexed data structure with adjacencies: list of vertices (with their geometrical information) + list of triangles for each triangle: references to its three vertices + references to its three adjacent triangles t t1 t2 t3 P1 P2 P3 t: (P1,P2,P3) (t1, t2, t3) Storage cost: (12n log n + 6n) bits + 3n floats (cost of storing geometrical information), since each triangle reference requires (log n + 1) bits 8

31 ...Data Structures for Triangle Meshes...
Comparison of the three data structures n = number of vertices, let one float = 32 bits list of triangles: 18n floats if n = 216 ==> 18*216 floats = 578*216 bits indexed data structure: 6n log n bits + 3n floats if n = 216 ==> 96*216 bits+ 3*216 floats = 150*216 bits indexed data structure with adjacencies: (12n log n + 6n) bits+ 3n floats if n = 216 ==> 198*216 bits + 3*216 floats = 252*216 bits 8

32 Data Structures for Tetrahedral Meshes
Direct extension to three dimensions of the data structures described for triangle meshes Basic elements: vertices + tetrahedra list of tetrahedra indexed structure indexed structure with adjacencies 8

33 ...Data Structures for Tetrahedral Meshes...
List of tetrahedra with their geometry inside the list Storage cost: 12t, where t is the number of tetrahedra Indexed structure (each tetrahedron has references to its four vertices) 4t log n bits + cost for storing geometric information where n is the number of vertices 8

34 ...Data Structures for Tetrahedral Meshes...
Indexed structure with adjacencies: for each tetrahedron, references to its four vertices + references to its four face-adjacent tetrahedra Storage cost: 4t (log n + logt) bits + cost of storing geometric information 8

35 Why Geometric Compression?
Availability of large geometric datasets in mechanical CAD, virtual reality, medical imaging, scientific visualization, geographic information systems, etc. Need for speeding up transmission of geometric models reducing the costs of memory and of auxiliary storage required by such models enhancing rendering performances: limitations on on-board memory and on data transfer speed 8

36 ...Why Geometric Compression?...
Compression methods aimed at two complementary tasks: compression of geometry: efficient encoding of numerical information attached to the vertices, i.e., position, surface normal, color, texture parameters compression of mesh connectivity: efficient encoding of the mesh topology Compression methods developed for triangle meshes 8

37 Compression of Geometry (Deering, 1995; Chow, 1997)
Positions, normals and colors quantized to significantly fewer than 32 bits (single-precision IEEE floating point) with little loss in visual quality Example: quantization for position information: normalising object geometry to a unit cube positions quantized to q bits (q<=16) by truncating the less significant m bits of position components, where m=16-q Optimizations: positions are "delta-encoded", i.e., just the difference between a vertex position and that of its predecessor in the bitstream is encoded quantization assignment can be done by partitioning the triangle mesh into parts of similar detail based on triangle size and curvature 8

38 Compression of Connectivity
Two kinds of compression techniques: Direct techniques: goal: minimize the number of bits needed to encode connectivity Progressive techniques: goal: an interrupted bitstream must provide a description of the whole object at a lower level of detail 8

39 Direct Methods Triangle strips (and triangle fans) used in graphics API (e.g., OpenGL) Generalized triangle meshes (Deering 1995; Evans et al., 1996; Chow, 1997) Topological surgery (Taubin and Rossignac, 1996) Sequence of triangles in a shelling order (De Floriani, Magillo and Puppo, 1998) 8

40 ...Direct Methods... Triangle Strips
Defined as a collection of sequences of vertices Each triangle in a strip has its vertices at three consecutive positions Encoding: number and lengths of the strips two vertex references per strip one vertex reference per triangle 7 6 5 4 3 Drawbacks: each vertex must be encoded twice on average it is difficult to obtain few long strips from a generic mesh [Evans et al., 1996] 2 1 8

41 ...Direct Methods... Generalized Triangle Meshes (Deering, 1995)
Definition of a new syntax for a generalized strip Use of a mesh buffer: a queue of maximum length 16 of previously used vertices Encoding: one bit per vertex to indicate whether the vertex must be inserted into the mesh buffer two bits per triangle to indicate how to continue the current strip (four possible codes) one bit per triangle to indicate whether a new vertex should be read or a vertex from the mesh buffer must be used 4 bits of address to access a vertex of the mesh buffer Cost: ~11 bits per vertex for connectivity 8

42 ...Direct Methods... Generalized Triangle Meshes Example: R = Restart
RO = Replace Oldest RM = Replace Middle P = Push number = vertex index in mesh -number = vertex index in buffer (from top) R 6 P RO 1 RO 7 P RO 2 RO 3 RM 4 RM 8 P RO 5 RO 9 P RO 10 RM 11 RM 17 P RM 16 P RM -3 RO 15 P RM -5 RO 6 RM 14 P RO 13 RM -9 RO 12 RM 18 P RM -3 RO 15 P RO -5 RO 6 RM 14 P RO 13 P RM -9 RO 23 RO -10 RO -7 RM 30 RM 29 RM 28 RM -1 RO -2 RM -3 RM 27 RO 26 RM -4 RO 25 RO -5 8

43 ...Direct Methods... Topological Surgery (Taubin and Rossignac, 1996)
Vertex spanning tree formed by selecting the minimum number of edges in the input mesh which connect all its vertices The edges of the vertex spanning tree decompose the mesh into a collection of non-overlapping triangle strips Such triangle strips form a spanning tree of the triangles of the mesh 8

44 ...Direct Methods... Topological Surgery Example: 8

45 ...Direct Methods... Topological Surgery
Encoding structure: vertex + triangle spanning trees Order imposed on the vertices by the spanning tree exploited for computing estimates of the position of a vertex from the position of its 3 or 4 ancestors in the tree Cost: between 2.5 and 7 bits per vertex to encode connectivity Drawbacks: decompression stage complicated by large memory requirements (all information must be kept in main memory when reconstructing the mesh) difficult to implement 8

46 ...Direct Methods... A Compression Method based on Shelling
(De Floriani, Magillo and Puppo, 1998) Based on a shelling order: a sequence of all the triangles in the mesh with the property that the boundary of the set of triangles corresponding to any subsequence forms a simple polygon The compression algorithm works for every triangulated surface homeomorphic to a sphere or a disk Encoding: four 2-bits codes per edge: SKIP, VERTEX, LEFT, RIGHT 8

47 ...Direct Methods... A Compression Method based on Shelling
Start from an arbitrary triangle, whose boundary forms the current polygon Loop on the edges of the current polygon: for each edge e: try to add the triangle t externally adjacent to e if successful, update the current polygon in any case, send a code when necessary, send a vertex 8

48 ...Direct Methods... A Compression Method based on Shelling
if t brings a new vertex ==> VERTEX + vertex coordinates if t does not exist or cannot be added ==> SKIP 8

49 ...Direct Methods... A Compression Method based on Shelling
if t shares the polygon edge to the left of e ==> LEFT if t shares the polygon edge to the right of e ==> RIGHT 8

50 ...Direct Methods... A Compression Method based on Shelling
Properties of the Shelling Method Every vertex is encoded only once Each edge is examined at most once Compression and decompression algorithms: work in time linear in the size of the mesh no numerical computations conceptually simple and easy to implement Adjacencies between triangles are reconstructed directly from the sequence at no additional cost Cost: in theory: at most 6 bits of connectivity per vertex in practice: less than 4.5 bits of connectivity per vertex 8

51 ...Sequence of Triangles in a Shelling Order...
Experimental Results (on TINs) Exp #vert #tri #code bits compress. decompr. bits /vert time(tri/s) time(tri/s) U (51879) (35331) U (52483) (35271) U (53899) (35174) U (56930) (35172) A (54099) (35749) A (53894) (35455) A (53877) (35545) A (53798) (35275) B (58076) (35469) B (58292) (35581) B (57892) (35421) B (58149) (35305) U1--4: uniform resolution (in decreasing order) A1--4: one fourth of the area is at high resolution, the rest is coarse B1--4: one 16th of the area is at high resolution, the rest is coarse

52 ...Direct Methods... A Compression Method based on Shelling
The method generalizes to surfaces with arbitrary genus The algorithm automatically cuts the surface into simply connected meshes with a small overhead No additional control codes required Cost: less than 5.5 bits of connectivity per vertex 8

53 Progressive Compression
Efficient encoding of the mesh produced by a simplification algorithm A sequence of progressive LODs generated by iteratively applying a destructive operator which removes details from a mesh An inverse constructive operator recovers such details Encoding: coarsest mesh produced in the simplification process + sequence of construction operations 8

54 ...Progressive Compression...
Each LOD can be seen as a form of lossy compression of the original mesh There is a trade-off between loading/transmission times and loss of detail Compression rates are usually lower than those achieved by direct techniques 8

55 ...Progressive Compression...
Progressive Compression Methods Progressive meshes (Hoppe, 1996) destructive operator = edge collapse Sequence of edge swaps (De Floriani, Magillo and Puppo, 1998) destructive operator = vertex removal Sequence of ordered vertex sequences (Snoeyink and van Kreveld, 1997) destructive operator = removal of a set of vertices 8

56 ...Progressive Compression...
Progressive Meshes (Hoppe, 1996) Edge collapse: replace an edge e with a vertex v and the two triangles sharing e with two edges incident at v Vertex split (inverse operation): expand a vertex v1 into an edge e=v1v2 and two edges e1 and e2 among those incident at v1 into two triangles e1 v1 e v1 v2 e2 8

57 ...Progressive Compression...
Progressive Meshes (Hoppe, 1996) Encoding: new vertex v2 reference to v1 code specifying the position of e1 and e2 in the set of edges incident at v2 Cost: n(log n + log(b(b-1))) bits of connectivity, where b = maximum degree of a vertex at any step for instance, for n=216 and b=23 ==> about 21.8*216 bits of connectivity 8

58 ...Progressive Compression...
Sequence of Edge Swaps (De Floriani, Magillo, Puppo, 1998) Based on the iterative removal of a vertex of bounded degree (less than a constant b) selected according to an error-based criterion: the vertex which causes the least increase in the approximation error is always chosen The polygonal hole P left by removing vertex v is retriangulated The inverse constructive operator inserts vertex v and recovers the previous triangulation of P 8

59 ...Progressive Compression...
Sequence of Edge Swaps The old triangulation T is recovered from the new one T' by first splitting the triangle t of T' containing vertex v and then applying a sequence of edge swaps T’ T 8

60 ...Progressive Compression...
Sequence of Edge Swaps Encoding: for each removed vertex v: a vertex w and an integer number indicating a triangle around w (they define the triangle t of T' containing v) the packed sequence of edge swap which generates T from T' T’ Vertex: w Triangle index: 0 Swap sequence: 2 0 2 T 8

61 ...Progressive Compression...
Sequence of Edge Swaps Cost: n(log n +log b+ log((b-1)!)-1 bits of connectivity information for instance, for n=216 and b=23 ==> about 31.4*216 bits of connectivity Properties: adaptivity to LOD generation is good since the vertices are removed by taking into account the accuracy of the resulting approximation the criterion used in the retriangulation is encoded in the sequence of swaps: more general than other progressive methods 8

62 ...Progressive Compression...
Snoeyink and van Kreveld's Method It applies to Triangulated Irregular Networks (TINs) based on Delaunay triangulation Delaunay triangulation: a triangulation is called a Delaunay triangulation if the circumcircle of any of its triangles does not contain any vertex in its interior 8

63 ...Progressive Compression...
Snoeyink and van Kreveld's Method LOD generation process: at each step, a maximal set of independent vertices (i.e., vertices which are not connected by an edge) of bounded degree is removed The process of removing a set of vertices terminates in a logarithmic number of steps 8

64 ...Progressive Compression...
Snoeyink and van Kreveld's Method Encoding: the vertices removed at the same step form a sorted sequence each sequence terminates with an end-of-phase code Cost: just log2 n bits to encode connectivity Compression and decompression methods: work in asymptotic linear time are quite involved and require heavy numerical computations (a Delaunay triangulation must be computed when decompressing) Only suitable for Delaunay triangulation No experimental results reported 8


Download ppt "Surface Approximation with Triangle Meshes"

Similar presentations


Ads by Google