Mesh Subdivider

A simple mesh subdivider algorithm. Run the project here.

Overview

A simple mesh subdivider algorithm implemented with C++ and Eigen. In addition to implementing this algorithm, I also modeled a pair of headphones in Maya with a low-poly coarse mesh to subdivide. Algorithm referenced. Run the project and many others here (contact me for access to the github repository).

Algorithm

This algorithm takes an object with a triangle mesh as an input and outputs a more refined, subdivided mesh. We can represent this object input with two arrays: old_vtx and old_tri, which store the certices and triangles of the original mesh respectively. For the output mesh, we store the vertices and triangles in the initally empty new_vtx and new_mesh.

  1. For each triangle in old_vtx, add 3 midpoint vertices into new_vtx and 4 new subdivided triangles into new_tri
  2. Update the position of an odd vertex by calculating the weighted average of 2 endpoint vertices on its subdividing edge and the 2 opposite vertices on the 2 triangles sharing this edge. All 4 vertices are from the original mesh
  3. Update the position of an even vertex by calculating the weighted average of its one ring of incident vertices on the original mesh and itself