CSCI E-234:
Introduction to Computer Graphics and GPU Programming

 

Current semester: Spring 2007 (January 31, 2007 through May 16, 2007)

Instructors: Hanspeter Pfister (pfister@merl.com) and Eric Chan (chan@merl.com)

This class is offered through the Harvard Extension School and is also a distance education course.

Previous semesters:   Fall 2005

Quick links:   Course Info   Requirements   Lectures   Videos   Homeworks   Projects   Resources  


Announcements

April 6   The final project description (requirements, suggestions, etc.) has been posted. Please read it carefully. The first due date is Monday, April 16, Noon EST (project proposal).
 
April 2   Homework 6 is posted. Note that both problems in this homework are extra credit (i.e., they are not required, but you will earn bonus points if you solve them correctly).
 
March 16   Section 7 (Friday March 16) is cancelled because of nasty weather. (Hmm, maybe we should discuss how to simulate falling snow during the next class ...)
 
March 11   Homework 5 has been posted. It is due in 3 weeks.
 
February 26   Homework 4 has been posted. It is due in 2 weeks.
 
February 22   We have updated the late homework policy. Homeworks cannot be submitted later than Noon EST on the Wednesday following the deadline. Example: if a homework is due Monday Feb 26 at Noon EST, then you cannot submit any later than Wednesday Feb 28 at Noon EST.
 
February 18   Homework 3 is posted. Please start early!
 
February 12   For those of you who are having trouble getting the starter code to run on your computers because of GLSL driver support issues, I have posted new versions of the starter code for Section 2 and the starter code for Homework 2. The features are the same, but I have tweaked the names of the GLSL API function calls to improve backwards compatibility. I have also made some changes in response to student feedback, including removing linker warnings on Windows and updates to the GLUI code so that it compiles under GCC on Mac OS X.

I have also posted example solution code for Section 2 which shows the Blinn-Phong lighting model (which we implemented in section) applied to the torus and cone.
 

February 9   Since the videos from Friday's sections don't get posted until the following Monday, we are changing homework deadlines to Mondays. This means that homeworks will be handed out and handed in every Monday. The Homework 2 deadline has been extended to Monday, February 19.

The video from lecture 2 is now online.
 

February 7   Homework 2 has been posted.
 
February 3   The final part of Homework 1 has been posted.
 
February 2   The video for the first lecture has been posted. In the future, I will place links to the videos in the Lectures section below.

More information about the Visual C++ 2005 Express Edition compiler has been posted below in the Requirements section.
 

February 1   Homework 1 is posted and is due Wednesday February 7 at noon EST. There are three parts. The first two parts are posted, and the third part will be posted no later than Sunday February 4.

Additional information about the Skype chat room for distance students has been added below.

 
January 16   Welcome to the Spring 2007 semester of CSCI E-234!! For the first time, this class will have required sections in addition to lectures. Sections are held every Friday night at 7:35 PM and are designed to give you practical experience with OpenGL and the OpenGL Shading Language. We will work through exercises that will help you with your homeworks and help you better understand how the programming assignments relate to the lecture topics.

Here is a link to the previous semester this course was offered (Fall 2005). You can take a look at these older web pages to get an idea of what the course is about and to see what types of final projects the students developed.


Course Info

Lectures: Wednesday, 7:35-9:35 PM, 53 Church Street , Room L01

Sections: Friday, 7:35-9:00 PM, 53 Church Street , Room L01

TA Office Hours: By appointment only

Description: The goal of this class is to learn essential computer graphics concepts and to learn how to write computer graphics applications in OpenGL. We will cover graphics processor unit (GPU) programming using the OpenGL Shading Language (GLSL). GPUs are widely used today to drive cutting-edge 3D game engines, virtual reality simulations, and film pre-production. GPUs have changed computer graphics and how we teach it. Students will learn how to program GPUs to perform a variety of tasks, such as 3D lighting, animation, image processing, and special effects.

Grading: Students will be graded on weekly homework assignments, in-class participation, and a final project and presentation. There will be no exams. The final grade will be composed as follows:

Class Participation.............................................................. 10%
Homeworks......................................................................... 60%
Final Project........................................................................ 30%

Mailing List and Message Board: Students need to subscribe to the class mailing list. This is mainly your forum: use it to ask questions, discuss problems, and help each other out.
To subscribe: https://lists.dce.harvard.edu/mailman/listinfo/cscie234
To post a message: cscie234@lists.dce.harvard.edu
For help: Send an email to cscie234-request@lists.dce.harvard.edu with the word "help" in the subject or body of the message.

