Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer.

Similar presentations


Presentation on theme: "Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer."— Presentation transcript:

1 Advanced Issues In Level Of Detail

2 Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer Science University of Maryland at College Park http://www.cs.umd.edu/gvil

3 LOD Algorithms Classification Rossignac & Borrel 93 He et al 96 El-Sana & Varshney 97 Schroeder 97 Garland & Heckbert 97 Rossignac & Borrel 93 He et al 96 El-Sana & Varshney 97 Schroeder 97 Garland & Heckbert 97 Luebke & Erikson 97 El-Sana & Varshney 99 Luebke & Erikson 97 El-Sana & Varshney 99 View-Independent View-Dependent Topology Preserving Topology Preserving Topology Simplifying Topology Simplifying Turk 92 Schroeder et al 92 Cohen et al 96 Hoppe 96 Cignoni et al 98 Lindstrom & Turk 99 Xia & Varshney 96 Hoppe 97 De Floriani et al 98 Gueziec et al 98 Klein et al 98

4 Geometry & Topology Simplifications l Geometry Simplification – Reducing the number of geometric primitives (vertices, edges, triangles) l Topology Simplification –Reducing the number of holes, tunnels, cavities l Geometry + Topology Simplification –Aggressive simplifications –May not be suitable for some applications

5 Outline l Geometry and Topology Simplifications l Implementing View-dependent LODs l Variable-Precision Rendering

6 Outline l Geometry and Topology Simplifications –View-Independent (Discrete) Simplification of Topology –View-dependent Simplification of Topology l Implementing View-dependent LODs l Variable-Precision Rendering

7 Why Discrete Simplification of Topology?

8 Discrete Simplification of Topology

9 Local Algorithms l Collapsing vertex pairs / virtual edges –Schroeder, Visualization 97 –Popovic and Hoppe, Siggraph 97 –Garland and Heckbert, Siggraph 97 l Collapsing primitives in a cell –Rossignac and Borrel, Modeling in Comp. Graphics 93 –Luebke and Erikson, Siggraph 97

