Computer Engineering 519 (Graphics) Project 3 Page



This project was the first project to use any 3D features of OpenGL. It concentrated on setting up and manipulating the viewport and changing the scene appearance by changing the viewing parameters. It further enhanced and refined RapidApp programming skills.

Given the gluLookAt, gluProspective, and gluOrtho functions, the set up of the viewport became relatively easy.

The program focused on a few main things: There needed to be a scene with various features - a small house, mountains, a sun, some trees, and a floor. I started the project with those objects, but had lots of extra time. I decided to model a more complicated scene. Since I was at work at the time and I happen to work in Wilhelm, I decided to model selected features of Wilhelm Hall.

I started with a rough outline of Wilhelm. I mostly just guessed at proportions and made some very crude estimates of the width of the building to start. Then I decided to model the windows and interior walls. Afterwards, I decided to model a crude view of my office and our main computer rooms. I still had time left so I modeled a couple interior features in those rooms, mostly the computers. Finally, I added the enviornmental elements - the smiling sun, the random trees, the mountains, and the floor. The interface for the program is shown in Figure 1.

Figure 1: The Initial Program Appearance (click to enlarge)

A slightly better view is straight down the Z axis:

Figure 2: A slightly better view (click to enlarge)

Once the model of Wilhelm was complete, I turned towards the required flight sequeneces. The first one is activated with the 'Pan' button. This basically moves in to a reasonable position near the front of the building. Then, it pans around the building. When it makes it back to the front of the building, the view essentially goes to the next floor and continues.

The second flight sequence is the 'Offices' button. This one starts outside of Wilhelm, enters the loading dock door, walks the short stairway hallway, turns, and heads back towards the elevator. Then, there is a wait for the elevator. It arrives and the view suggests entering the elevator and turning to face the doors. The doors then close and we head up to third floor. Now, we walk down the hallway to 304, my office, enter the door and stop behind my Indy.

Figure 3: The Indy view (click to enlarge)

Clicking the 'Offices' button a second time backs up from the Indy, re-enters the hallway and walks clear to the opposite end to room 335. We then enter 335 and climb up the ramp to the raised floor in our main computer room. We then turn to take in all of the machines. I crudely modeled most of our significant machines. The large rectangular racks straight ahead in this view are our 4 shelfs of PCs making up our 64 node PPro cluster. Odin, our 2-processor Deskside Onyx and Helix, our 6-processor Challenge L appear to have been forgotten. Oops. On the opposite side of the room is our UPS, patch-panel rack, comm-gear rack, 47-node Intel Paragon, 8-processor Power Onyx, our disk rack with ~200g of disk plus our Origin 200 rack-mounted server and our RAID controller. Next to that is another shelf with miscellaneous PCs.

Figure 4: The View of 335(click to enlarge)

None of the tours take you to 4th floor, our newest computer room. However, it is stocked with IBM Power 3 boxes, Compaq Alpha 21264s and Pentium II boxes, but it is pretty easy to get there.

As an extra feature, I added the 'Crash' button. This basically moves to an extremely high elevation and looks down at the scene. Then, the view-up vector is circled around while our Y coordinate decreases, giving the effect of a downward crashing spiral.

A few other features of note: The 'follow' toggle button. This button causes the selected X/Y/Z coordinate to affect both the eye and camera vectors at the same time, basically making it easy to move along straight lines in the scene.

The 'Scene Complexity' toggle buttons toggle the features suggested. This can speed up the scene drawing process.

The 'Flight Speed' scale allows you to increase the flight speed - very useful in debugging and can make 'Crash' look interesting.

The arrow buttons on each of the X/Y/Z scales allow you to increment or decrement the X/Y/Z coordinate of the currently selected view parameter by the value of Flight Speed. This makes it possible for fine-tuning the view.

The Reset button resets the scene to a decent vantage point in case things get messed up.

The Front/Back scales control the front and back clipping plane locations respectively, allow parts of the scene to be chopped out and not rendered.

The FOV dial controls the field of view.

The aspect ratio scale controls the aspect ratio for the scene.

The 4-view/1-view buttons toggle between perspective and parallel views.

One final debugging feature - if you click the right mouse button in the GL drawing area, all of the vital statistics get printed out.



Section 2: Code

There is pretty much only one code file for this project. However, parts of it are really huge. BulletinBoardClass.C

The code is generally straightforward and easily followed. Most of the code is used to draw the building.



Section 3: Known Problems

After turning in the project, I noticed two problems.

1) I forgot the way to split the view on 4-view. So, my top and side views are not in the right spots.

2) A structural detail - the second and third floor interior walls just north of the elevator should be solid, not heading towards a door like the first floor ones. A consequence of the while loop used to draw those walls, I guess.