Transcript ppt

Level of Detail:
Generating LODs
David Luebke
University of Virginia
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 operator:
– Cell collapse
– Vertex removal
– Edge collapse

Full edge collapse


Half edge collapse



Better fidelity (show why)
Less memory
Sort vertices, tris into VAR array for fast rendering
Vertex-pair merge a.k.a. “virtual edge collapse”

Merge separate objects
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
– Coming up: a practical example algorithm
Generating LODs

Measuring error
–
–
–
–
Hausdorff distance
METRO
Quadrics (coming up)
Image-based ideas
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
pplanes ( 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
Using Quadrics

Construct a quadric Q for every vertex
v2
v1
The edge quadric:
Q1
Q
Q2
Q = Q1 + Q2

Sort edges based on edge cost
– Suppose we contract to v1:
– v1’s new quadric is simply:
T
=
edge cost v1 Qv1
Q
Optimal Vertex Placement

Each vertex has a quadric error metric Q
associated with it
– Error is zero for original vertices
– Error nonzero for vertices created by merge
operation(s)

Minimize Q to calculate optimal
coordinates for placing new vertex
– Details in paper
– Authors claim 40-50% less error
Boundary Preservation



To preserve important boundaries, label
edges as normal or discontinuity
For each face with a discontinuity, a plane
perpendicular intersecting the
discontinuous edge is formed.
These planes are then converted into
quadrics, and can be weighted more
heavily with respect to error value.
Preventing Mesh
Inversion

Preventing foldovers:
7
8
8
2
2
10
A
9
3


A
9
5
6
3
merge
1
4
10
6
4
5
Calculate the adjacent face normals, then
test if they would flip after simplification
If foldver, that simplification can be
weighted heavier or disallowed.
Quadric Error Metric

Pros:
– Fast! (70K poly bunny to 100 polygons in
seconds)
– Good fidelity even for drastic reduction
– Robust -- handles non-manifold surfaces
– Aggregation -- can merge objects
Quadric Error Metric

Cons:
– Introduces non-manifold surfaces
(bug or feature?)
– Tweak factor t is ugly


Too large: O(n2) running time
Correct value varies with model density
– Needs further extension to handle color (7x7
matrices)
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 etc etc
Measuring Geometric
Error




Hausdorff distance
Average distance
Surface-surface vs
vertex-surface vs
vertex-plane vs
vertex-vertex
Quadric error metrics: vertex-plane
measure that works well in practice