Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 2.12 KB

File metadata and controls

64 lines (46 loc) · 2.12 KB

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.