David's Lighting Laboratory

In the CSCI 346 class, Computer Graphics, the OpenGL library was explored. The class stopped short of exploring lighting techniques used by OpenGL. My Senior Project utilizes these techniques by implementing the different types of lighting. Ambient, specular, distant, positional, and spot lights were examined in close detail. Shadows were also implemented to add realism to the scene. My project was done on the alpha UNIX workstations which has the OpenGL software installed.

My method of exploring light with OpenGL started by rendering a three-dimensional object. I chose the torus because its curves enhance the material qualities of the object. I then declared four different lights to be used on the scene. One is a spotlight that has only a cone of light. Another is a distant light that shows the effect of light from a faraway source. The last two lights are positional, omni, lights that emit rays in all directions. Using GLUT, Graphical Library Utility Toolkit, I made a menu that allows the user to select which lights are to be used and also their color. Any combination can be chosen. Shadows are then created by flattening the object into the plane into which it is projected. By taking the plane and the position and direction of the light source, shadows can be created. Three shadows were cast in this manner and added to the scene. Added to the menu were choices for the material of the object. These different materials demonstrate the ambient and specular qualities of the object.

Problems encountered were user, program, and time constraints. I did not have a user to give me feedback on the program since this program was not made for any one specific. I had to decide what to do and how to do it. I had to be sure the code and the program was user friendly. There were programming problems as well. If I made the 3-D object too complex like a teapot, the program slowed down dramatically. Shadows were sometimes rendered as white, but I never found out why. A proven code that was documented would not work as was indicated. Time was the last problem that had to be dealt with. I had to devise deadlines to make sure intermediate goals were met. I also had to schedule what work was to be done when I was on campus because I commute from over an hour away. Scheduling became very important.

The next step would be the addition of greater input by the user to control the scene. Slide bars widgets could be added to control color, material characteristics, and spotlight focusing. This would allow the user to see exactly what he/she wanted.

Development of this project helped me to learn more about graphical programming and specifically, of OpenGL programming. It has also made me more aware of project management requirements and the scheduling that needs to be maintained to complete the final project on time. I was able to successfully program a graphical environment that allows the user to look at different types of lighting techniques in detail.

Advisor: Dr. Wayne Lang

Student Name: 
David Reed