This package contains C++ libraries and programs demonstrating mesh processing research published from 1992 to 2003, mostly in ACM SIGGRAPH: surface reconstruction from unorganized points, mesh optimization, subdivision surface fitting, mesh simplification, progressive meshes and geomorphs, view-dependent mesh refinement, smooth terrain level-of-detail, progressive simplicial complexes, optimized mesh traversal, and spherical parameterization. The source code has been updated to modern C++ style and for cross-platform use.
Results rendered by the viewer G3dOGL.
Top: a set of points, the mesh reconstructed from it, and the fitted subdivision surface;
a spherical remesh; a progressive simplicial complex.
Bottom: a progressive mesh at a coarse (800 faces) and at its full resolution;
view-dependent refinement of a terrain.
The programs page shows these and other results together with the commands that create them.
|
Hugues Hoppe, Tony DeRose, Tom Duchamp, John McDonald, Werner Stuetzle.
ACM SIGGRAPH 1992 Proceedings. (2023 Seminal Paper.)
Signed-distance field estimated from a set of unoriented noisy points.
Programs:
ReconDemos:
create_recon_*, view_recon_* |
|
Hugues Hoppe, Tony DeRose, Tom Duchamp, John McDonald, Werner Stuetzle.
ACM SIGGRAPH 1993 Proceedings.
Exploration of the space of triangle meshes to balance model fidelity and conciseness.
Programs:
MeshfitDemos:
create_recon_*, view_recon_*, create_simplified_using_meshopt, view_simplified_using_meshopt |
|
Hugues Hoppe, Tony DeRose, Tom Duchamp, Michael Halstead, Hubert Jin, John McDonald, Jean Schweitzer, Werner Stuetzle.
ACM SIGGRAPH 1994 Proceedings.
Subdivision surfaces with sharp features, and their automatic creation by data fitting.
Programs:
SubdivfitDemos:
create_recon_cactus, view_recon_cactus |
|
Hugues Hoppe.
ACM SIGGRAPH 1996 Proceedings. (2023 Seminal Paper.)
Efficient, lossless, continuous-resolution representation of surface triangulations.
Programs:
MeshSimplify, FilterprogDemos:
create_geomorphs, view_geomorphs |
|
Hugues Hoppe.
Computers & Graphics, 22(1), 1998.
Progressive mesh data structures compatible with GPU vertex buffers.
Demos:
create_pm_club, view_pm_club, determine_approximation_error |
|
Hugues Hoppe.
ACM SIGGRAPH 1997 Proceedings.
Lossless multiresolution structure for incremental selective refinement/coarsening.
Demos:
create_sr_office, view_sr_office |
|
Hugues Hoppe.
IEEE Visualization 1998 Conference. (2023 Test of Time Award.)
Visually smooth adaptation of mesh refinement using cascaded temporal geomorphs.
Demos:
create_terrain_hierarchy, view_terrain_hierarchy, create_sr_terrain, view_sr_terrain, view_gcanyon_* |
|
Jovan Popovic, Hugues Hoppe.
ACM SIGGRAPH 1997 Proceedings.
Progressive encoding of both topology and geometry.
Programs:
G3dOGLDemos:
view_psc_drumset |
|
Hugues Hoppe.
ACM SIGGRAPH 1999 Proceedings.
Face reordering for efficient GPU vertex cache, advocating a FIFO policy.
Programs:
MeshReorderDemos:
create_vertexcache_bunny, view_vertexcache_bunny |
|
Emil Praun, Hugues Hoppe.
ACM SIGGRAPH 2003 Proceedings.
Robust mapping of a surface onto a sphere, allowing 2D-grid resampling.
Programs:
SphereParam, SphereSampleDemos:
create_spherical_param_bunny, view_spherical_param_bunny |
The code compiles with recent C++23 compilers (gcc, clang, or Microsoft Visual C++)
on most platforms (Windows, Linux, WSL, macOS), or within a Docker container.
The steps are summarized here; see make/README.md for the requirements,
the build configurations and options, the unit tests,
and more on the demos.
-
On Linux, WSL, or macOS, using GNU
make:make -j # Build all programs (into bin/unix) and run the unit tests. make -j demos # Also create, check, and view the demo results.
Prerequisites:
- Ubuntu:
sudo apt install make clang libgl-dev libx11-dev libjpeg-dev libpng-dev zlib1g-dev ffmpeg - macOS:
brew install --cask xquartz && brew install ffmpeg
- Ubuntu:
-
On Windows, open
mesh_processing.slnin Microsoft Visual Studio and build the solution (typically asReleaseMD - x64, intobin/msbuild), then create and view the demo results:demos\all_demos_create_results.bat demos\all_demos_view_results.bat
The
makecommands also work on Windows, in a Cygwin or MSYS2 shell, with a choice of four configurations. -
With Docker, on any platform:
docker build -f make/Dockerfile -t mesh-processing . # Build programs and run the unit tests. docker run -it --rm mesh-processing # Start a shell with programs in the PATH.
Pressing the Esc key closes any open program window.
The demo scripts are in demos.
The programs read from stdin (or from files) and write to stdout, so that they combine into pipelines.
For example, the command
FilterPM demos/data/standingblob.pm -info -nfaces 1000 -outmesh | \
Filtermesh -info -signeddistcontour 60 -genus | \
G3dOGL -key DmDeextracts a mesh with 1000 faces from a progressive mesh, remeshes it as the zero isocontour of its signed-distance function on a 603 grid, reports the genus of the new mesh, and shows it in an interactive viewer.
| Program | Purpose |
|---|---|
Recon |
Reconstruct a triangle mesh from unorganized 3D points (or a curve from 2D points). |
Meshfit |
Optimize the connectivity and geometry of a mesh to fit a set of points. |
Polyfit |
Optimize a polyline to fit a set of 2D points. |
Subdivfit |
Fit a piecewise smooth subdivision surface to a set of points. |
MeshDistance |
Measure the differences (in geometry, color, and normals) between two meshes. |
MeshSimplify |
Simplify a mesh using a sequence of edge collapses, and record them. |
Filterprog |
Encode a base mesh and its recorded edge collapses as a progressive mesh. |
FilterPM |
Process a progressive mesh (*.pm), e.g., to extract meshes and geomorphs of given complexities. |
StitchPM |
Stitch the progressive meshes of adjacent terrain tiles into one. |
MinCycles |
Remove topological noise from a mesh by pinching off its smallest nonseparating cycles. |
MeshReorder |
Reorder the faces (and vertices) of a mesh for efficient GPU vertex caching. |
SphereParam |
Parameterize a mesh onto the sphere while minimizing stretch. |
SphereSample |
Resample a spherically parameterized mesh, to create remeshes and texture images. |
Filtermesh |
Process a mesh (*.m). |
Filterimage |
Process an image, or assemble images into a grid. |
Filtervideo |
Process a video, or assemble videos into a grid. |
Filtera3d |
Process a geometry stream of polygons, polylines, and points (*.a3d). |
Filterframe |
Process a stream of coordinate frames (*.frame). |
G3dOGL |
Show meshes, progressive meshes, and geometry streams interactively; save images and videos. |
G3dVec |
Show hidden-line-removed wireframe renderings; save vector figures as SVG or PostScript. |
VideoViewer |
Show images and videos in an interactive viewer, with simple editing. |
The directory bin also contains scripts:
mesh_to_pm creates a progressive mesh from a mesh (using MeshSimplify and Filterprog),
pm_simplify further simplifies the base mesh of a progressive mesh, and
obj_to_mesh, ply_to_mesh, mesh_to_obj, and mesh_to_ply convert between the mesh format (*.m) and
Wavefront *.obj or Stanford *.ply files.
All programs recognize the argument --help (or -?) to show their many options.
See progs/README.md for a description of each program with example commands,
and for the file formats.
The library libHh
contains the main reusable classes.
All files include Hh.h which sets up a common cross-platform environment.
The libraries libHwWindows and libHwX
define implementations of a simple windowing interface (class Hw),
under Win32 and the X Window System, respectively.
Both implementations support OpenGL rendering.
Each program (e.g., Filtermesh) lives in its own subdirectory of
progs
and links against these libraries.
See LICENSE.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.









