git clone : https://github.com/lym29/MeshSimplification
This is an implementation of the mesh simplification algorithm using quadric error metrics, which is a simple case (Simplification of geometry) in the work of Hugues Hoppe. A visualization system including simple keyboard interface is also implemented based on OpenGL. It takes about 40 seconds to work on meshes with 2500 vertices.
For each face
where
Each vertex v of the original mesh is assigned the sum of quadrics on its adjacent faces weighted by face area:
After each edge collapse
By iterating over all edges of original mesh, we can select the edge that leads to the lowest minimum as the next edge for collapse.
Keyboard Interface
- F1 : read file "../meshes/Bunny.obj"
- F2 : read file "../meshes/Bunny_head.obj"
- F3 : read file "../meshes/Balls.obj"
- F4 : select display mode, switch among "flat", "wire" and "flat-wire"
- SHIFT : start to simplify current mesh, enter the target number of vertices as prompted by the console
- F5 : choose which mesh to show, switch between original mesh (read from file) and current mesh
Mouse Interface
- Wheel Up/Down : Zoom Out/In
- Left Mouse : camera rotation
IDE: Visual Studio 2017
3rd party library required: OpenGL, Eigen3.3.7, freeglut 3.2.1, OpenMesh 8.0
(OpenMesh is complied from source code, only OpenMeshCore and OpenMeshTools need to be installed)
Support compiling with CMake. Path to external library may need to be modified in CMakeList.