Title: CPSC 535 Presentation: Surface Simplification James Williams
1CPSC 535 Presentation Surface
SimplificationJames Williams
2Overview
The General Polygonal Surface Simplification
Formulation We have a polygonal model M
composed of a fixed set of vertices V v1,
v2, ., vr and a fixed set of faces F
f1, f2, .., fn . We would like to have an
approximation M that contains fewer polygons
than the original model M, yet is as similar to M
as possible.
3Overview
4Overview
- There are a few characteristics of Surface
Simplification algorithms that are useful for
purposes of classification. - Types of Input
- What sort of data does the algorithm operate on?
- eg Heightfields, or more general Polygonal
models? - Attributes of Input
- What properties are present in the input?
- eg Color, texture coordinates, normals? Are they
provided as well? - Domain of output
- Are the vertices of the output restricted to a
subset of the input points, or can they come from
the continuous domain?
5Overview
- Error Metric
- What sort of Error metric is used?
- (More on this later).
- Constraints on Solution
- What are the constraints on the solution?
- Do we want to most accurate approximation using a
given number of elements? - Do we want the solution using the minimum number
of elements that satisfies a given error
tolerance? - What limits are on memory or time?
6Overview
Obviously not all surfaces are polygonal, and
there are simplification algorithms for curves
and related entities. (Which we wont talk about
here).
One approach for understanding the polygonal
Surface Simplification landscape is to classify
algorithms according to the types of polygonal
surfaces that they operate upon
A manifold surface is a surface for which the
infinitesimal neighborhood of every point is
topologically equivalent to a disk (Garland 97)
7Overview
- There are a number of efficient simplification
methods for Height Fields - Regular Grid Methods
- Regular Subsampling etc..
- Hierarchical Subdivision Methods
- Quadtrees, KD trees. Usually based on divide and
conquer strategy. - Feature Methods
- Select a set of important "feature" points in one
pass and use them as the vertex set for
triangulation. - Refinement Methods
- Decimation Methods
- With HeightFields, we have a parameterization of
the surface which is easy to work with, and
algorithms such as Delaunay triangulation can be
applied. This is not the case with Manifold and
Non-Manifold surfaces, which Garlands algorithm
is intended to address.
8Overview
Manifold Methods can be categorized in a similar
fashion
- Non-Manifold Surface Methods are few in number,
and much more difficult to classify.
9Overview
Refinement/Decimation Refinement a
coarse-to-fine approach starting with a minimal
approximation and building up more and more
accurate ones. Decimation a fine-to-coarse
approach starting with an exact fit, and
discarding details to create less and less
accurate approximations. With Manifold and
Non-Manifold surfaces, Decimation methods are
more common. In refinement, you need to develop
the base model from which to work, and getting
the topology of this correct is difficult.
10Overview
Manifold Surface Decimation Methods Vertex
Decimation Methods Delete a vertex and
retriangulate its neighbourhood.
11Overview
Edge Decimation/Contraction Delete one edge and
two triangles and merge two vertices.
12Overview
Pair-wise Decimation
Pair-wise Decimation can join disjoint parts of
models, which makes it appealing for non-manifold
surface applications. In the 97 paper, Garland
touts his algorithms use of pair-wise decimation
as a large advantage over competing algorithms.
13Overview
Vertex Clustering Overlay a grid on top of
the model, merging all vertices that are found
within the same grid cell.
14Overview
Triangle Decimation Methods Delete one triangle
and three edges, merge three vertices and
re-triangulate the neighbourhood. Patch
Decimation Delete a few triangles and
re-triangulate.
15Overview
In order to assess the similarity between M and
its descendent M, we need some means of
quantifying the notion of similarity. Error
Metric We would like an error function E(M,
M) which maps from a model and one of its
descendents to the approximation error of
M. There are quite a few ways of comparing
errors for raster images. But in model
simplification we also have to take into account
the different viewpoints that a model might be
viewed from. Application dependencies will
determine your simplification measure to a large
extent.
16Overview
Because of the difficulties of trying to
calculate error from different viewpoints, and
the potential expense of the calculations, we
generally try to use geometric similarity
measures instead. We have two error metrics from
mathematics
17Overview
- We can create analogs of the two L approximation
norms. - There, we measure deviation as f(x) - g(x) .
- With a surface, we will measure distances between
closest pairs of points. - The distance of a point v to the Model M is
defined to be the distance to the closest point w
on the model
An analog of the L(infinity) norm is the
Hausdorff distance
18Overview
- One thing you can notice about this metric is
that it would be prohibitively expensive to
compute. - Some simplification algorithms do use variants of
these metrics in order to develop simplified
models. - We will see how Garland deals with the error
issue later in the presentation.
19Simplifying Surfaces with Quadric Error Metrics
- The input models are restricted to models
consisting of triangles only. - The algorithm in this paper, (as opposed to the
1998 followup), does not handle other attributes
such as color, texture (etc). - Garland and Heckbert claim the following for
their algorithm - Efficiency
- Quality
- Generality
- They assert that, unlike other algorithms, theirs
is capable of joining unconnected regions of the
model together. This feature is largely due to
the more general vertex-pair contraction
technique.
20Simplifying Surfaces with Quadric Error Metrics
As a consequence, the algorithm does not
guarantee the preservation of the topology of the
original model. They do not assume that their
input models are manifold surfaces, either.
The algorithm does not constrain the output
models vertices to be a subset of the
inputs. The algorithm is an iterative
contraction algorithm, and hence it is greedy.
21Simplifying Surfaces with Quadric Error Metrics
Iterative Contraction Algorithms Pairs of
Vertices ( or edges for the edge contraction
subclass) are ranked according to their cost of
contraction, which is usually the amount of error
introduced into the model as a result of
contracting the two vertices. At each iteration,
the lowest cost pair is selected, contracted, and
the costs of neighbouring vertices are
updated. The error/cost metric is what largely
distinguishes edge contraction methods (and there
are a few) from one another. GH use error
matrices located at each vertex. Another
discriminator is whether or not the new position
of the contracted vertex is forced to be the
position of one of the two original vertices.
GHs algorithm does not do this instead it
tries to find the optimal position.
22Simplifying Surfaces with Quadric Error Metrics
- Garland and Heckbert have this to say about
competing algorithms - Vertex Decimation
- These algorithms are limited to manifold surfaces
and preserve topology, hence they are actually
restrictive for multiresolution rendering. - Vertex Clustering
- The quality of output is quite low, and it is
hard to construct an approximation with a
specified face count. - Edge Contraction
- These algorithms cannot join unconnected regions.
- They preserve topology and are subject to the
same criticism as Vertex Decimation.
23(No Transcript)
24(No Transcript)
25Simplifying Surfaces with Quadric Error Metrics
- A closer look at Pair Contractions
- ( v1, v2 ) ---gt v
- v1 and v2 move to the new position v
- All the incident edges of v2 are connected
instead to v1 - v2 is deleted
- Any edges or faces which have become degenerate
are removed.
Besides the fact that pair contractions can join
unconnected regions, a side benefit (GH argue)
is that the algorithm is less sensitive to the
mesh connectivity of the original model.
Duplicate vertices can be contracted.
26Simplifying Surfaces with Quadric Error Metrics
We want to avoid contractions such as the
following
27Simplifying Surfaces with Quadric Error Metrics
- Pair Selection
- The set of all valid pairs is created at
initialization time, and is - tracked through the course of iteration
- A pair (v1, v2) is a valid pair for contraction
if either - 1. (v1, v2) is an edge
- 2. v1 - v2 lt t, where t is a threshold
parameter. - If t is 0 we have edge contraction.
- (2) amounts to dropping a sphere around each
vertex. - A graph of the threshold value and its emprical
efficacy will follow.
28Simplifying Surfaces with Quadric Error Metrics
29(No Transcript)
30Simplifying Surfaces with Quadric Error Metrics
The Cost of a Contraction To characterize the
cost of a contraction, GH try to characterize
the error at each vertex. To do this they
associate a 44 symmetric matrix Q with each
vertex. The error at vertex v vx , vy , vz ,
1T is
31Simplifying Surfaces with Quadric Error Metrics
Isosurfaces resulting from evaluating Qv e at
each vertex. This gives the set of all points
whose error with respect to Q is e.
32Simplifying Surfaces with Quadric Error Metrics
- For a given contraction (v1, v2) --gt v, they
must derive a new matrix Q representing the
error at the new vertex v -
- Q Q1 Q2
- We must also choose a position for v
- As we mentioned already, v can be constrained to
lie at the position of v1, or the position of v2. - Garland and Heckbert choose to find the optimal
position of v with regards to the error.
33Simplifying Surfaces with Quadric Error Metrics
Their solution is to solve the error function.
- Since this function is quadratic, finding its
minimum is a linear problem. - We find v by finding the position where all
partial derivatives of the error function are 0.
34Simplifying Surfaces with Quadric Error Metrics
GHs Algorithm 1. Compute the Error matrices
for all of the initial Vertices 2. Select all
valid pairs 3. Compute the optimal contraction
target v for each valid pair (v1, v2). The error
of this v becomes the cost of contracting that
pair. 4. Place all the pairs in a min heap keyed
on cost. 5. Iterative remove the pair (v1, v2)
from the top of the heap, contract it, and update
the costs of all valid pairs involving v1.
(Recall that we move v1 to the new location,
reassign the edges of v2 and delete v2.
35Simplifying Surfaces with Quadric Error Metrics
- The last part is to figure out how GH computed
the Quadric Error metrics in the first place. - There is a geometrical interpretation to the
method - Each vertex is the solution of the intersection
of a set of planes. - Associate a set of planes with each vertex and
define the error of the vertex with respect to
this set as the sum of squared distances to its
planes
P a b c d T represents the plane defined
by the equation ax by cz d 0
where a 2 b 2 c 2 1
36Simplifying Surfaces with Quadric Error Metrics
37Simplifying Surfaces with Quadric Error Metrics
The Fundamental Error Quadric Kp can be used to
find the squared distance of any point in space
to the plane p. We can sum the Kps for each
initial plane associated with vertex v and store
it in a single matrix Q. So instead of carrying
around the set of all planes that we have either
had from the beginning or we have obtained from
being the result of a contraction, we can just
carry one matrix. And since the matrix is
symmetric, we can store it in less than 16 values
as well. Thus the Quadric error metric is very
space efficient.
38Simplifying Surfaces with Quadric Error Metrics
- What about overlap?
- What if a vertex that has been created due to a
contraction receives Q1 and Q2 where Q1 and Q2
represent some of the same planes? - We cannot check for overlap, so the planes will
be counted more than once. - This introduces imprecision, but the space
savings more than make up for it.
39Simplifying Surfaces with Quadric Error Metrics
To evaluate their approximations, GH use an
error metric which resembles those which we saw
earlier in the presentation. It measures the
average squared distance between the
approximation and the original model. I wont
repeat the calculation here, but it is similar in
nature and complexity to the Hausdorff
distance. The important thing is that this final
evaluation of similarity is not performed as a
part of the simplification step. It is a
retrospective evaluation.
40Simplifying Surfaces with Quadric Error Metrics
The Edge Contraction vs Pair Contraction
Question G_H provide the following chart
showing pair distance threshold (t) vs
Approximate Error
41Simplifying Surfaces with Quadric Error Metrics
In a follow up paper that deals with extending
the algorithm to cover other attributes like
color and texture, Garland makes the following
comment We will not consider the case of
non-edge pairs in this paper. Our experience has
shown that, while greedy edge contraction
produces consistently good results on many kinds
of models, greedy contraction of arbitrary pairs
is not as robust and does not perform as
consistently Hence the second version of the
algorithm uses only edge contractions.