Introduction to Computer Graphics Logo
CSU Logo

Project 2, 3D Photo Gallery. Due Monday October 29th.

Overview

This second project of the semester is your chance to master several key elements of 3D graphics within OpenGL. Specifically, 3D navigation and the use of texture maps. You will build a program that loads at least four pictures and displays them on "billboards" within a 3D scene. When the program opens, all billboards must be in view, although some will be closer to the viewer than others. The mouse may then be used to move around the scene and view the bill boards from different perspectives. In general, you are encouraged to use some creativity in how the billboards are arranged and displayed. Likewise, the choice of photography is yours provided it is appropriate for display in a public setting and not encumbered by copyright restrictions. Observe the due date on this assignment. As noted below, the code to load images and texture map them to rectangular faces is being given to you. So, this is mostly an assignment about setting up and moving a camera model. This should be entirely reasonable given the time available, but do start experimenting with the code provided sooner, not later.

Functional Requirements

Your 3D Photo Gallery must, at a minimum, do the following:

Display 4 photographs
At least four billboards must be present in the scene. Their placement is largely your choice. However, avoid something so simple as making them all parallel to each other. The billboards must also have volume and backs. In other words, they should appear as true 3D objects, perhaps thin, and certainly one should not see a mirror image of the photograph if one navigates around to the back.
Photographs
What photographs you choose is up to you. Just keep in mind that normal standards of decency within the University apply. Also keep in mind that imagery must free from copyright restrictions. In the readme file you submit with your assignment you must explicitly list where each photograph comes from and why you consider it open for use. For example, imagery from morguefile or wikimedia commons are typically in the creative commons and perfectly fine. You are also, of course, free to use photographs you have taken yourself.
Navigation
You must implement mouse based navigation. Specifically, you must be able to move around among the pictures on a level ground plane. You must also be able to change the gaze direction of the camera. To be precise, assume that the up axis in the scene is the Z axis, then the camera must be able to translate in the X-Y plane at a constant Z well suited to seeing the pictures. You must also be able to rotated the camera, where rotate here means to rotate in the X-Y plane; not general 3D rotation.

Suggestions

Here are a few suggestions that might prove useful to you as you proceed with this project.

Navigation Modes
It will probably work out best if you provide two distinct navigation modes, move and orient. In move mode, x and y movement of the mouse up and down and side to side over the display should move the camera in the X and Y coordinates of the 3D scene. In orient mode, you should probably use horizontal movement of the mouse to rotate the view of the camera. Optionally, you may want to allow vertical mouse movement to tilt the camera up or down slightly, but be careful with this, since it can be very disorienting if done too much.
Ground Plane
You are not being required to provide a ground plane, since some of you may choose to get creative with 3D open space visualization techniques. However, a good default is to anchor your bill boards to a clear ground plane the provides a suitable illusion that the viewer is walking upon a surface. If you choose to stray from this approach, take care that you do something suitably interesting and creative.
Photo Sizes and Editing
OpenGL requires 2D texture maps to have dimensions which are powers of 2. So, be careful to pre-process your imagery so as to meet this requirement. GIMP is a fine tool for doing this, and we will demonstrate this in lecture. Also, have a heart for the graphic processing power of the machines you are using to do this assignments. I have not pushed hard on our Linux workstations, but I expect if you start loading lots of images, and/or using very large images, performance may start to fall off quickly. Start off small, perhaps using 512 by 256 pixel images.
Getting Started
Code is being provided, and will be reviewed in class on Friday October 12th, that reads a PNG image file into a C++ object and then maps the associated texture image to a 3D rectangle. This is where you should start, and should allow you to focus on the fun parts of picking photographs, placing them in a scene, and implementing navigation.

Addendums

If history is any guide, there will be addendums to this assignment that clarify what is expected. These will be posted and dated here as well as announced in lecture as they arise.

Double Buffering (10/15/07)
You must turn on and use double buffering in this assignment.
Compiler Warnings (10/15/07)
Points will be taken off assignments that generate compiler warnings. Exceptions may be made, but only of a sound reason is provided for why the warning is a weakness of the compiler, and not the code author.
Standard Output - Text Messages (10/15/07)
While print statements are a fine way for you to debug and monitor your code, they get in the way when your assignment is being graded. Take care to have turned off all such text chatter before submitting your final code.

Submission

All of your code must be in one directory and include a single makefile that will successfully compile it on one of the CS Department Linux Machines. To submit your project, you will upload a single tar file with the contents of this directly to RamCT. The project will appear on RamCT in the week it is due. Do not forget to include the source photographs your program will load upon startup.