450 likes | 620 Views
Level Of Detail Management for 3D Games. Generating LODs. Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer Science University of Maryland at College Park http://www.cs.umd.edu/gvil. Geometry & Topology Simplifications. Geometry Simplification
E N D
Generating LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer Science University of Maryland at College Park http://www.cs.umd.edu/gvil
Geometry & Topology Simplifications • Geometry Simplification • Reducing the number of geometric primitives (vertices, edges, triangles) • Topology Simplification • Reducing the number of holes, tunnels, cavities • Geometry + Topology Simplification • Aggressive simplifications
Outline • Local Simplification Operators • Geometry and Topology Simplifications • Global Simplification Operators • Variable-Precision Rendering
Outline • Local Simplification Operators • Geometry and Topology Simplifications • Global Simplification Operators • Variable Precision Rendering
Local Simplification Operators • Edge Collapse • Vertex-Pair Collapse • Triangle Collapse • Cell Collapse • Vertex Removal • General Geometric Replacement
Edge Collapse va Edge Collapse vnew vb VertexSplit Hoppe, SIGGRAPH 96; Xia et al.,Visualization 96; Hoppe, SIGGRAPH 97; Bajaj et al., Visualization 99; Gueziec et al., CG&A 99; …
Half-Edge Collapse va Half-Edge Collapse va vb VertexSplit
Implementation: Watch for Mesh Foldovers va Edge Collapse vc vd vnew vb vd vc
Implementation: Watch for Identical / Non-Manifold Tris Edge Collapse va vnew vb
Vertex-Pair Collapse va Vertex Pair Collapse vnew vb VertexSplit Schroeder, Visualization 97; Garland & Heckbert, SIGGRAPH 97; Popovic & Hoppe, SIGGRAPH 97; El-Sana & Varshney, Eurographics 99; …
Triangle Collapse Triangle Collapse va vc vnew vb Hamann, CAGD 94; Gieng et al., IEEE TVCG 98
Cell Collapse Grid based: Rossignac & Borrel, Modeling in Computer Graphics 93 Octree-based: Luebke & Erikson, SIGGRAPH 98
va Vertex Removal Vertex Removal Triangulation va Schroeder et al., SIGGRAPH 92; Klein & Kramer, Spring Conf. On Comp. Graphics 97
General Geometric Replacement • Replace a subset of adjacent triangles by a simplified set with same boundary • Proposed as Multi-triangulation by DeFloriani et al.Visualization 97, Visualization 98 • Fairly general: can encode edge collapses, vertex removals, and edge flips
Discussion / Comparison • Edge Collapse and Triangle Collapse: • Simplest to implement • Support geometric morphing across levels of detail. • Full-edge vs. Half-edge collapses: • Full edge represents better simplifications • Half-edge is more efficient in incremental encoding • Cell Collapse: • Simple, Robust • Varies with rotation/translation of grid • Vertex Removal vs Edge Collapse • Hole retriangulation is not as simple as edge collapse • Smaller number of triangles affected in vertex removal
Outline • Local Simplification Operators • Geometry and Topology Simplifications • Global Simplification Operators • Variable Precision Rendering
Local Topology Simplifying Algorithms • Collapsing vertex pairs / virtual edges • Schroeder, Visualization 97 • Popovic and Hoppe, SIGGRAPH 97 • Garland and Heckbert, SIGGRAPH 97 • Collapsing primitives in a cell • Rossignac and Borrel, Modeling in Comp. Graphics 93 • Luebke and Erikson, SIGGRAPH 97
Simplifying Genus • Allow virtual edge collapses • Limit potentially O(n2) virtual edges • Typical constraints: • Delaunay edges • Edges that span neighboring cells in a spatial subdivision: octree, grids, etc. • Maximum edge length
Outline • Local Simplification Operators • Geometry and Topology Simplifications • Global Simplification Operators • Variable Precision Rendering
Global Simplification Operators • Usually simplify topology • Volume Processing Operators • Low Pass Filtering • Morphological Processing
Low Pass Filtering in Volumetric Domain • Convert the polygonal mesh to a volumetric grid (voxelization) • Apply low-pass filters of increasing support Triangle counts(a) 334K, (b) 181K, (c) 76K (d) 17K, (e) 3K, (f) 568 [He et al. IEEE TVCG 96]
Morphological Processing • Convert polygonal mesh to a volume grid • Build a distance field • Associate each voxel with smallest distance to the object • Dilation(T) • Any voxel with distance < T is reclassified as being inside; expands the object • Erosion • Complement of dilation; shrinks object • Dilation followed by Erosion simplifies topology • Proposed by Nooruddin & Turk, IEEE TVCG 02
Morphological Operators of Erosion & Dilation Original (140K faces) Topology Simplified (5K faces) Simplified by QSlim (3.3 K faces) Nooruddin & Turk IEEE TVCG 2002 Simplified by QSlim (3.3K faces)
Outline • Local Simplification Operators • Geometry and Topology Simplifications • Global Simplification Operators • Variable-Precision Rendering
Defining Level of Detail • Number of Primitives • Precision of primitives • Colors (Heckbert 82, Xiang 97) • Normals (Deering 95, Zhang & Hoff 97) • Vertex coordinates (King & Rossignac 99)
Variable-Precision Rendering • Reduce the precision of graphics primitives • Relate the number of bits of input precision for a given display accuracy • Speedup 3D transformation and lighting by taking advantage of SIMD parallelism • Explore spatio-temporal coherence
Related Work Sugihara 89 Taubin & Rossignac 98 Milenkovic & Nackman 90 Taubin 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
Variable-Precision vs. Multiresolution Original Multiresolution Variable Precision
Assumptions • Minimum-sized cube covering the object • x, y, z normalized to range [-1.0, 1.0] • N-bit fixed-point representation of operands • Rounding to the nearest integer • Worst-case study
Variable-Precision Transformation • Construct bounding volume hierarchy • Find the projected size of the object • Determine the nearest visible vertex accuracy
Variable-PrecisionTransformation Accuracy needed for each vertex: Compute by using bounding volume hierarchy
Spatio-temporal Coherence • Spatial coherence • Using differences in neighboring vertices • Mx’ = M (x + x) = M x + M x • Top-down octree traversal • Temporal Coherence • Frame-to-frame • M’x = (M + M) x = M x + M x • Can be combined with spatial coherence
Transformation Result Floating Point (32 bits/vertex coordinate) Variable Precision (7.9 bits/vertex coordinate)
Illumination Error Analysis • Specular (least accurate) decides the overall accuracy • Lose 1 bit for normalization, 1~2 bits for dot product, 6 bits for exponentiation • Total loss of accuracy: 8 ~ 9 bits • Overall: m = n+8 or n+9 (n = output accuracy, m = input accuracy)
Implementation Notes • Vertices processed in groups as a tradeoff between • L2 cache size • Expensive cost of resetting MMX register flag between changes in operand types • Avoid error buildup • Matrix setup and composition per frame is full precision • Transformations are variable precision • Computation cost is negligible
Results: Venus Floating Point Variable Precision
Results: Venus Floating Point Variable Precision
Results Auxiliary Machine Room Variable Precision Close-up Floating Point Close-up
Conclusions • • More efficient transformation and lighting • • Complementary to multiresolution approaches • • 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
Variable-Precision Rendering Software http://www.cs.umd.edu/gvil/vpr.html Download free for non-commercial use
What We Discussed • Geometry and Topology Simplifications • Local Simplification Operators • Global Simplification Operators • Variable Precision Transformation and Lighting