Live & Archived Video Feeds: The class will be recorded and broadcast with live video feeds to better support our distance education students. Here is the link to the live video feed - it will work only while the lecture is being recorded (Wednesdays, 7:35 - 9:35 pm EST) and while the section is being recorded (Fridays, 7:35 - 9:00 pm EST). One of the instructors will be online in a Skype chat room with the account name csci-e234 so that distance students can ask questions during class (see below for more details). The archived videos of the lectures are available about two days later.

Skype Chat Room: If you are a distance ed student, you can participate in class via the Skype chat room. Download and install the Skype software on your computer. When you first launch Skype, it will prompt you to create a new Skype account if you don't already have one. Skype accounts are free. Once you're logged in, add the user csci-e234 to your contact list. During class hours, one of the instructors (usually Eric) will add you to a public chat room where you can type your questions and comments.

Homework Late Day Policy: Each student is given two "late days" at the beginning of the semester. You can use a late day to submit any regular homework assignment up to 24 hours after the due date without penalty. Late days are intended to give you flexibility: you can use them for any reason (e.g., if you are sick, out of town, or have a particularly busy week). You can either choose to use two late days on a single homework (allowing you to submit up to 48 hours after the original due date without penalty), or one late day each on two different homeworks. However, you only get two late days for the whole semester, so please use them wisely! You don't get any bonus points for not using your late days. Also, you can't use late days for your final project (i.e., the final project deadline is absolute). Homework submissions will not be accepted after Noon EST on the Wednesday following the deadline.

Academic Honesty: You absolutely must acknowledge any source code that was not written by you by mentioning the original author(s) directly in your source code (comment or header). You can also acknowledge sources in a README.txt file if you used whole classes or libraries. Do not remove any original copyright notices and headers. Without prior written approval by the instructor you may not submit the same material to two courses. Plagiarism, cheating, and other forms of academic dishonesty will be reported to the office of the Dean and can have very serious consequences. For more information see the Harvard Extension School academic guidelines.
 


Requirements

Prerequisites: You will get the most out of this course if you:

  • have C or C++ programming experience (essential for completing homeworks!)
  • have taken an introductory data structure course (e.g. CSCI E-119)
  • have some linear algebra background

We will review linear algebra concepts as needed throughout the course, so don't worry if you're rusty in these areas. If you haven't seen C/C++ at all, you may have trouble keeping up in the course unless you pick it up quickly in the first few weeks.

Books: The required textbooks for the course are:

Hill-Book Computer Graphics Using OpenGL, by Francis S. Hill, Jr., 2nd edition (May 15, 2000), Prentice Hall, ISBN: 0023548568.

Francis Hill does a great job of explaining the basic concepts, the theory, and the details of various subjects in computer graphics. The book is easy to read and full of exercises and example programs using OpenGL.

OpenGL Programming Guide, Fifth Edition: The Official Guide to Learning OpenGL by Dave Shreiner, Mason Woo, Jackie Neider, Tom Davis, OpenGL Architecture Review Board, Addison Wesley, ISBN: 0321335732.

This book is the standard reference for OpenGL programming. I recommend you get the fifth edition that covers OpenGL 2.0. However, you will be fine with earlier editions, too.

We recommend (but do not require) the following books:

  • OpenGL Shading Language, by Randi J. Rost (Addison-Wesley, ISBN 0321197895)
  • Fundamentals of Computer Graphics, 2nd ed., by Peter Shirley (AK Peters, ISBN 1568812698).
  • Real-Time Rendering, 2nd ed., by Tomas Akenine-Möller and Eric Haines (AK Peters, ISBN 1568811829).
  • GPU Gems, edited by Randima Fernando (Addison-Wesley, ISBN 0321228324)
  • GPU Gems 2, edited by Matt Pharr (Addison-Wesley, ISBN 0321335597)

Required Hardware: You will need a DirectX 9-class graphics card (about 2002 or later) to complete the homeworks. Please ask us if you're uncertain if your graphics card has the features needed for the course. Also, the Extension School is in the process of upgrading the laptop computers in L01. We expect that the upgraded computers will have sufficiently capable graphics hardware for the course. As of today (January 29, 2007), however, the upgrades have not yet taken place, so you will need your own graphics card in the meantime.

Required Software: All software that you write for your homeworks will have to compile under Microsoft Visual C++ 2005 and run under Windows 2000/XP. Instructions for obtaining this compiler are given below. You are welcome to develop on Linux or Mac OS X, but it is your responsibility to make sure that we can compile and run your code on Windows. Homework starter code will be given out as Visual C++ 2005 projects. Details on submitting homeworks will be given in each homework assignment description.

Microsoft Visual C++ 2005: Microsoft offers a free version of its C/C++ compiler called Microsoft Visual C++ 2005 Express Edition. This version contains an compiler (with an optimizer), debugger, and a graphical integrated development environment (IDE) -- everything you need to complete the homeworks. Instructions on getting started:

  • Download and install this compiler from Microsoft's web site here.
  • Download and install the Platform SDK. The Platform SDK is necessary to build OpenGL programs. Follow the instructions on the web page carefully to set up Visual C++ correctly.


