This is a maintained fork of Subdivide 2.0, originally created at the Media Research Lab at NYU.
It is meant as companion code to the following paper:
H. Biermann, A. Levin, D. Zorin.
Piecewise smooth subdivision surfaces with normal control.
SIGGRAPH 2000 Conference Proceedings.
- Build System: Updated to use CMake for better portability
- Cross-Platform: Supports Linux, macOS, and Windows
- Modern C++: Updated to C++11 standard
- Modern OpenGL: Updated to use GLFW and GLM
- CI/CD: Automated testing with GitHub Actions
- Improved Documentation: Comprehensive build and usage instructions
- Catmull-Clark for quadrilateral meshes
- Loop for triangular meshes
- Real-time visualization of subdivision surfaces
- Interactive manipulation of creases, corners, and normals
- Export capabilities for both control and subdivided meshes
Complex geometrical features:
Normal interpolation:
Precise surface manipulation at corners:
- CMake 3.15 or later
- C++17 compatible compiler (GCC 8+, Clang 10+, Apple Clang 12+)
- GLFW (for the viewer application)
# Install dependencies
sudo apt-get update
sudo apt-get install -y cmake libglfw3-dev
# Build
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --parallel
# Install dependencies using Homebrew
brew install cmake glfw
# Build
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --parallel
# Install dependencies
vcpkg install glfw3:x64-windows
# Build
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$env:ChocolateyToolsLocation\vcpkg\scripts\buildsystems\vcpkg.cmake"
cmake --build build --config Release --parallel
-DCMAKE_BUILD_TYPE=Release
(default): Optimized release build-DCMAKE_BUILD_TYPE=Debug
: Build with debug symbols
# Show help
./build/bin/ccsub --help
# Subdivide a mesh
./build/bin/ccsub input.wrl -o output.wrl -s 3
# Show help
./build/bin/loopsub --help
# Subdivide a mesh
./build/bin/loopsub input.wrl -o output.wrl -s 2
# Launch the viewer
./build/bin/subviewer [input.wrl]
- Left Mouse Button: Rotate view
- Middle Mouse Button: Pan view
- Right Mouse Button: Zoom in/out
- Space: Toggle control mode between
move
/pick
move
: Drag to change view orientationpick
: Click to toggle mesh entity tags- Edge tags:
smooth
/crease
- Boundary vertex tags:
crease
/corner
- Edge tags:
- S: Increase subdivision depth
- W: Write control mesh to file
- D: Write subdivided mesh to file
Contributions are welcome! Please feel free to submit issues and pull requests.
This project is licensed under the GNU GPLv2.
- Original work by H. Biermann, A. Levin, and D. Zorin
- Recent maintenance work by Máté J Kovács
- Maintained by the open source community