In 2009 I took an intro course to openGL. For some time I had been wanting to get working with graphics using C/C++ but never had a library to work with. My former experience with graphics was using Java in high school (which reminds me, I MUST find some of those projects, they were awesome). [
Update 3/3/2012. You can now download and see this project first-hand! See details at end of post As of 2013, these files have expired due to lack of interest]
Anyways, I digress. For my final project, I had to choose a subject to render in 3D. Some students choose to render little boxcars, others did some really cool things with lights and spheres. I chose to pay homage to the man who gave us The Simpson’s – Matt Groening – by rendering the iconic living room and couch we see every episode.
Some notes about the project:
Every object is rendered using openGL primitives minus the lampshade on the right. I built that by hand.
The project took nearly 40 hours to complete.
The user can change a couple settings about the scene:
1. The ‘r’ key makes the telephone start ringing. ‘r’ again makes it stop
2. You can change the ball material from red rubber to silver to emerald
3. You can change the painting between the iconic sailboat, a picture of Kramer from Seinfeld, or a cool picture of an asteroid impacting a planet.
4. You can modify the ball to bounce lower or higher than normal, causing a faster or slower movement.
5. You can freely rotate the scene in all axes, and using the wasd keys moves the entire scene left, right, towards the camera, and away from the camera.
Now, I realize there’s no bouncing ball in the actual Simpson’s living room. A requirement for the project was to do something with shadow rendering (may sound easy to you openGL vets, but this is tough for newbies).
Overall, I’m very proud with how this turned out. Of course, my artist friend later informed me he could draw something like this using his digital art tools in about 30 minutes or less. Easy for him to say. He gets instant feedback while he’s working on the scene. For me, it looked something like this:
Here’s a few more pics of the rendered scene:
Downloading and running the project:
- Download the files from here (Update: Link is dead — the file expired due to lack of interest).
- Unzip the folder, and there should be another folder named ‘debug’
- Inside of ‘debug’ is a file named ‘CPS 460 3D Project’, double-click this to run the file
- To Interact with the scene (case-insensitive):
- Right-Click to set properties like painting, ball material, and ball bounce height
- Left-Click and drag to rotate the scene
- Press ‘W’ to zoom in
- Press ‘S’ to zoom out
- Press ‘A’ to rotate clockwise about Z-axis
- Press ‘D’ to rotate counter-clockwise about Z-axis
- Press ‘R’ to start/stop the telephone ringing