# 1 SSD99 Tutorial Multiresolution in Terrain Modeling Leila De Floriani, Enrico Puppo University of Genova Genova (Italy)

## Presentation on theme: "1 SSD99 Tutorial Multiresolution in Terrain Modeling Leila De Floriani, Enrico Puppo University of Genova Genova (Italy)"— Presentation transcript:

1 SSD99 Tutorial Multiresolution in Terrain Modeling Leila De Floriani, Enrico Puppo University of Genova Genova (Italy)

2 SSD99 Tutorial Outline o Generalities on Terrain Models o Data Structures o Compression Techniques o Algorithms for Terrain Generalization o Multiresolution Representations: mA general framework for multiresolution mClassification and review of multiresolution models o Applications

3 SSD99 Tutorial Terrain Data o Elevation data are given at a finite set of points in a geo- referenced domain m2D locations + elevation define a sample data set o Points can be: mregularly spaced in the x and y coordinates mirregularly distributed o Terrain data acquisition mGround survey methods using electronic tacheometers mPhotogrammetric methods working on aerial and satellite images mSAR interferometry mDigitization of existing contour maps (through contour following)

4 SSD99 Tutorial Digital Terrain Model (DTM) o A terrain can be modeled in the continuous as a surface described by a function z=f(x,y) defined in a two-dimensional domain D o DTM: discrete model of a terrain based on a given set of elevation data o DTM characterized by ma subdivision of the domain into two-dimensional cells (usually with vertices at the sample points) ma collection of interpolating functions defined at cells of the subdivision

5 SSD99 Tutorial Classification of DTMs o Classification based on the topology of the underlying subdivision: mRegular Square Grids (RSGs) mTriangulated Irregular Networks (TINs)

6 SSD99 Tutorial Regular Square Grids (RSGs) o The domain subdivision is a rectangular grid o For each rectangle r in the grid: melevations of vertices of r are interpolated by linear functions along each edge of r ma bilinear function is obtained as the tensor product of such four linear functions s Straightforward data structures and manipulation techniques t Only regularly spaced data  resampling required t Not adaptive to characteristics of the surface  massive data sets at high resolution are necessary to achieve accuracy

7 SSD99 Tutorial Triangulated Irregular Networks (TINs) o The domain subdivision is a triangulation o For each triangle t, elevations of its three vertices are interpolated by a linear function s Capability of adapting to the roughness of terrain (adaptive models) s Possibility of explicitly including relevant points (peaks and pits) and lines (ridges and valleys) s Ease of update t More complex data structures and manipulation techniques

8 SSD99 Tutorial Data Structures

9 SSD99 Tutorial Data Structures for RSGs o The basic data structure is a rectangular matrix (raster) of elevation values: mGeographic coordinates of each entry are computed directly from its position in the matrix mElevation is given by the value stored at the entry o More sophisticated data structures are inherited from the literature on digital images for: mCompression mBlock decomposition mHierarchical decomposition

10 SSD99 Tutorial Data Structures for TINs Two types of information encoded: o Geometrical mposition in space of the vertices msurface normals at the vertices (optional) o Topological mmesh connectivity madjacency relations among triangles of the mesh (optional)

11 SSD99 Tutorial...Data Structures for TINs... List of triangles: mIt maintains an explicit list of triangles composing the mesh mFor each triangle, it maintains its three vertices by explicitly encoding the geometrical information associated with the vertices mConnectivity described through a relation between a triangle and all its vertices o Drawback: mEach vertex is repeated for all triangles incident in it o Storage cost: mIn a triangle mesh with n vertices, there are about 2n triangles mTotal cost of data structure: about 18n floats, if geometric information associated with a vertex is just its position in space

12 SSD99 Tutorial...Data Structures for TINs... Indexed data structure: mList of vertices + list of triangles + relation between triangles and vertices mFor each vertex: its geometrical information mFor each triangle: references to its three vertices o Drawback: mNo adjacency information o Storage cost: 6n log n bits + 3n floats (cost of storing geometrical information) since a vertex reference for a triangle requires log n bits

13 SSD99 Tutorial...Data Structures for TINs... Indexed data structure with adjacencies: mlist of vertices (with their geometrical information) + list of triangles mfor each triangle: references to its three vertices + references to its three adjacent triangles o Storage cost: (12n log n + 6n) bits + 3n floats (cost of storing geometrical information), since each triangle reference requires (log n + 1) bits t t1t1 t2t2 t3t3 P1P1 P2P2 P3P3 t: (P 1,P 2,P 3 ) (t 1, t 2, t 3 )

14 SSD99 Tutorial...Data Structures for TINs... Comparison of the three data structures: n = number of vertices, let one float = 32 bits mlist of triangles: 18n floats Gif n = 2 16 ==> 18*2 16 floats = 578*2 16 bits mindexed data structure: 6n log n bits + 3n floats Gif n = 2 16 ==> 96*2 16 bits+ 3*2 16 floats = 150*2 16 bits mindexed data structure with adjacencies: (12n log n + 6n) bits+ 3n floats Gif n = 2 16 ==> 198*2 16 bits + 3*2 16 floats = 252*2 16 bits

15 SSD99 Tutorial Compression Techniques

16 SSD99 Tutorial Why Terrain Compression? o Availability of large terrain datasets in Geographic Information Systems o Need for: mFaster transmission of terrain models mFaster I/O of terrain models from/to disk mEnhanced rendering performances: limitations on on-board memory and on data transfer speed mLower costs of memory and of auxiliary storage o Objective: mdesign compact structures for encoding a terrain model as a sequence of bits (bitstream)

17 SSD99 Tutorial...Why Terrain Compression?... o Compression methods for TINs aimed at two complementary tasks: mCompression of geometry: efficient encoding of numerical information attached to the vertices, i.e., position, surface normal, color, texture parameters mCompression of mesh connectivity: efficient encoding of the mesh topology

18 SSD99 Tutorial Compression of Geometry [Deering, 1995; Chow, 1997] o Positions, normals and scalar attributes quantized to significantly fewer than 32 bits (single-precision IEEE floating point) with little loss in accuracy o Example: quantization for position information: mGeometry normalized to a unit cube mPositions quantized by truncating the less significant bits of position components o Optimizations: mPositions are "delta-encoded”: just the difference between a vertex position and that of its predecessor in the bitstream is encoded mQuantization assignment can be done by partitioning the triangle mesh into parts of similar detail based on triangle size and curvature

