Geometry Remesher: Algorithmic Optimization of 3D Meshes
Course Project for Geometric Modeling (Graduate Level)
Spring 2025
Overview
This project implements an adaptive remeshing pipeline based on the algorithm from Alliez et al. (2002) to generate uniform, high-quality re-triangulations of 3D models. The remesher takes irregular triangle meshes with varying triangle sizes and densities and reorganizes them into clean, uniform meshes with well-shaped equilateral triangles.
The Problem
3D meshes often have quality issues:
- Triangles of vastly different sizes
- Poor triangle shapes (long, thin triangles instead of equilateral ones)
- Uneven vertex distribution
- Irregular tessellation that makes further processing difficult
These issues arise from 3D scanning, modeling software, or mesh simplification algorithms. A high-quality remesh with uniform, equilateral triangles is essential for numerical simulations, rendering, and further geometric processing.
Algorithm Pipeline
The remeshing process follows five key steps:
1. Harmonic Parameterization
Map the 3D mesh onto a 2D circular domain using harmonic parameterization. This flattening operation preserves local geometric relationships while creating a workable 2D space.
2. Area Density Map Construction
Compute an area density map that captures how much the original mesh was stretched or compressed during the flattening process. This map guides where we need higher or lower vertex density in the remeshed result.
3. Vertex Resampling
Use an error diffusion algorithm with a Bayer kernel to place new vertices across the flattened surface. The density map ensures points are distributed proportionally to the original mesh’s geometric complexity—more points in areas of high curvature or detail, fewer in flat regions.
4. 2D Delaunay Triangulation
Connect the resampled vertices using 2D Delaunay triangulation, which maximizes the minimum angle of triangles and produces well-shaped triangles in the parametric domain.
5. Inverse Mapping to 3D
Map the new 2D triangulation back to 3D space using the inverse of the harmonic parameterization. The result is a clean, uniformly remeshed 3D model that approximates the original geometry with better triangle quality.
Mask mesh and corresponding 2d representation through the main steps of remeshing. From left to right: Harmonic Parameterization, Area Map Generation, Sampled from Area map
Implementation Details
Language: Python
Key Libraries:
scipy- 2D Delaunay triangulationlibigl- Mesh I/O, harmonic parameterization, and mesh operationsnumpy- Numerical computations
Structure:
- Core remeshing algorithm packaged as a reusable
Remesherclass inremesher.py - Interactive Jupyter notebook with step-by-step visualization of each pipeline stage
- Modular design allows easy experimentation with different density maps and sampling strategies
Key Features
- Adaptive Density Control: Remeshing respects the geometric complexity of the original mesh
- Quality Optimization: Produces near-equilateral triangles for improved numerical stability
- Modular Pipeline: Each stage can be independently modified or replaced
- Visual Debugging: Jupyter notebook workflow enables inspection of intermediate results
Results
The remesher successfully transforms irregular input meshes into clean, uniform triangulations while preserving the overall shape and important geometric features. The quality of output triangles is significantly improved, with most triangles approaching equilateral shape.
Exploring different parameters for remeshing. In the left image, I tried dithering according to the area map (top) and uniform dithering (bottom). In the right image, I remeshed the camel with different grid sizes (different number of samples to be dithered).