CS 455 - Programming Assignment 3

Download this zip file. In this assignment you will use lighting, textures, and models to create a simple 3D scene. Use the files contained in the zip file to create a scene of a "room" with a lamp sitting on a table, which is against one of the walls, and with a Lego mini-fig standing next to the table. The mini-fig should be scaled to look like an adult next to the table. The room should just be two walls and a floor meeting at a corner. The floor should have a wooden floor texture. Give the two walls any material properties that you like. Make sure that the room has an appropriate amount of ambient, diffuse and specular light. Make the lampshade "glow" by using emissive light. Use a perspective projection. Use the keyboard commands "x/X", "y/Y" and "z/Z" to allow the user of the program to move the camper in the x, y and z directions.

Use keyboard commands "s/S" to make the mini-fig swing one of his legs ("s" can rotate the leg clockwise and "S" counter-clockwise). This is the hardest part of the assignment. Work on it after doing all the other parts.

In the zip file is a skeleton program, hw3.c, that loads a model file called minifig.obj. This is so that you can get an idea of how to use the glm.c library to load a model into an OpenGL program.

Also in the zip file are two other model files that you need to complete your scene, a model for the table and a model for the lamp, and a jpg file that you should use as the texture for the floor of your room.

You will need to create a material, .mtl, file for the lamp and its shade. Look at example material files to get an idea of how to do this.

Turn in a zip file called CS455Hw3Surname.zip containing your C program and all the models and libraries that are needed to compile and run your program. This assignment is due Friday, May 1.


Return to the main homework page.
Return to the CS 455 home page.


compliments and criticisms