19 SSD99 Tutorial Compression of Connectivity Two kinds of compression techniques: o Direct techniques: Goal: minimizing the number of bits needed to encode connectivity o Progressive techniques: Goal: an interrupted bitstream provides a description of the whole terrain at a lower level of detail

20 SSD99 Tutorial Direct Methods Compression methods for rendering: o Triangle strips (and triangle fans) used in graphics API (e.g., OpenGL) o Generalized triangle meshes [Deering 1995; Evans et al., 1996; Chow, 1997; Bar Yehuda and Gotsman 1996] o Topological surgery [Taubin and Rossignac, 1996] A compression method for transmission: o Sequence of triangles in a shelling order [De Floriani, Magillo and Puppo, 1998]

21 SSD99 Tutorial...Direct Methods... Triangle Strips o Each strip is a sequences of vertices o Each triangle in a strip has its vertices at three consecutive positions o A TIN is encoded as a collection of strips o Drawbacks: mEach vertex is encoded twice on average mIt is difficult to obtain a small number of long strips [Evans et al., 1996] 1 2 3 4 5 6 7..

22 SSD99 Tutorial...Direct Methods... Generalized Triangle Meshes [Deering, 1995] o Sequence of vertices with alternate strip-like and fan-like behavior o Behavior at each vertex specified by a bit code o A small buffer allows to reuse some past vertices (indexing) o A TIN is encoded as a collection of generalized strips o Cost: ~11 bits per vertex for connectivity 1 2 3 4 5 6 7.. 2 6 5 1 4 3 Strip-like (zig-zag) Fan-like (turning)

23 SSD99 Tutorial...Direct Methods... Topological Surgery [Taubin and Rossignac, 1996] o It cuts a mesh and opens into a connected set of triangles shaped as a tree (triangle spanning tree) o The edges along which the mesh is cut form another tree (vertex spanning tree) o The bitstream produced by the method contains the two trees o Compression/decompression algorithms are rather complicated

24 SSD99 Tutorial...Direct Methods... A Compression Method based on Shelling [De Floriani, Magillo and Puppo, 1998] o 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 proper subsequence forms a simple polygon o Encoding: four 2-bits codes per edge: SKIP, VERTEX, LEFT, RIGHT

25 SSD99 Tutorial...Direct Methods......A Compression Method based on Shelling... o Initialize current polygon at an arbitrary triangle of the TIN o Loop on the edges of the current polygon, and for each edge e try to add the triangle t externally adjacent to e : mif t contains a new vertex, send a VERTEX code and vertex information mif t is bounded by the edge either preceding or following e on the current polygon, then send either a LEFT or a RIGHT code mif t either cannot be added or does not exist, then send a SKIP code

26 SSD99 Tutorial...Direct Methods...

27 SSD99 Tutorial...Direct Methods... o Properties of the Shelling Method: mEvery vertex is encoded only once mEach edge is examined at most once mCompression and decompression algorithms: Gfast Gno numerical computations Gconceptually simple and easy to implement mAdjacencies between triangles are reconstructed directly from the sequence at no additional cost mCost: Gin theory: at most 6 bits of connectivity per vertex Gin practice: less than 4.5 bits of connectivity per vertex

28 SSD99 Tutorial...Direct Methods... Experimental Results: Exp #vert #tri #code bits compression bits /vert time(tri/s) U1 42943 85290 182674 4.2538 1.644(51879) U2 28510 56540 123086 4.3173 1.077(52483) U3 13057 25818 57316 4.3897 0.479(53899) U4 6221 12240 27180 4.3690 0.215(56930)

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

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

31 SSD99 Tutorial...Progressive Compression... Progressive Compression Methods o Progressive meshes [Hoppe, 1996] mdestructive operator = edge collapse o Sequence of edge swaps [De Floriani, Magillo and Puppo, 1998] mdestructive operator = vertex removal o Sequence of ordered vertex sequences [Snoeyink and van Kreveld, 1997] mdestructive operator = removal of a set of vertices

32 SSD99 Tutorial...Progressive Compression... Progressive Meshes [Hoppe, 1996] o Edge collapse: mreplace an edge e with a vertex v1 and the two triangles sharing e with two edges incident at v1 o Vertex split (inverse operation): mexpand a vertex v1 into an edge e=v1v2 and two edges e1 and e2 among those incident at v1 into two triangles v1 v2 e1 e2 e

33 SSD99 Tutorial...Progressive Compression... Progressive Meshes [Hoppe, 1996] o Encoding: mnew vertex v2 mreference to v1 mcode specifying the position of e1 and e2 in the set of edges incident at v1 o Properties: msuitable to support geomorphing o Cost: mn(log n + log(b(b-1))) bits of connectivity, where b = maximum degree of a vertex at any step mfor instance, for n=2 16 and b=2 3 ==> about 21.8*2 16 bits of connectivity

34 SSD99 Tutorial...Progressive Compression... Sequence of Edge Swaps [De Floriani, Magillo, Puppo, 1998] o Based on the iterative removal of a vertex of bounded degree (less than a constant b) selected according to an error-based criterion: mThe vertex which causes the smallest loss of accuracy (least relevant detail) is always selected  The polygonal hole  left by removing vertex v is re- triangulated  The inverse constructive operator inserts vertex v and recovers the previous triangulation of 

35 SSD99 Tutorial Sequence of Edge Swaps o 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...Progressive Compression... T T’

