Computer Animation, Spring 2012

Subdivision Surface Modeling

Overview

The goal of this assigment is to introduce you to mesh representation, curve/surface smoothing, and modeling. You will create a basic interactive modeling program for generating smooth surfaces.

Your program will read a set of triangles from a .ray file, build a "control" mesh from these triangles (shown in green above), and displays it in a window using OpenGL. As the program executes, a user can repeatedly subdivide the mesh using the Loop algorithm to produce a smooth subdivision surface for display (shown in gray above). The user may also drag vertices of the control mesh with the mouse; the subdivision surface should be updated continuously in the display.

Your program will manage a hierarchy of meshes. Level 0 is the control mesh and level n+1 is obtained from level n through one application of the Loop subdivision algorithm. Only level 0 and the last mesh, which we call the smooth surface mesh, are displayed. We support a maximum of 10 meshes.

You'll construct the topology of each mesh once. If the user moves vertices of the control mesh, you'll update the geometry of the other meshes using the subdivison rules.

What You Have to Do

The following is a list of features that you will implement. The number in parentheses corresponds to how many points it is worth.

Getting Started

You should use the skeleton code provided here, which is able to load a .ray file and display it, write out a control mesh to a ray file, and provides UI support. You will need to augment the data structure so that the geometry can easily be updated when the user moves a vertex of the control mesh. (THINK THIS THROUGH CAREFULLY.) Consider how you'll update normals and texture coordinates. You will mainly need to modify the following files: There are several support classes which you shouldn't need to touch: The project folder includes a variety of sample files. You will find the syntax for the .ray files here .

What to Submit

You should submit zipped project folder with your model and an html writeup describing what you did and what works.

This assignment is adopted with minor modifications from the computer graphics course COS426 at Princeton as taught by Tom Funkhouser.