Programming Project #2:
View-Dependent Refinement

Given out: September 30
Due back: October 21



For this project, you will implement a model display system which will support view-dependent refinement. Your system will be given an initial model and a sequence of edge contractions. It will construct the corresponding vertex hierarchy. Using the active front technique described in the paper by Hoppe, you will need to maintain a current approximation and incrementally update it in response to changes in the viewpoint.

What to Do

You should do the following:

  • Create a program to read an MMF file (see below), build a vertex hierarchy, and adaptively display approximations of the original model. For the display portion, I recommend using OpenGL for rendering and the GLUT library for windowing and interaction.
  • Implement a refinement criteria which determines when to refine/simplify a particular node in the hierarchy. It should include two components. First, you should use the surface orientation heuristic described by Hoppe. Second, you should include a screen-space geometric error heuristic. This may be the one described by Hoppe, however you may select an alternative. For example, one possible alternative would be to consider the projected length of the edge between the two endpoints being contracted.
  • You only need to implement adaptation in response to view changes (e.g., zooming, rotating). You do not need to try to restrict the rendering load to achieve constant frame rates.
  • Make some empirical measurements of the system performance using the bunny model. How expensive is the update when the object is smoothly spinning or moving in and out? If the object instantly spins 180 degrees, how expensive is the update? Please provide two measurements of expense: (1) time and (2) number of incremental movements of the active front. Note: for measuring time on Unix machines try getrusage() and GetThreadTimes() under Windows NT.

What to Turn In

You should turn in the following:

  • Source code for your implementation.
  • An executable which will work on either a PC running NT or an SGI R4000 machine running IRIX 6. If you do not have access to one of these platforms, please let me know in advance.
  • A plain ASCII text file describing how your system works and evaluating its performance. Please be explicit about what refinement criteria you use, and explain how to interact with your display interface.
  • Schedule a time to demo your program for me. Demos will be brief, around 10 minutes.
  • Please use the following process to hand in your project materials.

    1. Package your files in a .tar or .zip archive.
    2. Mail this archive to garland+p2@graphics.cs.uiuc.edu

    File Format

    Your program will read files in the Multiresolution Model Format (MMF). This is largely the same as the SMF format used in Project 1 with an additional contraction command. In general, an object file should have the following form:

    begin
    v <x1> <y1> <z1>
    v <x2> <y2> <z2>
    .
    .
    .
    v <xn> <yn> <zn>
    f <u1> <v1> <w1>
    f <u2> <v2> <w2>
    .
    .
    .
    f <um> <vm> <wm>
    end
    v% <i> <j> <dx> <dy> <dz> <killed face list> & <changed face list>
    .
    .
    .
    
    The first block of the file defines the geometry of the original model, and is indicated by "begin" and "end" commands. Following the geometry definition is a sequence of contraction records. These are the contraction performed during the successive iterations of simplification. Each contraction record consists of four distinct parts:
    1. The vertex identifiers i j. These are the vertices being contracted. Remember: vertices are assigned a unique identifier starting from 1 (not 0). NOTE: The remaining vertex is assumed to inherit the identifier i.
    2. The offset vector dx dy dz. The new position of the remaining vertex is determined by adding this offset to the position of vertex i.
    3. A list of identifiers for the faces which degenerate and are removed as a result of this contraction. Like vertices, faces are numbered starting from 1.
    4. A list of face identifiers for the faces adjacent to vertices i j which do not degenerate.

    Sample Models

    I am providing the following test models for you:

  • Cow
  • Bunny
  • For those who are interested, I generated these models using my QSlim simplification software with the command line qslim -t 0 -B 10 -Mlog -o bunny.mmf bunny.smf.

    If you don't have a machine with a graphics accelerator, I suggest you try the Dell machines in 1265/1275 DCL. They are equipped with reasonably good graphics cards, and should be able to display the models used in the assignment without difficulty.

    Collaboration and Code Sharing

    The work you turn in should be the result of your own efforts. While you may discuss the assignment with others, I expect you to develop your own implementations. If you share ideas about implementation techniques you should acknowledge those with whom you have shared these ideas.

    You may use libraries or other code sources for non-essential parts of your implementation. For example, if you are programming in C++ and you have a library which implements a linked list class, feel free to use it. But you should implement the core functionality of the system yourself.


    garland@uiuc.edu 

    Last modified: Thu Oct 21 10:22:51 CDT 1999