15-864 Assignment 2: Mesh Smoothing
Overview
In this short assignment you will write a command line tool
(meshSmooth) to smooth polygon meshes using both
Laplacian smoothing and mean curvature flow.
Details
- Implement an explicit solver for both diffusion- (using the
Laplacian operator and lambda=1) and curvature-based smoothing on meshes, as
described in [Desbrun
et al. 1999]. You may use an explicit forward Euler method to
time-step the system (as described in the paper) up to a specified time, T;
be cogent of the timestep restriction, however.
- Implement a single command line tool, "smoothMesh", that reads
in an input.obj mesh, and writes out a smoothed output.obj mesh:
- smoothMesh [options] input.obj output.obj
Where it should provide options to change the amount of smoothing (end
time, T), and other features as follows:
- --method=TYPE where TYPE is either "laplacian" or
"curvature" (default).
- --duration=TIME where TIME is the duration of smoothing
(default is 1.0). If no time-step size, dt, or number of
iterations is specified, then dt is estimated adaptively using
a conservative time-step restriction. For example, for
Laplacian smoothing (with lambda=1) choose dt = c*L^2 < L^2
where L is the time-dependent minimum edge length. Experiment
to find a large but fixed c value (0state your result in your README file. (You
might also provide an option to specify c.)
- --dt=FLOAT where FLOAT is the time step size. Default is
adaptive time-step size.
- --n=INTEGER where INTEGER is the number of time steps to
take using either the specified dt, or dt=duration/N.
- -display : If present, launch an OpenGL viewer that
animates the mesh smoothing process, and exits when complete.
Modify your viewer from the first assignment to display the
mesh. Also, as an intuitive way to aid in debugging, display
update values (e.g., scaled Laplacian or curvature) at the
vertices. For example, the head at right uses the Matlab Jet colormap to visualize curvature
values. The color scheme you use can be anything you want,
provided that it is clear where the high/low values are.
- -verbose : Print out diagnostic information about the
iterations. For example, print statistics of the Laplacian or
curvature vector over the mesh, e.g., L2 mesh norm, maximum
per-vertex value, etc.
Print selected/default options and parameters upon invocation of
meshSmooth. Document the full list of options in your commandline
tool, e.g., using "smoothMesh --help". Document how normals and
texture coordinates are handled by your meshSmooth implementation.
- As a final step, compare the two smoothing
approaches (curvature flow and Laplacian smoothing) by showing a
side-by-side comparison after N iterations for a few values
of N (a simple jpeg image is sufficient here). For extra
coolness factor, optionally turn in a side-by-side video of
the two approaches iterating.
- At a minimum, your program should work with the Meyer head and sphere meshes. These will
demonstrate that you have correctly implemented the scale-dependent
umbrella operator. It should also work with the simple roughened sphere example (this is a
very simple mesh with well-conditioned triangles, so it should be an
excellent one to test your code on). You can also download these
meshes packaged up as a ZIP
file.
- As usual, turn in your full source code, plus a README
summarizing build instructions, answers to questions, interface
details, etc.
Advanced
- Iris flower mesh: Try to also make your program
work on the triangle iris
flower mesh from Assignment 1. Note that you may be able to smooth
the quad mesh using the Laplacian smoothing formula, but that the
curvature formula is not directly applicable since it is based on
triangles.
- Implicit integration: Implement implicit
fairing as described in [Desbrun et
al. 1999]. You can use an implicit Euler time-stepping scheme,
and iteratively solve the resulting symmetric sparse matrix problem
using the conjugate
gradient method.
- Sharpening?: If you're feeling daring you can
try running your smoothing iteration in reverse by changing the sign
on your mesh correction. This will effectively reverse the direction
of time of the mesh smoothing time-stepping process, and start to
sharpen features. Beware that such "reverse diffusion" process are
inherently unstable and can lead to blow-ups. At any rate, you may
find that you can sharpen some meshes in a useful way, but most
likely this will sharpen some features more than others, and be less
useful--there are better ways to conduct mesh signal
processing. Include any pictures or meshes from any sharpening
experiments.
Additional tips
- If you can't recall how to control materials in OpenGL, Nate
Robins has a refresher.
- Take a look at this page for some useful
library pointers.
- If you're (still?) having trouble logging into the lab machines,
please see this page.
References
NOTE: ACM Digital Library references are accessible from campus connections.
- Gabriel Taubin. A Signal
Processing Approach to Fair Surface Design. Proceedings
of SIGGRAPH 95. pp. 351-358, 1995.
- Mathieu Desbrun, Mark Meyer, Peter Schröder, and Alan H.
Barr. Implicit
Fairing of Irregular Meshes Using Diffusion and Curvature Flow.Proceedings
of SIGGRAPH 99. pp. 317-324, 1999.
Questions? Contact Doug James.