Schedule and Lectures

Note that the following outline is subject to change:

1. January 31 Introduction. Course overview. What is computer graphics? GPU overview.

Reading: Hill Chapter 1; Red Book Chapters 1 and 2.

Lecture and section material:

2. February 7 Illumination. What is light? The BRDF. Vectors and dot products. The Phong BRDF model.

Reading: Hill Chapter 4 (Vector Tools for Graphics), Sections 4.1 to 4.4, and Chapter 8 (Rendering Faces for Visual Realism), Sections 8.1 to 8.3.

Lecture and section material:

3. February 14 Transformations I: Linear Transformations. Multiple Transformations.

Reading: Hill Chapters 4 and 5; Red Book Chapter 3.

Lecture and section material:

4. February 21 Transformations II: Viewing & Projections. Camera models. Viewing Transformation. Projection Matrix. OpenGL Transformation Pipeline.

Reading: Hill Chapters 4 and 5; Red Book Chapter 3 (i.e., same reading as the previous week).

Lecture and section material:

5. February 28 Rasterization. The z-Buffer. Texture Mapping. Environment mapping.

Reading: Hill, Chapter 8 and Chapter 10, 10.8.2; Red Book Chapter 5 (only the section "A Hidden-Surface Removal Survival Kit") and Red Book Chapter 9 (only up through section "Texture Objects")

Lecture and section material:

6. March 7 Advanced Texturing Mapping I: Bump mapping. Coordinate vectors, basis, and frames. Tangent space.

Reading: Same reading as for the previous week.

Lecture and section material:

7. March 14 Advanced Texture Mapping II: Multi-texturing. Projective texture mapping. Shadow mapping.

Reading: Hill, Chapter 8, Section 8.6 (Adding Shadows of Objects)

Lecture and section material:

8. March 21 Makeup for Section 7 (projective texture mapping).
  March 28 Spring Break: No class on Wednesday and no section on Friday!
9. April 4 Hierarchical Modeling and Animation. Hierarchical Modeling. Stick Person and Scene Graphs. Animation. Traditional Cel Animation. Keyframing. Motion Capture. Physical Simulation. Motion Synthesis. There will be no section this week (i.e., no section on Friday, April 6).

Lecture material:

10. April 11 Color theory. Vision and color. Optical illusion examples.

Lecture material:

11. April 18 Ray Tracing I. Introduction to Ray Tracing. Ray generation. Ray intersections. Shadows. Reflections. Refractions. Writing a ray tracer.

Lecture material:

12. April 25 Ray Tracing II. Bounding boxes. Regular grids. BSP trees. Monte Carlo ray tracing. Photon Mapping. Radiosity.

Lecture material:

13. May 2 Advanced Topics and Fun Stuff: 3D Face Modeling, Font Rendering, and Color Management.

Lecture material:

14. May 9 Final class presentations (1 of 2). There will be no section this week (i.e., no section on Friday, May 11).

15. May 16 Final class presentations (2 of 2). There will be no section this week (i.e., no section on Friday, May 18).


Homeworks

Homework 1 (due Wednesday February 7 at noon EST). There are three parts. The first two parts are posted, and the third part will be posted no later than Sunday February 4.

Homework 2 (due Monday February 19 at noon EST).

Homework 3 (due Monday February 26 at noon EST).

Homework 4 (due Monday March 12 at noon EST).

Homework 5 (due Monday April 2 at noon EST).

Homework 6 (due Monday April 16 at noon EST).
 


Resources

There are many good online references:

Useful software:
  • GLUT (for Windows): the OpenGL Utility Toolkit (GLUT) for building user interfaces.
  • G3D: a commercial-grade 3D Engine available as Open Source (BSD License).
  • AMD's (ATI's) Render Monkey: a great tool to develop and debug shaders.
  • GLEW: great library for painlessly loading OpenGL extensions.
  • GLUI: convenient and lightweight set of widgets for building a user interface for OpenGL. Consider using this when GLUT is not enough.

Acknowledgments

We borrowed class material (topics, slides, inspiration, etc.) from the following individuals:

  • Morgan McGuire, Brown
  • Chris Wren, MERL
  • Barbara Cutler, MIT
  • Fredo Durand, MIT
  • Tom Funkhouser, Princeton University
  • Shlomo Gortler, Harvard University
  • Markus Gross, ETH Zürich
  • Paul Heckbert, NVIDIA
  • Joe Marks, MERL
  • Leonard McMillan, MIT
  • Dave Shriner, SGI
Thanks guys!