Reconstruction:
samples from
techniques
Upsampling: increase resolution via interpolation
subdivision
bilateral upsampling
Downsampling: decrease resolution
iterative decimation
variational shape approximation
Resampling: modify sample distribution to improve quality (visualization vs solving equation)
Filter: remove noise or emphasize features
curvature flow
bilateral filter
spectral filter (augment low frequency signal result in exaggerated shape)
Compression: reduce storage size by remove redundant data or approximating unimportant data
Shape Analysis:
computer vision
segmentation
symmetry detection
correspondence
Metrics: how should we judge that our re-meshed result is good
vertex position is close
vertex normal is close
triangles are close to 60 degrees
Delaunay: when there are no other triangle's vertex inside the circle of a triangle
vertex degree: closer to degree 6
In general, you can't have regular vertex degree everywhere.
Metrics:
interpolation vs approximation: do we constraint by the overall looking or the geometric property
limit surface continuity
behavior at irregular vertices
Algorithms:
Quad: Catmull-Clark
Triangle: Loop, Butterfly, Sqrt(3)
The equation, especially the weighting for the new vertex coordinate, here is quiet arbitrary.
Catmull-Clark: Quad subdivision
For edge case: we want the subdivision to behave the same if the tube gets cut in half
Edge Midpoint: e = (a + b) / 2
Vertex Positions: v = 1/8a + 1/8c + 3/4b
Catmull-Clark keeps original irregular vertices but does not introduce new vertices for quads. When applied to triangles, it generates irregular mesh everywhere.
Loop Subdivision: Triangle subdivision with C^2 continuity
Loop Subdivision can be implemented by
split
andflip
.
Greedy Algorithm: iteratively collapse edges
Quadratic Error Metric: the distance between a vertex to its adjacent faces
To calculate the error in 3D coordinates, we need:
query point \vec{x} = (x, y, z) where x, y, z are coordinates
plane normal \vec{n} = (a, b, c) where \vec{n} is a unit vector
distance from plane to origin d = \vec{n} \cdot \vec{p} where \vec{p} is the point where the normal vector \vec{n} points from.
Note that we only need d and \vec{n} to describe a plane. To draw a plane in 3D, first find all the points in a surface of a ball of radius d from the origin. Then, notice every point of the surface have a different normal. Then we can pin point the plane using the normal we stored.
To calculate the error in homogeneous coordinates, we need:
query point \vec{u} = (x, y, z, 1) where x, y, z are coordinates
plane \vec{v} = (a, b, c, d) where (a, b, c) is a unit vector and d is the distance from plane to origin.
Notice that we can represent a 3D plane in homogeneous coordinates as a point in 4D.
Signed distance to a plane is:
Squared distance is
Notice matrix K encodes squared distance to plane \vec{v}. To find the squared distance for any point \vec{u}, you just do \vec{u}^TK\vec{u}.
Furthermore, if you want to find the distance to union of planes P_1, P_2, ..., you can just some multiple matrix K_1, K_2, .... Therefore you only need to do one matrix computation. Which means you can use all planes in your geometry. However, this might not be useful as every point will then be set to the center of the geometry.
Since gradient descent is costly, it might be possible to find a analytical solution to quadratic equations in 2D.
We can write the following 2D quadratic equation in matrix form:
Now we can observe a critical point (when derivative is zero, there can be minimum, maximum, or saddle point) can be described by:
The critical point is a minimum as long as it satisfy: (quadratic term greater than zero)
So we want to minimize the following formula:
Firstly we break up quadratic function into:
We can guarantee B is a positive definite matrix because there exists one point that minimizes this error to zero.
Summary:
compute K_f for each triangle face
set K_i for each vertex i to be \sum K_f from incident triangles
set K_e for each edge e to be K_{ij} = K_i + K_j from incident vertex
find point x that minimize the error, assign the cost to the point to K_{ij}(x).
find the smallest cost K_{ij}(x) and collapse to point x
update costs near the new vertex
The information of the original geometry is never lost in the process of repeating collapse because they are tacked by K_{ij}.
In practice the algorithm might generate flipped triangles. In this case, don't do the operation.
To obtain delaunay mesh, we can flip the edge if
For planer triangulation (2D case), we can guarantee with O(n^2) (where n is the number of triangles) steps, we will eventually get a Delaunay mesh. However, it does not always work in 3D because there might be livelock (loop forever where one edge keeps flipping). But there are ways to detect such livelock and you don't need O(n^2) to get "ok" looking mesh.
Since the average degree of a geometry approaches to 6 as number of triangles increases, you might hope to get a mesh that is very close to degree 6.
There is no guarantee edge flip works. But it works in practice.
We can repeatably center vertices to make triangle more "round".
We can move vertices only in the direction that is tangent to the surface (by removing normal component of the moving direction. The normal direction is calculated using vertex's own neighbores)
Repeat Four Steps:
// QUESTION: how is the numbers here chosen?
Table of Content