Skip to content

This repository contains a fast GPU implementation of the Catmull-Clark Subdivision scheme in CUDA. It makes use of a pointerless half-edge data structure to construct a number of simple, easily parallelizable algorithms.

BugelNiels/parallel-gpu-catmull-clark-subdivision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Parallel CPU Catmull-Clark Subdivision

A fast GPU-based Catmull-Clark subdivision algorithm using CUDA

About The Project

This project is a CUDA implementation of the method described in the paper: A Halfedge Refinement Rule for Parallel Catmull-Clark Subdivision. It also has a number of optimizations to accelerate it even further. Supports quad meshes, non-quad meshes and meshes with boundaries.

The project works by reading .obj files from the models directory. You can optionally indicate a location of where to write the result. This will be an .obj file in the results directory.

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

You need to the following to be able to compile and run the project

Setup

To set up the program, run the following commands:

    git clone git@github.com:BugelNiels/cuda-subdivision.git
    cd cuda-subdivision
    make

This should work on both Linux and Windows

Running

You can run the project as follows:

  • Linux:

    ./subdivide <subdivision level> <obj file> <optional: result obj file>

    Example:

    ./subdivide 4 bigguy bigguy_result

    Will subdivide the mesh models/bigguy.obj 4 times and write the result to results/bigguy_result.obj

  • Windows:

    subdivide.exe <subdivision level> <obj file> <optional: result obj file>

    Example:

    subdivide.exe 4 bigguy bigguy_result

    Will subdivide the mesh models/bigguy.obj 4 times and write the result to results/bigguy_result.obj

The benchmark.sh script can be used to benchmark. Note that this script is for linux terminals only (but can be adjusted to work for windows as well). The timings in milliseconds will be written to a file called timings.txt.

About

This repository contains a fast GPU implementation of the Catmull-Clark Subdivision scheme in CUDA. It makes use of a pointerless half-edge data structure to construct a number of simple, easily parallelizable algorithms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published