You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Implementation Detail
For each face $f$ of the original mesh, a quadric $Q^{f}(\mathbf{v})$ can be defined as the squared distance of a point $v$ to the plane to which $f$ belongs. Suppose $f$ is consisted of three vertices $(\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3)$, this quadric can be written as
After each edge collapse $(v_1, v_2) \rightarrow v$ , the new position of $v$ should minimize the two quadrics related to $v_1$ and $v_2$. This minimum can be easily obtained by solving the linear system: $\nabla Q^{\nu}(\mathbf{v}) = 0$
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.
Usage
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
(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.
Results
Information displayed by self-defined control panel
Example 1 : Stanford Bunny
Original Bunny mesh (2503 vertices); Left : flat mode; Right : wire mode
Simplified Bunny mesh (1000 vertices); Left : flat mode; Right : wire mode
Simplified Bunny mesh (500 vertices); Left : flat mode; Right : wire mode
Simplified Bunny mesh (250 vertices); Left : flat mode; Right : wire mode
Example 2 : Bunny Head
Original Bunny mesh (741 vertices); Left : flat mode; Right : wire mode
Simplified Bunny mesh (370 vertices); Left : flat mode; Right : wire mode
Simplified Bunny mesh (135 vertices); Left : flat mode; Right : wire mode
Simplified Bunny mesh (741 vertices); Left : flat mode; Right : wire mode
Example 3 : 3 balls
UpperLeft: Original 3balls model(547 vertices); UpperRight: Simplified model (270 vertices); LowerLeft: simplified model (135 vertices); LowerRight: simplified model (70 vertices)