https://github.com/bigmat18/cuda-mesh-voxelization
GPU-accelerated pipeline for robust 3D mesh Boolean operations (CSG) using voxelized Signed Distance Fields (SDFs).
https://github.com/bigmat18/cuda-mesh-voxelization
computer-graphics cuda hpc mesh-processing voxel
Last synced: 16 days ago
JSON representation
GPU-accelerated pipeline for robust 3D mesh Boolean operations (CSG) using voxelized Signed Distance Fields (SDFs).
- Host: GitHub
- URL: https://github.com/bigmat18/cuda-mesh-voxelization
- Owner: bigmat18
- Created: 2025-06-06T15:55:59.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2026-03-29T01:35:10.000Z (2 months ago)
- Last Synced: 2026-03-29T04:29:46.465Z (2 months ago)
- Topics: computer-graphics, cuda, hpc, mesh-processing, voxel
- Language: C++
- Homepage: https://www.canva.com/design/DAGtctetbj0/ZMeEuIOAW2boftsXtSnLZQ/edit?utm_content=DAGtctetbj0&utm_campaign=designshare&utm_medium=link2&utm_source=sharebutton
- Size: 41.4 MB
- Stars: 25
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CUDA Mesh Voxelization
## 1. Introduction
**CUDA Mesh Voxelization** is a C++/CUDA library and CLI for 3D mesh voxelization, CSG operations, and Signed Distance Field (SDF) computation on the GPU. The project is designed for benchmarking, visualization, and manipulation of volumetric 3D data, with a particular focus on performance and extensibility.
### Features
- **Mesh Voxelization:** Converts 3D triangle meshes into solid or surface voxel grids.
- **CSG Operations:** Supports union, intersection, and difference operations between voxelized meshes.
- **SDF Calculation:** Computes the signed distance field using the Jump Flooding Algorithm (JFA).
- **CLI Application:** Command-line interface for batch processing and benchmarking.
- **Benchmarking:** Comparative analysis between sequential, OpenMP, and CUDA implementations.
- **Visualization:** Exports voxel grids for analysis and plotting.
## 2. Papers, Libraries, and Requirements
### Reference Papers and Algorithms
- [Fast Parallel Surface and Solid Voxelization on GPUs by Michael Schwarz and Hans-Peter Seidel (2010)](https://michael-schwarz.com/research/publ/files/vox-siga10.pdf)
- [Out-of-Core Construction of Sparse Voxel Octrees](https://graphics.cs.kuleuven.be/publications/BLD14OCCSVO)
- [Jump Flooding in GPU with Applications to Voronoi Diagram and Distance Transform](https://www.comp.nus.edu.sg/~tants/jfa/i3d06.pdf)
### Libraries Used
- [cxxopts](https://github.com/jarro2783/cxxopts) for CLI parsing
- CMake as the build system
### Software Requirements
- **C++:** >= C++23
- **CUDA Toolkit:** >= 12.0
- **CMake:** >= 3.20
- **Compiler:** GCC/Clang/MSVC with C++23 support
---
## 3. Installation and Usage
### Installation
```bash
git clone https://github.com/bigmat18/cuda-mesh-voxelization.git
cd cuda-mesh-voxelization
git submodule update --init --recursive
cmake -S . -B build
cmake --build build --config Release
```
### Basic Usage
Voxelize a mesh and export the result:
```bash
./build/Release/apps/cli/cli assets/bunny.obj -n 128 -e -t 2 -p 1 -s
```
**Main options:**
- `-n` number of voxels per grid side
- `-e` enable export
- `-t` algorithm type (0 = sequential, 1 = naive, 2 = tiled, 3 = OpenMP)
- `-p` CSG operation type (1 = union, 2 = intersection, 3 = difference)
- `-s` compute SDF
For all available options:
```bash
./build/Release/apps/cli/cli -h
```
---
## 4. Results
Stanford Armadillo
64 voxels/side
Stanford Dragon
256 voxels/side
Stanford Bunny
128 voxels/side
Armadillo section (128 voxels), colored by SDF value.
CSG section (Bimba ∪ Bunny, 64 voxels), colored by SDF value.
## 5. Benchmark and Performance Analysis
### Voxelization Performance Charts

Bunny 3,510 faces

Bunny 56,172 faces

Bunny 168,516 faces

Bunny 337,032 faces

Bunny 674,064 faces

Bunny 1,348,128 faces
### JFA Performance Charts

Implementations comparison

Stages comparison