10 Global Algorithms l Low-pass filtering in Volumetric domain –He et al., Visualization 95 Rolling a sphere (L 2 ), cube (L 1, L   Rolling a sphere (L 2 ), cube (L 1, L   –El-Sana and Varshney, Visualization 97

11 Our Approach to Discrete Topology Simplification Similar to  -Hulls Similar to  -Hulls Roll a sphere of radius  over the object Roll a sphere of radius  over the object l Fill-up regions inaccessible to the sphere El-Sana and Varshney, Visualization 97, IEEE TVCG 98

12 Alpha Prisms l Alpha prism –Convolve triangle with  -side cube (L   metric) cube (L   metric) –Convex polyhedron Compute union of  prisms Compute union of  prisms –Fills-up all features less than  l Generate the surface from the union

13 Results

14 Concavities and Convexities ConcavityConvexity

15 Results Original Final

16 Outline l Geometry and Topology Simplifications –Discrete Simplification of Topology –View-dependent Simplification of Topology l Implementing View-dependent LODs l Variable-Precision Rendering

17 Illumination- and View-Dependent Detail 8192 triangles 537 triangles

18 View-Dependent Topology Simplification l Aggressive simplification l Varied topology simplification l Connect different objects l Efficient fold-over prevention policy l Real-time

19 Edge and Vertex-Pair Collapses H G P Vertex-Pair Collapse Vertex Split H G P Edge Collapse Vertex Split Edge Collapse Vertex-Pair Collapse (Virtual Edge)

20 Simplifying Genus l Allow virtual edge collapses l Limit potentially O(n 2 ) virtual edges l Typical constraints: – Delaunay edges – Edges that span neighboring cells in a spatial subdivision: octree, grids, etc. –Maximum edge length

21 Virtual Edges l Subdivide the dataset into patches –Initialize each triangle to a patch –Merge two patches that: n Share at least one edge n Their normals differ less than threshold l Construct Delaunay triangulation using only the vertices on patch boundaries

22 View Dependence Tree l Use an appropriate distance metric l Construct the set of virtual edges l Build a heap of all the edges (virtual and real) using the given metric. l While not empty (heap) –Extract (minimum) edge –Collapse its two vertices

23 View Dependence Tree Low Detail High Detail l Hierarchy of vertex-pair collapses l Different levels in this hierarchy represent different levels of detail l Construct the hierarchy offline l Run-time navigation involves: –Vertex split: Refinement –Vertex collapse: Simplification

24 Run-time Traversal for each active node n do switch(NextStat(n)){ switch(NextStat(n)){ case SPLIT : if ( CanSplit(n)) case SPLIT : if ( CanSplit(n)) Split(n); Split(n); case MERGE : if ( CanMerge(n) && case MERGE : if ( CanMerge(n) && CanMerge(Sibling(n)) CanMerge(Sibling(n)) Merge(n); Merge(n); case STAY : // No Change on the active-nodes list } case STAY : // No Change on the active-nodes list }

25 Simplification Factors l Screen-space projection l Local illumination l Visibility culling l Silhouette boundaries l Object Speed l LOD transfer function l Prevent fold-overs –Implicit Dependencies

26 Results 13.5K tris 2.0K tris 200 tris 8.2K tris

27 Results Close Far El-Sana and Varshney, Eurographics 99

28 Results Original (340K tris) Simplified (49K tris) Auxilliary Machine Room Dataset

29 Foveation Results El-Sana and Varshney, Eurographics 99

30 Outline l Geometry and Topology Simplifications l Implementing View-dependent LODs –Explicit and Implicit Dependencies –Maintaining triangle strips l Variable-Precision Rendering

31 Mesh Folding Problem A D B C v1 v2 v4 v3 (v2,v1) (v3,v4)

32 Explicit Dependencies a b c Edge Collapse Vertex Split v0v0 v2v2 v1v1 vkvk v0v0 vkvk v2v2 v1v1 Neighborhood of an edge collapse is determined and fixed during preprocessing and used for validity checks at run-time

33 Explicit Dependencies l Vertex split –Vertex c can split to (a, b) only if vertices v 0, v 1, … v k are present and adjacent to c at run-time. l Vertex-pair collapse –Vertex-pair (a, b) can collapse to vertex c only when all the vertices v 0, v 1, … v k are present and adjacent to (a, b). a b Edge Collapse Vertex Split v0v0 v2v2 v1v1 vkvk c v0v0 vkvk v2v2 v1v1

34 Implicit Dependencies l Observations –Collapsibility graph is a Directed Acyclic Graph –Validity check involves determining the age of a node relative to its neighbors l Solution –Each node is assigned a unique integer as id –Assign new nodes progressively increasing id-number

35 Implicit Dependencies l Vertex v can split if: –Its id is greater than the id of all its neighbors l Vertex-pair (u, v) can collapse to w if: –w ’s id is less than the id of the parents of the neighbors of the two vertices (u,v)

36 Implicit Dependencies l Vertex needs to maintain only two values: –Max ID of all its neighbors –Min ID of parents of all its neighbors l Run-time checks become constant time –check against the above two values instead of all neighbors l Localized memory accesses –Eg: Stanford Dragon (871K triangles, 874K nodes) n avg memory access distance for dependency checks comes down to ~1 byte from 14 MB

37 Outline l Geometry and Topology Simplifications l Implementing View-dependent LODs –Explicit and Implicit Dependencies –Maintaining triangle strips l Variable-Precision Rendering

38 Recent Research on Triangle Strips Akeley, Haeberli, Burns, 1990 Deering, Siggraph 95 Arkin et al. Visual Computer 96 Bar-Yehuda & Gotsman, ACM TOG 96 Evans, Skiena, Varshney, Visualization 96 Chow, Visualization 97 Duchaineau et al., Visualization 97 Speckmann & Snoeyink, CCCG 97 Gumhold & Strasser, Siggraph 98 Taubin et al., Siggraph 98 El-Sana, Azanli, Varshney, Visualization 99 Hoppe, Siggraph 99 Xiang, Held, Mitchell, I3D 99 Velho et al., Visual Computer 99

39 Triangle Strip a b ce d Triangles: (abc), (bcd), (cde) Triangle Strip: abcde

40 Generalized Triangle Strips Triangle Strip: a b c d (swap) e f a b c d c e f a b c d c e f Repeating vertices changes direction abc edf

41 Triangle Strips with LODs l Triangle strips –2X speedup –Hardware / Software support l Discrete LODs –Off-line computation of triangle strips per LOD l View-dependent simplification –Connectivity changes every frame –Requires run-time update of triangle strips

42 Edge Collapse in a Triangle Strip Repeating vertices can represent edge collapses abcedf a c e b,d f (abcdef) (abcbef)

43 Merge Tree Mesh 9 1 2 5 6 7 810 34 12 1 34 3 56 5 78 7 9 9 15 1

44 Following Parent Pointers 12 1 34 3 56 5 78 7 910 9 15 1 l Replace each Triangle Strip vertex by its closest active ancestor l Need efficient pointer hopping

45 Skip Lists l Pugh [CACM 1990] l Probabilistic balancing l Fast searches l Compressed trees 2 7 9 11 15 31 61 96 NIL

46 Skip Strip Data Structure l Array of Skip Strip Nodes l Merge –Increment p –Increment c l Split –Decrement p –Decrement c cp Vertex Info cp cp cp cp Collapse 1 Collapse 2 Collapse 3 Log n th Collapse

47 Building a Skip Strip 12 1 34 3 1 cp 4 cp 3 cp 2 cp 1

48 12 1 34 3 1 cp 4 cp 3 cp 2 cp 1

49 12 1 34 3 1 cp 4 cp 3 cp 2 cp 1

50 Skip Strips with LODs 9 1 2 5 6 7 810 34 Triangle Strip A (7 6 4 5 3 2 1) Triangle Strip B (1 10 3 9 4 8 7)

51 Skip Strip Example 1 2 3 4 5 6 7 8 9 10 Highest Resolution 12345678910 13 57 9 1 5 Triangle Strip A: 7 6 4 5 3 2 1 Display Strip A: 7 6 4 5 3 2 1 Triangle Strip B: 1 10 3 9 4 8 7 Display Strip B: 1 10 3 9 4 8 7

52 Skip Strip Example 1 2 3 4 5 6 7 8 9 10 Lower Resolution 12345678910 13 57 9 1 5 Triangle Strip A: 7 6 4 5 3 2 1 Display Strip A: 5 5 4 5 3 2 1 Triangle Strip B: 1 10 3 9 4 8 7 Display Strip B: 1 10 3 9 4 5 5

53 Skip Strip Example 1 2 3 4 5 6 7 8 9 10 Triangle Strip A: 7 6 4 5 3 2 1 Display Strip A: 5 5 4 5 3 2 1 Triangle Strip B: 1 10 3 9 4 8 7 Display Strip B: 1 10 3 9 4 5 5 Lower Resolution 12345678910 13 57 9 1 5

54 Skip Strip Example 1 2 3 4 5 6 7 8 9 10 Triangle Strip A: 7 6 4 5 3 2 1 Display Strip A: 5 5 4 5 3 2 1 Triangle Strip B: 1 10 3 9 4 8 7 Display Strip B: 1 10 3 9 4 5 5 Lower Resolution 12345678910 13 57 9 1 5

55 Optimized Skip Strip Example 1 2 3 4 5 6 7 8 9 10 Triangle Strip A: 7 6 4 5 3 2 1 Display Strip A: 5 5 4 5 3 2 1 Triangle Strip B: 1 10 3 9 4 8 7 Display Strip B: 1 10 3 9 4 5 5 Lower Resolution 12345678910 13 57 9 1 5

56 Real-Time Display l Determine the display vertices l Determine the display strips –Determine which strips have changed –Traverse the changed triangle strips –Follow Skip Strip pointers to get appropriate ancestors –Remove redundant vertices

57 Efficient Skipping l Reduce the traversed non-active vertices –Compress the traversed paths –Update the compressed paths in lazy fashion –Cache the active path index l Efficiency –We use only O(log log n) jumps

58 Results: Terrain 255K tris 32K tris 255K tris 522K tris

59 Results: Bunny 5K tris 30K tris 65K tris El-Sana and Varshney, Visualization 99

60 Auxiliary Machine Room 65K tris 170K tris 340K tris El-Sana and Varshney, Visualization 99

61 Results l Skip Strips make execution of split and merge operations more efficient l Applicable to any hierarchical vertex scheme l Four our four sample datasets: – Skip Strips provided ~ 1.5 to 2.0 X improvement over sending raw view-dependent triangles – Skip Strips provided ~ 1.6 to 1.7 X improvement over per- frame greedy triangle strip generation l But we have not tested this with video memory …

62 Outline l Geometry and Topology Simplifications l Implementing View-dependent LODs l Variable-Precision Rendering

63 Defining Level of Detail l Number of Primitives l Precision of primitives –Colors (Heckbert 82, Xiang 97) –Normals (Deering 95, Zhang & Hoff 97) –Vertex coordinates (King & Rossignac 99)

64 Variable-Precision Rendering l Reduce the precision of graphics primitives l Relate the number of bits of input precision for a given display accuracy for a given display accuracy l Speedup 3D transformation and lighting by taking advantage of SIMD parallelism by taking advantage of SIMD parallelism l Explore spatio-temporal coherence

65 Related Work Sugihara 89 Taubin & Rossignac 98 Milenkovic & Nackman 90Taubin et al. 98 Rossignac & Borrel 93 Li & Kuo 98 Deering 95 Cohen-Or et al. 99 Fortune & Van Wyk 96 Bajaj et al. 99 Chow 97 King & Rossignac 99 Luebke & Erikson 97 Bajaj et al. 2000 Fortune 98 Pajarola & Rossignac 2000

66 Variable-Precision vs. Multiresolution Variable-Precision vs. Multiresolution Original Multiresolution Variable Precision

67 Assumptions Minimum-sized cube covering the object Minimum-sized cube covering the object –x, y, z normalized to range [-1.0, 1.0] N-bit fixed-point representation of operands N-bit fixed-point representation of operands Rounding to the nearest integer Rounding to the nearest integer Worst-case study Worst-case study

68 Error Analysis Representation error of Representation error of –Half bit, i.e., Addition error of Addition error of Multiplication error of Multiplication error of, i.e., lose one bit of accuracy

69 Error Analysis Division error of Division error of

70 Putting it all together

71 View-dependent Transformation Construct bounding volume hierarchy Construct bounding volume hierarchy Find the projected size of the object Find the projected size of the object Determine the nearest visible vertex accuracy Determine the nearest visible vertex accuracy

72 View-dependent Transformation Accuracy needed for each vertex: Compute by using bounding volume hierarchy

73 Spatio-temporal Coherence Spatial coherence Spatial coherence –Using differences in neighboring vertices –M x’ = M (x +  x) = M x + M  x –Top-down octree traversal Temporal Coherence Temporal Coherence –Frame-to-frame –M’ x = (M +  M) x = M x +  M x –Can be combined with spatial coherence

74 Transformation Result Floating Point (32 bits/vertex coordinate) Variable Precision (7.9 bits/vertex coordinate)

75 Variable-Precision Lighting

76 Sources of Illumination Errors Operands with different accuracy Operands with different accuracy Square-root operation error Square-root operation error Specular exponentiation error Specular exponentiation error

77 Illumination Errors Operands and with different bits of accuracy: Operands and with different bits of accuracy: Addition error of Addition error of Multiplication error of Multiplication error of Same as in the addition case

78 Illumination Errors Square-root operation error Fixed-point operation  table lookup Fixed-point operation  table lookup 2n bits operand 2n bits operand Most significant n bits as index Most significant n bits as index

79 Illumination Errors Specular exponentiation error of Operand with bits accuracy, Operand with bits accuracy, Error maximized by large,, and Error maximized by large,, and i.e., lose 6 bits of accuracy at most.

80 Illumination Errors Dot-product of vectors lose 2 bits accuracy Dot-product of vectors lose 2 bits accuracy Putting it all together Putting it all together –Specular (least accurate) decides the overall accuracy –lose 1 bit for normalization, 2 bits for dot product, 6 bits for exponentiation –Total loss of accuracy: 9 bits –So: m = n+9 (n = output accuracy, m = input accuracy)

81 Incremental Lighting The error of using L 2 ’ as an estimate of L 2 is in the order of L1L1 V || VV V  L2L2 L2’L2’ v1v1 v2v2    L2L2

82 Implementation Notes l Vertices processed in groups as a tradeoff between –L2 cache size –Expensive cost of resetting MMX register flag between changes in operand types l Avoid error buildup –Matrix setup and composition per frame is full precision –Transformations are variable precision –Computation cost is negligible

83 Results: Venus Floating PointVariable Precision Hao and Varshney, ACM I3D 2001

84 Results: Venus Floating PointVariable Precision

85 Results Auxiliary Machine Room Floating Point Variable Precision

86 Results Auxiliary Machine Room Floating Point Close-up Variable Precision Close-up

87 Conclusions l More efficient transformation and lighting l Complementary to multiresolution approaches l For the datasets we tested –Using PII 400MHz PC with 128M RAM –Voodoo3 3500 graphics card and Glide API –Provides a factor of 4 or more speedup

88 Software l http://www.cs.umd.edu/gvil/vpr.html l Download free for non-commercial use

89 ConclusionsConclusions l l Discrete and View-dependent LODs for simplifications of geometry and topology l l Implicit Dependencies for localizing data accesses l l Skip Strips: Updating triangle strips with view- dependent LODs l l Variable-Precision transformations and lighting l l Discrete and View-dependent LODs for simplifications of geometry and topology l l Implicit Dependencies for localizing data accesses l l Skip Strips: Updating triangle strips with view- dependent LODs l l Variable-Precision transformations and lighting

90 AcknowledgementsAcknowledgements National Science Foundation Dept of Defense Honda R & D, North America General Dynamics UMIACS, University of Maryland Stanford Graphics Lab Cyberware, Inc. National Science Foundation Dept of Defense Honda R & D, North America General Dynamics UMIACS, University of Maryland Stanford Graphics Lab Cyberware, Inc.


Download ppt "Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer."

Similar presentations


Ads by Google