Skip to content

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

Notifications You must be signed in to change notification settings

BugelNiels/parallel-cpu-catmull-clark-subdivision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Parallel CPU Catmull-Clark Subdivision

A fast CPU-based Catmull-Clark subdivision framework

About The Project

This framework contains the parallel CPU implementation of the method described in the paper: A Halfedge Refinement Rule for Parallel Catmull-Clark Subdivision. The framework supports quad meshes, non-quad meshes and meshes with boundaries.

Getting Started

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

Prerequisites

You need 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/parallel-cpu-catmull-clark-subdivision.git
qmake CpuSubdivision.pro
make
cd build

Running

You can run the project as follows to run the full framework include GUI:

./cpuSubdivide

To run the project without the GUI, you can use the following:

./cpuSubdivide -c -f "../models/bigguy.obj" -l 6 -t 4

This will run the commandline subdivision on bigguy.obj. It will subdivide the mesh provided at the -f position: models/bigguy.obj 6 times (-l) using 4 threads (-t). For now, the framework does not save any results. The timings in milliseconds will be written to a file called timings.txt.

Alternatively, it can be run using QtCreator by opening the CpuSubdivision.pro file and pressing the run button (or pressing ctrl+r).

Usage

The Import OBJ file button can be used to import .obj files. A number of example meshes are provided in the models directory.

Object Loaded

Movement around the mesh is performed by pressing and dragging the mouse. Scrolling can be used for zooming in and out.

A number of Catmull-Clark subdivision steps can be applied by changing the spinner. Note that it will reevaluate the entire mesh each time this spinner is changed. This is done so that the timings are accurate.

In addition to changing the spinner, the Require Apply checkbox can be enabled to apply the subdivision once the user presses Apply.

Object Subdivided

The frameworks also provides options to display the wireframe and normals of the mesh:

Object Wireframe

Object Normals

Timings and a summary of the base mesh and subdivided mesh can be found on the bottom left.

About

This repository contains a fast CPU implementation of the Catmull-Clark Subdivision scheme. 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