36 SSD99 Tutorial...Progressive Compression... Sequence of Edge Swaps o Information encoded for each removed vertex v: ma vertex w and an index indicating a triangle around w (they define the triangle t of T' containing v) mthe packed sequence of edge swap which generates T from T' T Vertex: w Triangle index: 0 Swap sequence: 2 0 2

37 SSD99 Tutorial...Progressive Compression... Sequence of Edge Swaps o Cost: mn(log n +log b+ log((b-1)!)-1) bits of connectivity information mfor instance, for n=2 16 and b=2 3 ==> about 31.4*2 16 bits of connectivity o Properties: mThe criterion used in the re-triangulation is encoded in the sequence of swaps: more general than other progressive methods mSuitable to encode TINs based on Delaunay triangulations, data dependent triangulations, constrained triangulations, etc.

38 SSD99 Tutorial...Progressive Compression... Snoeyink and van Kreveld's Method o It applies to TINs based on Delaunay triangulation  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 o The process of removing a set of vertices terminates in a logarithmic number of steps

39 SSD99 Tutorial...Progressive Compression... Snoeyink and van Kreveld's Method o Encoding: mthe vertices removed at the same step form a sorted sequence meach sequence terminates with an end-of-phase code o Cost: at most log 2 n bits to encode connectivity o Compression and decompression methods are quite involved and require heavy numerical computations (a Delaunay triangulation must be computed when decompressing) o Only suitable for Delaunay triangulation

40 SSD99 Tutorial Algorithms for Terrain Generalization

41 SSD99 Tutorial Why Terrain Generalization? o Terrain models at high resolution are often too large to be processed: mModels must fit into computer memory mProcessing time must be reasonable o Performance may be critical: mTerrain visualization needs real time rendering mSome tasks in terrain analysis are computationally expensive (e.g., watershed, viewshed) o Not all tasks need a model at the same accuracy

42 SSD99 Tutorial...Why Terrain Generalization?... o More accurate representation  more cells o More cells  higher storage requirements and processing time o Objective of generalization: find an optimal trade-off between the size of a model and its accuracy

43 SSD99 Tutorial Terrain generalization o Problem Statement : given a terrain model [either an RSG or a TIN], find a TIN representing the same terrain and having smaller size and a small approximation error o Major issues: msize / accuracy ratio mshape of cells in the generalized model (no slivers!)

44 SSD99 Tutorial Approximation error o Approximation of a terrain with a TIN: each triangle approximates a portion of terrain within a given accuracy mGiven a sample data set, each triangle of the TIN approximates the portion of terrain spanned by points whose projections lie within the projection of the triangle mError at a point is measured by distance from its vertical projection on the triangle

45 SSD99 Tutorial...Approximation error... o Errors at all points in the sample data set are combined to define the accuracy of approximation o Different combinations may be used for different needs: mMaximum error over all points mAverage error mRoot Mean Square error o Other criteria may be used: difference in volume, curvature, surface normal, etc...

46 SSD99 Tutorial Triangle quality measures o A TIN should have triangles as much compact as possible o Elongated triangles (slivers) cause numerical errors and unpleasant visual effects o Compactness of a triangle [Gueziec, 1995]: where A is the area and l 0, l 1, l 2 are edge lengths. o Compactness is 1 for an equilateral triangle and decreases while a triangle becomes elongated

47 SSD99 Tutorial Generalization goals Two alternative optimization problems can be defined: o Min - # : build the approximation of minimum size (e.g. minimum number of vertices) which satisfies a given error bound maccuracy is a constraint msize is the goal  Min -  : build an approximation having minimum error and having a given size msize is a constraint maccuracy is the goal

48 SSD99 Tutorial Theoretical results  Optimization problems Min-# and Min-  are NP-hard [Agarwal and Suri, 1995]  There exist just few approximation algorithms for problem Min-  that guarantee a bound on the size of the solution with respect to optimal [Agarwal and Desikan, 1997]: mAlgorithms are difficult to code and computationally expensive mSub-optimality bounds are coarse mEmpirical results are not substantially better than those obtained with heuristics

49 SSD99 Tutorial Practical methods All practical methods are based on heuristics: o Selection of point features [Fowler and Little, 1979; Chen ad Guevara, 1989; Scarlatos, 1990] o Iterative refinement of a TIN [Franklin, 1973; Fowler and Little, 1979; De Floriani et al., 1984; De Floriani et al., 1985; Rippa, 1992] o Iterative simplification of a TIN [Lee, 1989; deBerg and Dobrindt, 1995; Hoppe, 1996] o Methods based on greedy construction of a TIN [Silva et al., 1995]

50 SSD99 Tutorial Methods based on selection of points o General approach: mExtract a subset of the sample data set formed by points that are likely to be relevant to describe the morphology of terrain mCompute a TIN having vertices at selected points. o Topographic features [Fowler and Little, 1979]: mSurface-specific points at peaks, pits, ridges,valleys and passes are extracted from an input RSG using a local method [Peucker and Douglas, 1975] mPoints along lineal features (ridges and valleys) are organized into chains, which are simplified by a line-thinning method [Douglas and Peucker, 1973] mA Delaunay triangulation of the selected points is computed

51 SSD99 Tutorial...Methods based on selection of points... o VIP [Chen ad Guevara, 1989] mAn importance measure is computed at all points of an RSG: GEach point has four pairs of diametrically opposed neighbors GFor each pair of neighbors, distance from the central point to the line interpolating them is computed GThe average of the four computed distances is used as a measure of importance. mVery Important Points (VIP) are extracted based either on an importance threshold, or on a desired number of points mDelaunay triangulation of VIP points is computed P FE D C H A G B G C P

52 SSD99 Tutorial...Methods based on selection of points... o Constrained triangulation [Scarlatos, 1990] mLineal features (ridges and valleys) as well as contour lines are obtained from previous processing of an RSG model mA triangulation constrained to contain such lines as edges is built tconstrained triangulation may contain many slivers

53 SSD99 Tutorial...Methods based on selection of points... Pros and Cons: sSimple and local computations sTopographic features are preserved tTIN accuracy must be evaluated after building the TIN tVery sensitive to noise in the input data tNot suitable to resolve the Min-# problem tApplicable only to RSG input (not applicable to sparse data samples)

54 SSD99 Tutorial Methods based on TIN refinement o General approach: mStart with a TIN having a small number of vertices and covering the whole domain of terrain mIteratively insert more vertices until a stop condition is verified: G[Min-#] a desired accuracy is obtained  [Min-  ]  the TIN has a desired number of vertices (or triangles) o Key issues that characterize different methods: mInitial TIN mSelection of vertices to insert mTriangulation method

55 SSD99 Tutorial...Methods based on TIN refinement... o Initial TIN m[Fowler and Little, 1979]: built on a small set of point features m[Franklin, 1973; De Floriani et al., 1984; Rippa, 1992]: built on a the four corners of a grid (two triangles) m[De Floriani et al., 1995]: built on the vertices of the convex hull of the (arbitrarily shaped) domain

56 SSD99 Tutorial...Methods based on TIN refinement... o Selection of vertices: mAll known methods use the same criterion: At each iteration, input point causing the largest vertical error is selected mAlternative criterion: Select vertex that improves accuracy better The alternative criterion might give a better size / accuracy ratio, but it is computationally more expensive because insertion of all points must be simulated in order to make selection

57 SSD99 Tutorial...Methods based on TIN refinement... o Triangulation method: m[De Floriani et al., 1994]: triangle containing the new vertex is split into three sextremely simple and local update rule shierarchy of nested triangles tmany slivers

58 SSD99 Tutorial...Methods based on TIN refinement... m[Franklin, 1993]: Gtriangle containing the new vertex is split into three Gedges of the split triangle are possibly swapped to improve compactness ssimple and local update rule tstill slivers

59 SSD99 Tutorial...Methods based on TIN refinement... m[Fowler and Little, 1979; …many others...]: a Delaunay triangulation is updated by inserting the new vertex: Gneed for an on-line triangulation method [Watson, 1981; Guibas and Stolfi, 1983] sbest compactness on the given set of vertices uregion of influence is local on average, but might be arbitrarily extended in the worst case tmore complex update rule

60 SSD99 Tutorial...Methods based on TIN refinement... m[De Floriani et al., 1985]: a Constrained Delaunay Triangulation (CDT) is updated by inserting the new vertex: Gneed for an on-line CDT method [De Floriani and Puppo, 1988] ssuitable to non-convex domains slineal features can be included as TIN edges uupdate rules similar to those of Delaunay triangulation tsome slivers may appear

61 SSD99 Tutorial...Methods based on TIN refinement... m[Rippa, 1992]: a data dependent triangulation is updated by inserting the new vertex: Gupdate method based on edge swaps similar to those used for Delaunay triangulation Gtests to decide whether or not a swap must be performed depend on data elevation sbetter size / accuracy ratio toptimality with respect to selected criterion is not guaranteed tcomputationally expensive tsome slivers may appear

62 SSD99 Tutorial Methods based on TIN simplification o General approach: mStart with the model (either an RSG or a TIN) at maximum resolution mIteratively reduce the number of vertices/triangles through local modifications in the TIN until a stop condition is verified: G[Min-#] the TIN cannot be simplified firther without violating a desired accuracy  [Min-  ]  the TIN has a desired number of vertices (or triangles) o Key issues that characterize different methods: mType of local modification mSelection of modification at each step mError evaluation

63 SSD99 Tutorial...Methods based on TIN simplification... Local modifications: mVertex decimation [Lee, 1989; deBerg and Dobrindt, 1995] mEdge collapse [Hoppe, 1996]

64 SSD99 Tutorial...Methods based on TIN simplification... o Influence region of vertex decimation: mbefore: a star of triangles surrounding the removed vertex mafter: a star-shaped triangulated polygon o Key issues: mselection of vertices to remove mtriangulation method merror estimation

65 SSD99 Tutorial...Methods based on TIN simplification... o Greedy decimation [Lee, 1989; ….many others….]: mFor each vertex in the initial TIN, compute the cost (error increase) of deleting it from the TIN mAt each step, remove vertex causing the least error increase mMesh update based on Delaunay triangulation (variants based on heuristics) mVertices are stored in a priority queue according to their cost mCost must be updated at each step only at vertices of the influence polygon

66 SSD99 Tutorial...Methods based on TIN simplification... o Decimation of independent sets of vertices [deBerg and Dobrindt, 1995; …others...]: mAt each iteration remove a set vertices such that all vertices Ghave bounded degree Gare mutually independent (no two vertices share an edge) mVertices to remove selected either random, or with a greedy technique giving highest priority to vertices causing the least error increase mVertices eliminated in a single iteration have disjoint influence regions (holes) mEach holes triangulated independently with Delaunay or data- dependent rule

67 SSD99 Tutorial...Methods based on TIN simplification...

68 SSD99 Tutorial...Methods based on TIN simplification... o Edge collapse on endpoint: minfluence region: star of triangles surrounding the endpoint that disappears mequivalent to decimation with special update rule o Edge collapse on midpoint: minfluence region: cycle of triangles surrounding the collapsed edge

69 SSD99 Tutorial...Methods based on TIN simplification... o Edge collapsing rules mGreedy: collapse an edge at each step: Gthe shortest edge Gthe edge causing the least error increase Gan edge surrounded by almost coplanar faces mIndependent set: Gtwo edges are independent if they have disjoint influence regions Gselect a maximal set of independent edges and collapse them all together

70 SSD99 Tutorial...Methods based on TIN simplification... Decimation s smaller influence regions s more regular triangles s always possible for any vertex t more complex update rules Collapse s simple update rules t larger influence regions t slivers t collapse not always legal

71 SSD99 Tutorial Method based on greedy TIN construction o [Silva et al., 1995]: mStart with a polygon covering the whole domain mIteratively reduce the current polygon(s) by one triangle having at least two vertices on the current boundary m Basic operations: Gear cutting Ggreedy biting Gpolygon splitting Gedge splitting

72 SSD99 Tutorial...Method based on greedy TIN construction... Ear cutting Greedy biting

73 SSD99 Tutorial...Method based on greedy TIN construction... Polygon splitting Edge splitting

74 SSD99 Tutorial...Method based on greedy TIN construction... Pros and Cons: sGood size / accuracy ratio sDoes not need to keep the whole TIN in memory tSlivers  Not suitable to resolve the Min-  problem tComplex update rules

75 SSD99 Tutorial Final remarks o Refinement and simplification methods may achieve both a good size / accuracy ratio, and compactness of triangles o Delaunay-based methods achieve the best compactness o Point selection methods can be used as pre-processing for refinement methods in order to speed-up refinement, and to preserve topographic features o Open issue: input data and/or TIN sometimes do not fit into memory èGreedy methods can help to cope with this problem and achieve good size / accuracy ratio, but they produce slivers

76 SSD99 Tutorial Multiresolution Terrain Models A general framework

77 SSD99 Tutorial LOD Models o Layered models mdescription of a sequence of few meshes each of which represents an object at a different resolution o Multiresolution models mdescription of a virtually continuous set of meshes representing an object at increasing resolutions

78 SSD99 Tutorial Layered Models o Each mesh is obtained through a simplification algorithm o Each mesh is associated with a range of levels of detail o The range is used as a filter to select a mesh from the sequence o Each mesh is stored independently: the number of meshes must be small, otherwise the model becomes huge o Modest possibility to adapt resolution to application needs o Resolution of each mesh is uniform

79 SSD99 Tutorial Multiresolution Models o They provide a virtually continuous range of meshes representing terrain at different resolutions o The number of different meshes that can be extracted from the model is not fixed a priori, but it is a function of the data size, and can be huge (e.g., combinatorial) o Resolution of a mesh can be variable, and change smoothly over different parts of terrain

80 SSD99 Tutorial...Multiresolution Models... Requirements for a Multiresolution Model o Support to efficient query processing (e.g., extraction of terrain representations at suitable resolution in real time) o Size of the model not much higher than size of representation at maximum resolution o No cracks or abrupt transitions within a mesh o Smooth transition between different representations at close resolutions

81 SSD99 Tutorial...Multiresolution Models... Intuitive Idea behind Multiresolution o Terrain representations at different levels of detail (LODs) can be obtained as a sequence of local modifications on an initial mesh (by simplification or refinement) o Some modifications depend on others o Some modifications are mutually independent

82 SSD99 Tutorial...Multiresolution Models... o Initial mesh + o collection of local modifications arranged in a partial order (described by a DAG) The “Heart” of a Multiresolution Model

83 SSD99 Tutorial A General Framework for Multiresolution: the MultiComplex A MultiComplex (MC) is a labeled DAG where mnodes are polygonal meshes marcs describe the partial order

84 SSD99 Tutorial...A General Framework for Multiresolution... Each modification must be consistent: o Let T be a mesh. A mesh T i is a consistent modification of T iff T contains a submesh T’ i, such that T i “covers” T’ i, and T i has more cells than T’ i o T’ i is called the floor of T i, consistent not consistent T’ i T

85 SSD99 Tutorial Expressive Power of a MultiComplex o A subMC of an MC M is a subgraph M’ where mM’ contains the root mIf T i belongs to M’, then all parents of T i belong to M’ as well o Every subMC is an MC =

86 SSD99 Tutorial...Expressive Power of a MultiComplex... o Any mesh made of cells in M is the boundary mesh of a subMC o A boundary mesh is obtained by applying all modifications in the subMC in a consistent order boundary mesh

87 SSD99 Tutorial...Expressive Power of a MultiComplex... Mesh at Maximum Resolution o boundary mesh associated with the MC itself boundary mesh

88 SSD99 Tutorial Desirable Properties for a MultiComplex o Linear growth: mthe number of cells of the MC is linear in the number of cells in its boundary mesh

89 SSD99 Tutorial...Desirable Properties for a MultiComplex... o Bounded width: mthe number of cells in any MC mesh is bounded from above by a constant o Logarithmic height: mthe maximum path length is logarithmic in the total number of arcs of the MC Remark: bounded width  linear growth

90 SSD99 Tutorial Spatial Queries on a Multiresolution Model Special cases of a general extraction query specified by: man accuracy condition: Gspecification of the LOD at which the mesh is queried Gthreshold function bounding the distance between the original terrain and the mesh extracted from the MC ma focus condition: Gspecification of the type of geometric operation defined by the query Gfocus set defining the area of interest of the query Example: maximum resolution inside a window

91 SSD99 Tutorial...Spatial Queries on a Multiresolution Model... Accuracy Condition  Threshold function  : R 3 R mA cell c is called valid iff its approximation error is lower than the minimum value of the threshold over c  A triangle mesh satisfies  if all its triangles are valid Example of a threshold function: mincreasing with the distance from the viewpoint, measured on the x-y plane

92 SSD99 Tutorial Focus Condition o Focus set F in R 3 o A cell c is called active iff c  F is not empty o A focus set describes the region of interest of the query Examples of focus sets: mPoint : point location query mLine/polyline : segment/line interference query, visibility query mRegion : window query, region overlay, buffer mVolume: view frustum mHorizontal plane : contour lines...Spatial Queries on a Multiresolution Model...

93 SSD99 Tutorial...Spatial Queries on a Multiresolution Model... General Extraction Query (Selective Refinement) o Extract mesh T, among all meshes described by the model, such that mT has minimal size (minimal number of cells) mall active cells of T are valid

94 SSD99 Tutorial...Spatial Queries on a Multiresolution Model... Two instances of the General Extraction Query o Resulting mesh defined locally only in the area of interest o Resulting mesh defined globally on the whole surface

95 SSD99 Tutorial Selective Refinement Selective refinement is performed by sweeping a front through the DAG: o the corresponding subMC satisfies the required threshold inside the area of interest o no node above the cut can be omitted without violating the threshold

96 SSD99 Tutorial MT Library and API Implementation of the MT as a Library mIndependent of how the construction sequence is generated mLibrary written in C++, tested on both SGI and PC platforms mIt implements: Galgorithms for building an MT from a given construction sequence Gencoding structures and traversal algorithms Gthreshold functions and focus sets to support different queries mIt provides an Application Programming Interface to develop MT- based applications

97 SSD99 Tutorial References o General definitions and properties: Puppo, CCCG’96 / Computational Geometry 1998; Magillo, PhD Thesis 1999 o Multidimensional extension and other models in the MT framework: De Floriani, Magillo, Puppo, in “Geometric Modeling: Theory and Practice”, 1997 / DGCI’99 o Construction: De Floriani, Magillo, Puppo, IEEE VIS’97 o VARIANT: De Floriani, Magillo, Puppo, ACM GIS 1997 o Data structures and queries: De Floriani, Magillo, Puppo, IEEE VIS’98 / SSD 1999 Our web page: http://www.disi.unige.it/research/Geometric_modeling/

98 SSD99 Tutorial Multiresolution Terrain Models Survey and Discussion

99 SSD99 Tutorial Classification o Nested models mbased on a nested subdivision of the domain meach cell in the subdivision is refined independently o Evolutionary models mbased on the evolution of a mesh through local modifications mdifferent meshes are obtained by combining different groups of modifications

100 SSD99 Tutorial Nested models o Root mesh at coarse resolution o General refinement rule: each region in the mesh is refined independently into a local mesh o An arc links a region to the local mesh refining it

101 SSD99 Tutorial …Nested models... o Cracks can appear in the surface if one node is refined independently of its neighbors o Cracks are due to edges that split during refinement

102 SSD99 Tutorial Nested models as MCs o A node of the tree is not necessarily a node of the MC o Nodes of the MC are obtained by node clustering o Clustering rule: if an edge e of a triangle t splits during refinement, then m the same split must occur in refining triangle t’ adjacent to t along e mthe meshes refining t and t’ must be clustered o Propagation: many nodes of the tree can be clustered to form one node of the MC because of edge splits

103 SSD99 Tutorial …Nested models as MCs...

104 SSD99 Tutorial Quadtree-like models o Models based on regular nested subdivisions o Suitable for regularly distributed data o Quadtree: recursive subdivision of a square universe into quadrants

105 SSD99 Tutorial Quadtree o Surface within each quadrant approximated through a bilinear patch o Each patch interpolates data at its four vertices o A mesh formed of quadrants from different levels has cracks

106 SSD99 Tutorial... Quadtree... o All quadrants of a given level must be clustered to form a single node o Complete levels are the only possible meshes to give surfaces without cracks o Each valid representation has uniform resolution

107 SSD99 Tutorial Restricted quadtree [Von Herzen & Barr, 1987] Merging triangles from different levels without cracks: mAdjacent quadrants can differ by one level mEach quadrant is triangulated mLinear interpolation is used on each triangle

108 SSD99 Tutorial...Restricted quadtree... o Each quadrant can be triangulated in 16 possible patterns o Triangulation pattern depends on levels of adjacent quadrants o Mesh is always conforming: no cracks o The number of regions is higher than in the original quadtree

109 SSD99 Tutorial...Restricted quadtree... Restricted quadtree and wavelets [Gross et al., 1996] o Quadtree subdivision naturally adapt to computation of wavelet coefficients at grid vertices o LOD refers to detail relevance in wavelet space, rather than absolute approximation error on surface o Selective refinement: vertices are selected according to their LOD, and the resulting quadtree is triangulated a posteriori o Two quadtree levels are allowed between adjacent quadrants o More complex lookup table is necessary to obtain all triangulation patterns

110 SSD99 Tutorial Hierarchy of right triangles [Lindstrom et al., 1996, Evans et al., 1997, Duchaineau et al., 1997, Pajarola, 1998] Each triangle is recursively bisected by splitting it along its longest edge Binary tree representation MC representation

111 SSD99 Tutorial...Hierarchy of right triangles... MC corresponding to a hierarchy of right triangles: o cluster triangles of the same level that share a short edge o each node is formed of four triangles (except at the boundary) o two types of nodes: msquares mdiamonds o each node has two parents and four sons (except at the boundary, root, and leaves)

112 SSD99 Tutorial...Hierarchy of right triangles... Corresponding hierarchy of vertices: o each node in the MC is identified with central vertex of fragment o each vertex depends on two other vertices o selective refinement: mesh must contain all vertices needed to achieve the LOD, plus all their ancestors

113 SSD99 Tutorial …Hierarchy of right triangles... o Different models are characterized by: mdata structures merror evaluation mtraversal algorithms o Trade-off between space complexity and time efficiency

114 SSD99 Tutorial …Hierarchy of right triangles... [Lindstrom et al., 1996] o Data structure: matrix of input values o Error: on-the-fly estimate of error in screen space o Selective refinement: bottom-up vertex reduction s no overhead for multiresolution data structure t on-the-fly error estimate is expensive; speed-up techniques do not warrant exact error evaluation

115 SSD99 Tutorial …Hierarchy of right triangles... [Duchaineau et al., 1997, Evans et al., 1997] o Data structure: binary tree of triangles o Error: a priori evaluation o Selective refinement: top-down traversal of the tree by forcing splits where necessary s no need for numerical computation during refinement t expensive data structure

116 SSD99 Tutorial …Hierarchy of right triangles... An implicit data structure: o Matrix of input values o An array of errors, one for each triangle o Each triangle, and each MC node can be identified by a unique code o All topological and hierarchical relations involving vertices, triangles, and nodes can be evaluated by algebraic manipulation of codes o The array of errors is addressed directly through codes s Very efficient time performance with a moderate overhead

117 SSD99 Tutorial o Codes for triangles [Hebert, 1995] mReference domain: unit square [0,1]x[0,1] mQuadtree subdivision: Ga quadrant is identified by its center Gthe center of a quadrant at level m is encoded by a sequence of m quaternary digits (2m bits) where all  i are pairs of signs: (-1,-1) (-1,1) (1,-1) (1,1) …Hierarchy of right triangles...

118 SSD99 Tutorial …Hierarchy of right triangles... mFor each level of the quadtree there are two levels in the tree of triangles: each quadrant is subdivided in two possible ways mTriangles in a quadrant are identified by a pair of digits (l,t) where l is the type of subdivision, and t is the index of a triangle in the subdivision (total 4 bits)

119 SSD99 Tutorial …Hierarchy of right triangles... o Topological relations are evaluated by algebraic manipulation of codes. From a triangle we can obtain: mvertices mparent triangle msons m adjacent triangles at the same level madjacent triangle at the previous level madjacent triangles at the next level

120 SSD99 Tutorial …Hierarchy of right triangles... o Codes for nodes of the MC: mtwo kinds of nodes: squares and diamonds ma node is encoded by its center ma square coincides with a quadtree quadrant  same code ma diamond is encoded with a similar formula that identifies its center vertex

121 SSD99 Tutorial …Hierarchy of right triangles... o Relations among triangles and nodes are evaluated by algebraic manipulation of codes. From a node we can obtain: mtriangles in it mtriangles in its floor mparent nodes mchild nodes The algorithm for selective refinement for MC can be implemented efficiently on a hierarchy of right triangles encoded by the implicit data structure

122 SSD99 Tutorial …Hierarchy of right triangles... Results of selective refinement with view frustum, and error increasing with distance from viewpoint

123 SSD99 Tutorial Quaternary triangulations o Recursive subdivision of a triangle into four triangles by joining the midpoints of edges o Applicable as a refinement scheme to an arbitrary surface mesh at low resolution o Topological constraints on positions of vertices o Supports methods based on wavelets o A mesh made of triangles from different levels has cracks

124 SSD99 Tutorial...Quaternary triangulations... o Different levels of the hierarchy can be merged through a posteriori triangulation of non-conforming meshes o Eight triangulation patterns o Patterns less regular than those used for restricted quadtrees o Model completed with such triangulation patterns is not an MC

125 SSD99 Tutorial Adaptive hierarchical triangulations o Based on irregular triangulations o Suitable for sparse data sets o Error driven subdivision rule: refine a triangle by inserting vertices that cause the largest errors o Vertices can be inserted inside a triangle and/or on its edges s More adaptive than models based on fixed subdivision rules t May contain elongated triangles (slivers)

126 SSD99 Tutorial...Adaptive hierarchical triangulations... [Pavlidis and Scarlatos, 1990/92] o Find the vertex causing the largest error inside the triangle, and the vertices causing the largest error along each edge o Select only vertices whose error is beyond a given threshold o Use predefined subdivision patterns [De Floriani and Puppo, 1992/95] o Insert the vertex causing the largest error until a given accuracy is achieved o At each insertion compute the Delaunay triangulation

127 SSD99 Tutorial Evaluation of nested models Regular subdivisions s Pros: measy to handle mcompact data structures mregular shape of regions msupport wavelets t Cons: monly regular data: topological constraints mless adaptive than irregular subdivisions Irregular subdivisions s Pros: msuitable for irregular distributed data sets mmore adaptive than regular subdivisions t Cons: melongated triangles mcumbersome structures mselective refinement not easy

128 SSD99 Tutorial Evolutionary models Store the evolution of a mesh through either refinement or simplification algorithm based on local modifications o Partial order is given by relations among components of the mesh (vertices, faces, etc…) before and after each local modification o Different models characterized by: mconstruction method minformation stored (geometry, connectivity, topology, interference, attributes, error, etc…) moperations supported - efficiency of algorithms

129 SSD99 Tutorial...Evolutionary models... o Models based on vertex insertion / vertex decimation m[De Floriani, 1989] m[de Berg and Dobrindt, 1995] m[Cignoni et al., 1995/97] m[Brown, 1996/97] m[Klein and Strasser, 1996] m[De Floriani et al., 1996/97/98]

130 SSD99 Tutorial...Evolutionary models... o Models based on vertex split / edge collapse m[Hoppe, 1996/97/98] m[Xia et al., 1996/97] m[Maheswari et al., 1997] m[Gueziec et al., 1998] m[Kobbelt et al., 1998]

131 SSD99 Tutorial Data structures Relevant information on evolutionary models: o Geometry: coordinates of vertices o Connectivity: triplets of vertices forming triangles o Topology: adjacency, boundary, co-boundary relations o Spatial interference: relations among nodes and triangles that have spatial interference o Additional information: accuracy, material, surface normal, etc. è Different data structures are characterized by the amount of information stored è Trade-off between spatial complexity and efficiency

132 SSD99 Tutorial...Data structures... Sequential models [Cignoni et al., 1996; Hoppe, 1996; Klein and Strasser, 1997; De Floriani et al., 1998] mKeep local modifications into a totally ordered list (just one valid sequence) mDependencies are not explicitly stored

133 SSD99 Tutorial...Data structures... …Sequential models… sextraction of a uniform LOD very efficient svery compact tselective refinement not possible tno topology and interference maintained

134 SSD99 Tutorial...Data structures... Explicit MC Representation for triangle meshes (MultiTriangulation, MT) [De Floriani et al., 1996/1998] o Geometry: vertex coordinates o Connectivity: mfor each triangle: error + references to its three vertices o DAG structure: mfor every arc (T j,T i ): links to source and destination node, link to the set of triangles of T j which form the floor of T i mfor every node: link to the sets of its incoming and outcoming arcs

135 SSD99 Tutorial...Data structures... MT Explicit MT

136 SSD99 Tutorial...Data structures......Explicit MC representation... sSupports selective refinement efficiently sSupports spatial queries efficiently tHigh storage cost tNo topology

137 SSD99 Tutorial...Data structures... Compressed hierarchies: o Key ideas: meach node of an MC is a local modification that can be encoded in compressed form mthe arcs of the DAG are encoded explicitly o Different structures for models based on edge collapse called vertex hierarchies: m[Xia et al., 1996/97] m[Hoppe, 1997] m[Gueziec et al., 1998] o One structure for models based on vertex decimation: m[De Floriani et al., 1997/98]

138 SSD99 Tutorial...Data structures... o Vertex hierarchies [Hoppe, 1997; Xia et al., 1997, Gueziec et al., 1998] mBased on vertex split mStore two types of dependencies among vertices mDependencies of type 1: a vertex depends on the vertex that has been split to create it

139 SSD99 Tutorial...Data structures... mDependencies of type 2 (defined differently in the various models): G[Hoppe, 1997] G[Xia et al., 1997, Gueziec et al., 1998] Dependencies of type 1 and of type 2  DAG of vertex dependencies

140 SSD99 Tutorial...Data structures... o Compressed hierarchies for a MultiTriangulation based on decimation: Implicit MT [De Floriani et al., 1997/98] mEach node corresponds to vertex insertion/decimation mPartial order of nodes is maintained mFor each node: Gcorresponding vertex Gerror associated with the component Gpossible compressed information to encode node triangulation

141 SSD99 Tutorial...Data structures... …Compressed hierarchies... sMore compact than Explicit MC tLess general than Explicit MC  Accuracy not stored for each triangle  resulting mesh not minimal (about twice the size of mesh obtained from Explicit MC)

142 SSD99 Tutorial...Data structures... Hypertriangulation [Cignoni et al., 1995/97] o Interpretation of an MC in a higher dimensional space: cells of a new node are lifted along a “resolution axis” and welded on floor at the node boundary

143 SSD99 Tutorial...Data structures......Hypertriangulation... o Data structure based on topological information (global adjacency) stopology is maintained explicitly sefficient support of queries requiring navigation of domain sinteractive mesh editing thigh storage cost tno interference information tselective refinement super-linear and possible only for some accuracy conditions

144 SSD99 Tutorial Discussion Taxonomy o Modeling issues: madaptivity and data distribution mexpressive power mshape of triangles mstorage o Processing issues: mselective refinement mprogressive transmission mnavigation mgeometric queries mconstruction

145 SSD99 Tutorial...Discussion... Adaptivity and data distribution o Adaptivity: possibility to increase LOD only where necessary o Data distribution: irregular distribution vs regular grid More adaptive, more general Less adaptive, less general MT, HyT PM Adaptive hierarchical triangulations Quaternary triangulations Quadtree, hierarchy of right triangles

146 SSD99 Tutorial...Discussion... Expressive power o Number of different meshes that can be extracted o Possibility to adapt a mesh to arbitrary LOD o Ratio accuracy/size More expressive, higher ratio Less expressive, lower ratio Explicit MT PM, Implicit MT HyT Quaternary triangulations Hierarchy of right triangles, quadtree,restricted quadtree, Adaptive hierarchical triangulations

147 SSD99 Tutorial...Discussion... Shape o Regions with regular shape are desirable o Slivers cause numerical errors, and unpleasant visual effects More regular Less regular Quadtree, restricted quadtree, hierarchy of right triangles Quaternary triangulation HyT, MT PM Adaptive hierarchical triangulations

148 SSD99 Tutorial...Discussion... Storage o Compact data structures are desirable o Increasing complexity: geometry, connectivity, interference, topology More expensive Less expensive Adaptive hierarchical triangulations HyT Explicit MT, vertex hierarchies Implicit MT Linear sequences (linear PM) Quadtree, quaternary triangulation, hierarchy of right triangles

149 SSD99 Tutorial...Discussion... Selective refinement o High efficiency is desirable More efficient Less efficient Explicit MT Hierarchy of right triangles PM vertex hierarchies Implicit MT HyT Quaternary triangulation, restricted quadtree Linear sequences (linear PM)

150 SSD99 Tutorial...Discussion... Progressive transmission o Compact coding and fast decompression at client are relevant More efficient Less efficient Quadtree, hierarchy of right triangles Linear PM Implicit MT, PM vertex hierarchies Other linear sequences Explicit MT Restricted quadtree, quaternary triangulation

151 SSD99 Tutorial...Discussion... Navigation o Ability to move across surface and through LOD More efficient Less efficient Quadtree, hierarchy of right triangles Restricted quadtree, quaternary Adaptive hierarchical triangulation HyT Explicit MT Implicit MT, PM vertex hierarchies Linear sequences

152 SSD99 Tutorial...Discussion... Geometric queries o Point location, windowing, segment intersection, ray shooting, clipping, etc… o Bounded width and logarithmic height are relevant More efficient Less efficient Quadtree, hierarchy of right triangles Restricted quadtree, quaternary Adaptive hierarchical triangulation Explicit MT HyT Implicit MT, PM vertex hierarchies Linear sequences

153 SSD99 Tutorial...Discussion... Construction o Lower time complexity of construction algorithm is desirable o Easy-to-code algorithms are desirable More complex, more difficult Less complex, less difficult Adaptive hierarchical triangulations HyT MT, PM vertex hierarchies Linear sequences (linear PM) Quaternary triangulation Quadtree, hierarchy of right triangles

154 SSD99 Tutorial Multiresolution Terrain Models Applications

155 SSD99 Tutorial Applications of Multiresolution Terrain Models o Terrain visualization in GUI for GIS, landscape assessment, flight simulation and virtual reality o Standard viewing and editing tasks: windowing, zooming, panning, buffering, etc. o Contour map extraction o Viewshed computation o Watershed computation o Track profiling

156 SSD99 Tutorial TINs at variable resolution MT manager DISK MT raw data points extraction parameters MT builder MT clients MT viewer.. MT updates.. VARIANT (Variable Resolution Interactive Analysis of Terrain) A system for analyzing, querying and visualizing terrain models at variable resolution based on the MT System Architecture

157 SSD99 Tutorial...VARIANT... VARIANT architecture consists of: o MT Manager: layer of operations built on top of the MT library to perform update, query, and I/O operations on MT models o MT Builders: algorithms to build an MT from raw data (two refinement and four simplification strategies) o MT Clients: application programs that make use of variable resolution features to perform various operations: VARIANT implements a number of MT clients, such as a multiresolution viewer VARIANT is extensible through custom clients that can be designed through the MT API

158 SSD99 Tutorial...VARIANT... Multiresolution visualization o Terrain is extracted with: maccuracy decreasing linearly with distance from the viewpoint mregion of interest coincident with the view frustum

159 SSD99 Tutorial...VARIANT......Multiresolution visualization... Uniform resolution: 12701 triangles Variable resolution: 3065 triangles

160 SSD99 Tutorial...VARIANT... Contour map extraction o Focus set is made of one or more horizontal planes at desired elevations o Threshold function is constant at the desired accuracy o Only triangles intersecting the focus set are extracted, and contour lines are computed for each triangle

161 SSD99 Tutorial...VARIANT... Track profiling o Extraction of terrain profile along a track (road, river, ridge, etc…) o Focus set is a track on the 2D domain o Threshold function is constant at the desired accuracy

162 SSD99 Tutorial...VARIANT... Windowing o Focus set is a rectangular window on the 2D domain o Threshold function is constant at the desired accuracy

163 SSD99 Tutorial...VARIANT... Buffering o Focus set is buffer region on the 2D domain o Threshold function is constant at the desired accuracy inside buffer

Download ppt "1 SSD99 Tutorial Multiresolution in Terrain Modeling Leila De Floriani, Enrico Puppo University of Genova Genova (Italy)"

Similar presentations