mGroves Home
Coding
a
mGroves Home Coding OpenGL Demos
Contact Me!
Flat
Shading
Flat
Shading
Gouraud
Shading
Gouraud
Shading
The Computer Graphics class I took at Georgia Tech focused on teaching us fundamental theory and math of computer graphics. We started with ray tracing and continued on to the fixed function pipeline found in recent consumer graphics cards. As a part of the class we discussed and had projects based on the different shading and texturing methods used in fixed function piplines.

Our first OpenGL project was to create a model viewer that allowed us to freely rotate a model with the mouse. It accompanied our discussion of shading models, and allowed us to better understand the two models built into OpenGL, flat shading and Gouraud(smooth) shading. Another shading model, Phong shading, produces better results than Gouraud by calculating lighting on a per pixel basis by interpolating the normal vectors for the vertices of a given fragment. Phong Shading can be used in OpenGL by writing a custom shader.

Another project I did for the graphics class was to expand the model viewer to include different types of texturing. When a 3D/volume texture is applied to the model the texture coordinates at each vertex are based on the location of the vertex in 3D space. Our program also had to generate a donut textured with a tileable image so the texture seamlessly lined up.

The texturing project also covered how to simulate a complex mirrored surface. This can be done by texturing a model with a spherical environment texture created by photographing a mirrored ball. The UV mapping of the texture is constantly updated based on the angle between the surface normal and the camera vector at each vertex of the model. The constant updating of the UV map is what creates the illusion of a mirrored surface as the model is rotated.

©2009 Michael Groves