CS 551/651: Advanced Computer Graphics
Assignment #3
Goal: Experiment with different techniques to simplify polygonal objects
Assigned: Thursday, April 8, 1999
Due: Thursday, April 22, 1999
Relevant reading /software:
- Some test objects and an OpenGL viewer for polygonal objects (in the .poly format) will be posted on the course web page.
- A few papers describing algorithms you may wish to use:
- Low, Kok-Lim, and T.S. Tan. "Model Simplification Using Vertex Clustering". In 1997 Symposium on Interactive 3D Graphics (1995), ACM SIGGRAPH, pp. 75-82.
- Schroeder, William, J. Zarge and W. Lorenson, "Decimation of Triangle Meshes", Computer Graphics, Vol. 26 (SIGGRAPH 92).
- Hoppe, Hughes. "Progressive Meshes", Computer Graphics, Vol. 30 (SIGGRAPH 96).
- Garland, Michael, and P. Heckbert, "Simplification Using Quadric Error Metrics", Computer Graphics, Vol. 31 (SIGGRAPH 97).
Synopsis: You will write a filter to read in an object file in the .poly format (described on the web page) and write out a simplified version with fewer polygons. Your program should be named simplify and should take an argument –t <num>, where num is the number of polygons desired. You can use any algorithm you like to simplify the model, but be aware that some algorithms make it easier to choose the degree of reduction than others do. Your program will be graded, in order of importance, on fidelity, speed, and accuracy in degree of reduction (i.e., how closely the number of polygons in the simplification matches the specified number of polygons—within 1% of the original model size is close enough for full credit).
Example usage: Your program should be a filter, reading from stdin and writing to stdout:
% simplify –t 1000 < object.poly > simplification.poly
Note that this also allows cascading simplifications by piping the output of one simplify process into the input of another:
% simplify –t 1000 < object.poly | simplify –t 100 > simplification.poly
You can be sure that we will try this.
Grading: The usual 10-point scale. An assignment satisfying the basic requirements will receive 8 points. An assignment implementing "extras" such as additional algorithms (specified with command-line flags), or exhibiting particularly good fidelity or speed, can get up to 9 points. The single best assignment will get 10 points. Note that an assignment which breaks (core dumps, outputs nonsensical simplifications, etc.) on any of our test cases may lose points, so writing robust code matters.
Turning in the assignment: Before class starts on Thursday, April 22, you should:
- Tar up a directory containing your code and your README file. Be sure to remove all object files and executables first! Gzip the tar file.
- Send Dale e-mail, attaching the gzipped tar file.
- Dale will compile your filter and test the result against various sample models.
Advice:
- You can use C++ for this assignment! If you decide to, please use g++ as a compiler to simplify our task of testing your code on different platforms.
- It will make your task easier if you triangulate the object as you read it in. You may assume that all polygons specified in the input file are convex.
- If you have command-line flags to set various parameters of your algorithm (e.g., the depth of the octree in assignment 1), pick the default value of the parameter carefully. We may not have time to experiment with various values for every parameter on every assignment.
- You will want some sort of internal data structure to represent the polygonal model. One useful structure is to have a list of faces (triangles), each of which points to the vertices it contains, and a list of vertices, each of which points to all the faces (triangles) that contain it. You may need a more sophisticated structure depending on the algorithm. One good structure is the winged-edge data structure, described in Foley and van Dam.
- Vertex clustering and decimation are probably the easiest simplification algorithms to code up. Of these, vertex clustering is probably simpler, but decimation allows better control over the degree of simplification. The Quadric Error Metrics algorithm is probably the best combination of speed, fidelity, and robustness, but is more complex to code. Extra credit will be given for inventing a new algorithm, or implementing a difficult algorithm, provided of course that it works.
- Start early! This one could be the toughest yet.
Honor Code: Public-domain code is available on the web for many simplification algorithms. You are specifically forbidden to use code from an external source for this assignment. While I encourage you to read the papers, study the presentations, and generally use the resources of the web, I want all code you write to be your own. See me if you have any questions about how this applies.