Transcript ppt
Level of Detail: Choosing and Generating LODs David Luebke University of Virginia Recap: Generating LODs Simplification operator: – Cell collapse – Vertex removal – Edge collapse Full edge collapse Half edge collapse Vertex-pair merge a.k.a. “virtual edge collapse” Generating LODs Simplification algorithm – Outer optimization: where to simplify No optimization Greedy optimization Ex: uniform grid cells Ex: floating cell clustering Ex: sort edge collapses by error, resort on collapse Lazy optimization Ex: sort edge collapses by error, dirty bit on collapse – Inner optimization: how to simplify Ex: placement of new vertex, retriangulation Basic Greedy Edge Collapse Algorithm Sort all edges (by some metric) repeat Collapse edge choose edge vertex (or compute optimal vertex) Fix-up topology until (no edges left) Recap: Measuring Error Most LOD algorithms measure error geometrically – What is the distance between the original and simplified surface? – What is the volume between the surfaces? – Etc Really this is just an approximation to the actual visual error, which includes: – Color, normal, & texture distortion – Importance of silhouettes, background illumination, semantic importance, etc. Measuring Visual Error Measuring error – Image-based ideas Lindstrom & Turk, SIGGRAPH 2000 – Perceptually-based ideas Luebke & Hallen, EGRW 2001 Williams, Luebke, Cohen, Kelley & Schubert, I3D 2003 Perceptually Driven LOD Idea: measure local simplification operations against a perceptual model to predict whether the user can could see the effect of simplification Model: contrast sensitivity function Perception 101: Contrast Sensitivity Function Contrast grating tests produce a contrast sensitivity function – Threshold contrast vs. spatial frequency – CSF predicts the minimum detectable static stimuli Your Personal CSF Campbell-Robson Chart by Izumi Ohzawa Perceptual Graphics: Where To Next? Incorporate eccentricity, velocity (attention?) Protect copyrighted media: imperceptible “watermarking” via mesh distortion Interactive ray tracing… Measuring Geometric Error Measuring error – Hausdorff distance One-sided: h( A, B) max min a b Two-sided: H ( A, B) max h( A, B), h( B, A) a A bB – Common approximations: Measure vertex-vertex distance, vertex-plane distance METRO: Sample H(A,B) by sprinkling points on triangles Quadric Error Metrics: a variation of vertex-plane distance that works well in practice Edge Collapse Algorithm V2 Collapse V1 V2 Edge Collapse Benefits Edge collapse operation is simple Supports non-manifold topology: Edge Collapse vs. Vertex-Pair Merging Even better: vertex-pair merging merges two vertices that: – Share an edge, or – Are within some threshold distance t Q: What does vertex-pair merging enable over edge collapse? Quadric Error Metric Minimize distance to all planes at a vertex Plane equation for each face: v p: Ax + By + Cz + D 0 Distance to vertex v : p v [A T B C x y D ] 1z Squared Distance At a Vertex D( v ) ( p T v) 2 (v T p )( pT v ) p planes ( v ) p planes ( v ) v T ( ppT )v p planes ( v ) v ppT pplanes ( v ) T v Quadric Derivation (cont’d) ppT is simply the plane equation squared: A2 AB T pp AC AD AD BD BC C2 CD 2 BD CD D AB B2 AC BC The ppT sum at a vertex v is a matrix, Q: D( v ) vT Q v