CMPS 161 - Introduction to Computer Visualization and Animation
    FINAL PROJECT PROPOSAL:
        For the final project, I will be doing polygon based 3D morphing.  I will be using the C programming language combined with OpenGL. The user interface will be done with FLTK. My graphics user interface will include a pull down menu with various files from the .coor and .poly data provided by Professor Pang that can be loaded into my program. The user will select two among the data file options to be used for morphing. The user can specify different positions for the lights in the scene and can interact with them during the rendering. The lighting properties(ambient, specular, diffuse ) will be set by the user through fltk buttons. Additional buttons will be provided so the user can specify the colors of the objects that will be morphed. The camera view can also be rotated using various sliders on the viewport. A reset and quit button can be used so the user can clear the viewport and reload new data files or quit when they have seen enough.
 
 
ORDER OF THINGS TO DO:

        I plan to get the final project started as soon as possible but the majority of the work will be reserved for the final week after our last midterm and before the project demonstration on 3/20.
 
 
 
 
 

FINAL PROJECT REPORT:
 

    My final project main objective was 3D Polygon-Based Morphing. The description is consistant with the one above so I will not elaborate much further. However, I underestimated the work that was involved with trying to simulate the morphing of two 3-dimensional objects. The advice I have for anybody trying to pursue this problem is make sure to understand the steps involved with image warping and cross dissolve. Cross dissolving two objects with a given color is fairly easy to grasp, and based on your programming experience, can be implemented without extreme difficulties. The problem I had with the morphing process was image warping. Unfortunately, I could not render the scenes accurately because of premature programming skills. There are websites available for the public to research about what needs to be done to accomplish 3D Polygon-Based Morphing. My difficulties came when trying to naturally and gradually grow/kill polygons over the course of animation. I was able to find and determine points along an abitrary line segment for new points to be generated from when the points making up a polygon mismatched or when a finite number of points had to be removed. According to my plan, the points that needed to "dwindle away" with time would converge to an end point. I tried implementing the 3D Morphing by mapping one polygon to another and transforming the current xyz locations of polygon A to the final xyz locations of polygon B. I would trace the execution of my program to view the data values being created from all the arithmetic and geometry. The values appeared correct with the small data files I created but, to my dismay, I could not accomplish my task. By far, the image warping took most of my time and the implementation of my algorithms were slow to come around because I kept revising my strategies after hitting brick walls.

    From the ORDER OF THINGS TO DO: list, I was able to keep my word on the first six out of the seven bullets I promised to be included within my final project. I expanded upong the code I had written on the first programming assignment. I jumped on this assignment early to meet the requirements I placed on myself and to prove that I could produce accurate results. I had a lot of bugs from program 0 and I wanted to correct them before I moved on. I was slow to learn the correct methods, but I'm proud of what I accomplished and was able to understand OpenGL concepts and code more clearly as long as time was on my side.

    On my Graphics User Interface, GUI, I included several buttons and sliders so the user can adjust various color values, light properties, toggle different projections, move and locate various lights, and set the animation. Here is the full picture of my GUI:
 

    
 

        The user can set color values for each of the objects to use for the cross dissolve between the images. There are pull down menus located beneath each one of the value inputs. The menu items are a few files that Professor Pang provided. The two data files that are read in by the program have a .coor file that contains the pont number and the xyz location and a .poly file that specifies the point connectivity. The files for each object were crucial to my programs execution and constantly being referred to within the code I have written.  Below the pull-down menus are some sliders so the viewer can get various angles of the object and change their perspective. This was accomplished by adding the offsets to the camera and eye location in the GluLookAt function. A few toggle switches were included so the viewer has additional options. The axes toggle comes in handy when the xyz axes of the world frame are needed for a reference. The rollers manipulate the lighting properties for each light. The lighting properties(Ambient,Diffuse,Specular) can create some interesting results when different combinations are made. I allow the user to select among any of the three lights that have been set in the frame by choosing one of the buttons off to the right of the light properties. In the top corner, there is a value input that will record the number of keyframes. Below that, there are two buttons that would initialize the morphing process. Originally, I thought I would have time to insert a different morphing technique, "Implode" but I was getting hung up. Below are some interesting combinations of lighting:
 

 
                                                                                                                                                      
A snapshot of the 57 chevy data set with one light with all properties and eye of camera set diagonally above.  The complicated object is a good illustration of how the light behaves when it meets the surface.
This is the shark file with three lights surrounding the object. The original color of the shark is organge and the light properties are mainly red with hints of green/blue.
The woman data set with lighting properties maily on the blue/green side and little specular lighting
 
 

 

NOTE TO GRADER--- I could not produce any movie clips because I have no animation for my program. I can only provide images from my current working code.