Javier I. Girado

CS 594

GPU Programming

Project 1


Goal: To implement a toon and brick shader and render them over a simple solid cube and a teapot on top. Then, add something more to make things more interesting.


Problems and Solutions




Here follows who it look like:



Video input from the PointGray camera rendering over the teapot using simple texture map (mimicking a mirror).



Video input from the PointGray camera rendering over the teapot and each brick, but this time using Environment Mapping (which looks better than a simple blending the brick color with the texture map).



The code is very well commented and in general the program (ogl2brick.exe) provides the basic: Using the mouse and keyboard you can move the light in the three axes, or drag the model around, change the viewport, resize, zoom, rotate, toggle, background color, switch among three different shaders, etc. Here follows the command line help:


? - Help

q, <esc> - Quit

b - Toggle among background clear colors

1,2,3 - Toggle among shaders

<home> - reset illumination, zoom and rotation

<space> or <click>  - stop rotation

<+>, <-> or <alt + mouse drag>  - zoom model

<arrow keys> or <drag>  - rotate model

<ctrl  + mouse drag>  - move x, y light

<shift + mouse drag> - move z light


Platform/Libraries:  Compile with Micorosft .NET 2003. In order to run it needs GLEW, GLUT and PointGray DLLs.

The code can be found here.


I’ll leave my machine at the lab with the camera connected. I setup an icon in the desktop called ‘Porject 1 oglbrick’. Fill free to test the program any time.