CSCI 480/580 - Computer Graphics

Scott Wehrwein

Fall 2024

Course Overview

In Brief

Class meetings:
Office Hours (CF 471 or remote by appointment):

Scott:

Staff

Instructor: Scott Wehrwein (scott.wehrwein@wwu.edu)

Grader: Ian Donovan (donovai@wwu.edu)

About the Course

Official Synopsis from the WWU Course Catalog

An introduction to computer graphics with a focus on 3D rendering. Topics include representation and manipulation of 3D geometry, modeling, and rendering using both ray tracing and rasterization.

Unofficial Synopsis from the Instructor

This course will give an introduction to the fundamentals of computer graphics, with a focus on rendering techniques. At the core of computer graphics is the modeling and rendering of synthetic scenes. We will begin by discussing some basic data structures for modeling 3-dimensional objects, then spend the bulk of the middle of the course covering two fundamentally distinct approaches to rendering. Beginning with image-order rendering, we will investigate raycasting, raytracing, and touch on more advanced image-order rendering techniques such as path tracing. We will then move on to object-order rendering, covering the basics of hardware-accelerated rendering using OpenGL and programmable shaders. Along the way, we will make heavy use of mathematics, in particular linear algebra, 3D geometry, and coordinate transformations. As time allows, we will delve into the details of the rasterization algorithms underlying OpenGL, as well as other topics that might include animation, spline curves, parametric surfaces, and global illumination.

Official Course Outcomes

On completion of CSCI 480, students will demonstrate:

On completion of CSCI 580, students will demonstrate:

Textbook

Other References

Assessment

Grades will be calculated as a weighted average of scores on the following course components, each of which is described in more detail below:

You may notice that the 580 components add up to 110%, which is fitting for graduate students. 580 students’ scores will be scaled by a factor of 10/11 to map them back into the 0-100% range before letter grades are assigned.

The standard letter grade ranges apply (i.e., 90–100% is an A, 80–90% is a B, and so on). The calculated raw percentages may be curved at the instructor’s discretion, but any curve used will not lower anyone’s grade. “+” or “-” cutoffs will be decided at the instructor’s discretion. Students who demonstrate mastery of the material will get grades in the A range, and it is my goal to give as many A’s as possible.

Programming Assignments

Four programming assignments will be given; some will be done individually, while others will be done in pairs. For each paired assignment, you must work with a different partner.

Written Homeworks

Approximately 4 short written homeworks will be assigned. The primary focus of these homeworks is to reinforce the mathematics underlying the concepts covered in class and make sure you’re prepared to implement the math in the programming assignments.

You may submit a revised version for regrading up to a week after initial feedback is released. To have your submission regraded, you need to email me and the grader to let us know. No additional credit will be given for revisions on a problem if the original submission did not contain an honest effort at a solution.

Midterm Exam

Since there is no final exam, the midterm exam is given later in the quarter. The midterm will be a take-home exam released on Friday, 11/8 and due by the start of class on Tuesday 11/12.

Final Project

In place of a final exam, students will complete a final project, which will provide a chance to explore and implement a special topic beyond the basics covered in the programming assignments. Final projects may either be a significant extension of one of the programming assignments, or a standalone implementation on a separate topic. The final project will be done in groups of two or three. You will submit a project proposal by Friday of the 6th full week of class (11/8). Progress will be tracked via two weekly intermediate milestone deliverables. The final project source code, results, and writeup are due on Sunday night preceeding finals week (12/8), and each group will give a brief (5-minute) project presentation during our final exam slot (between 9:00 and 10:00am on 12/13).

Surveys, Labs, and Participation

Many class periods will include group problem-solving exercises, and later in the quarter we will have several in-class labs. Participation in group work, completion of labs, and responses to feedback surveys will be counted towards this component of your grade. Late surveys will be accepted without penalty as long as they are submitted by the time I review them.

(580 only) Advanced Topic Presentation

Graduate student final project teams will additionally prepare and lead a class on an advanced topic of their choice during the last week of classes. Typically, the topic of this class will either be an overview of an active sub-area of graphics research, or a deep dive into some topic not covered in lecture. The topic often coincides with the group’s final project topic, but it is not required to. Topics will be proposed and finalized alongside final projects.

Logistics

Course Webpage / Syllabus

The Schedule section of this page will be updated as the quarter progresses with topics, links to lecture slides, code examples, readings, and links to assignment and lab handouts. I suggest bookmarking this page (including the #schedule at the end will link you straight to that part of the page); if you forget the URL and need to find your way back here, you can use link on the Syllabus page in Canvas.

Canvas

We will use Canvas for announcements, grades, and submission of written homework. Programming and Homework Assignments will be linked from both the course webpage and the corresponding assignment on Canvas. Lecture notes and readings will be posted on the course webpage only.

Announcements

It is your responsibility to make sure that you promptly become aware of Canvas Announcements as they are posted; Canvas should be configured to send you an email notification by default, but if you are unsure, please come see me in office hours.

Git and GitHub

This course assumes that you have basic familiarity with git. Programming assignments will be completed using git repositories hosted by GitHub and orchestrated by GitHub classroom. You will receive an invitation link to create a repository for each assignment, complete the assignment in a local copy of the repo, and submit by pushing your final changes to GitHub.

Discord

The course Discord server is a good way to interact with your classmates and ask questions. You can find the server invite link on the Syllabus page on Canvas. I try to check the q-and-a channel regularly and answer questions when possible, but I also hope that classmates will also be able to step in and answer questions before I get to them.

Discord is not the place to get help that requires viewing of code, nor is it the place for “official” course communication. A couple points of Discord etiquette that I will require for this class:

Feedback

I take student feedback seriously. I appreciate any feedback you’re willing to give, and I do my best to act on constructive feedback when possible. I will solicit feedback formally partway through the course, but you are welcome to provide feedback at any time in my office hours, by email, or if you desire anonymity you can use this Google Form.

Schedule

This schedule is tentative and subject to change without notice. Slides/notes, assignments, readings, etc. will be posted and updated here throughout the quarter.

Date Topics Materials Assignments Suggested Readings
9/25 (0) 0 Welcome; What is graphics? slides About You Survey due 1 - Introduction
9/27 1 Logistics; Raster Images slides HW0 out
A0 out
3.1–3.3: Raster Images, Pixels, and Image Geometry
9/30 (1) 2 Julia Demo; Vector basics slides
notes
image_demo.jl
2.1: Sets and Mappings
2.3: Trigonometry
2.4: Vectors
10/1 3 Triangle meshes - Geometry slides
problems
12.1 - Triangle Meshes
10/2 4 Triangle meshes - Normals video (watch ahead)
slides
live slides
mesh viewer
meshes
problems
2.5 - Curves and Surfaces
10/4 5 Parametric Surfaces
Triangle meshes - textures
videos (watch ahead):
L05A
L05B
L05C (optional)
slides
live slides
L05C notes
problems
HW0 due 2.1- Sets and Mappings
2.5 - Curves and Surfaces
11.1 - Looking Up Texture Values
11.2.2 - Interpolated Texture Coordinates
11.2.5 - Continuity and Seams
10/7 (2) 6 Ray tracing setup: ray generation and the canonical perspective camera slides
problems
A0 due
HW1 out
A1 out –>
4.1–4.3 - Basic Raytracing, Perspective, Viewing Rays
CGFS Common Concepts, Part I Intro
10/8 7 Coordinate Frames and Bases
General Perspective Cameras
L07A (3B1B; watch ahead)
slides
problems
2.4.5 - Orthonormal Bases and Coordinate Frames
10/9 8 Ray-sphere intersection slides
notes
problems
2.2 - Quadratic Equations
4.4.2 - Ray-Sphere intersection
CGFS Basic ray
10/11 9 Lights, Diffuse Reflection slides
problems
4.5 - Shading
CGFS Light
10/14 (3) 10 Specular Reflection
Shadows
Videos (watch ahead):
A (14:21); (slides)
B (28:41); (slides)
C (4:06); (slides)
problems
live slides
HW1 due 4.7 - 4.8 - Shadows and Specular Reflection
CGFS Shadows, Reflection
10/15 11 Barycentric coordinates
Ray-triangle intersection
A (9:45)
B (27:48)
slides
typed notes
written notes
live slides
problems
2.7 - Triangles
4.4.2 - Ray-triangle intersection
10/16 12 Advanced Ray Tracing slides A1 due
A2 out
HW2 out
Chapter 13 - More Ray Tracing
CGFS Beyond the Basics
10/18 13 A2 code overview live slides
problems
The A2 Handout
10/21 (4) 14 Acceleration Structures Video (watch ahead):
A (32:19), slides
problems
12.3 - Spatial Data Structures
10/22 15 2D Linear Transformations slides/live notes
handwritten notes
problems
5 - Linear Algebra
6.1 - Linear Transformations
10/23 16 Homogeneous Coordinates
Affine Transformations
Affine Composition
slides
notes
problems
HW2 due 6.3 - Affine Transformations
10/25 17 Similarity Transformations
3D Transformations
Transforming Directions and Normals
slides
messy notes
problems
6.2 - 3D Transformations
10/28 (5) 18 Object order introduction
Viewing Transformations 1
slides
notes
typed notes
code
A2 due
HW3 out
7 - Viewing
8.2 - Before and After Rasterization
10/29 19 Viewing Transformations 2 slides
problems
notes
demo
7.1 - Viewing Transformations
10/30 20 Perspective Viewing slides
notes
live notes
problems
A3 out 7.2 - Projective Transformations
7.3 - Perspective Projection
11/1 21 Hierarchical Transformations slides
notes
live notes
depth plot
12.2: Scene Graphs
11/4 (6) 22 The Graphics Pipeline
Hidden Surface Removal
slides
z.obj
HW3 due 8: Graphics Pipeline
11/5 23 OpenGL Intro; Shading in GL slides
shading demo
17: Using Graphics Hardware
11/6 24 OpenGL Lab: Shader Basics slides
lab handout
lab skeleton
notes
GLSL Primer
FP groups due
11/8 25 Rasterization: lines slides
notes
live notes
problems
FP proposal due
Midterm out
8.1: Rasterization
11/11 (7) No Class - Veteran’s Day
11/12 26 Line Lab announcements
Line Lab
Midterm due (start of class)
FP Proposal back
8.1: Rasterization
11/13 27 Clipping slides
problems
8.1: Rasterization
11/15 28 Splines 1 handwritten notes
typed notes
live notes
A3 due 15: Curves; A primer on Bézier Curves
11/18 (8) 29 Splines 2 slides
notes
problems
15: Curves; A primer on Bézier Curves
11/19 30 Splines 3; de Casteljau’s algorithm slides
notes
live notes
FP milestone 1 15: Curves; A primer on Bézier Curves
11/20 31 Spline Lab announcements
Spline Lab
15: Curves; A primer on Bézier Curves
11/22 32 Filtering/AA slides
11/25 (9) 33 Animation slides
11/26 34 Novel View Synthesis slides FP milestone 2
11/27 No Class - Thanksgiving Break
11/29 No Class - Thanksgiving Break
12/2 (10) 35 Grad Presentations:
Multispectral Rendering (Dylan, Jonas, and Nic)
slides
12/3 36 Grad Presentations:
Fancy Lights (Keagan and Dion)
12/4 37 Grad Presentations:
Dithering (Manu and Ryan)
12/6 38 Ask Me Anything
12/8 (Sunday) FP Due (10pm)
12/13 (Friday) Final Project Showcase: 9-10AM

Course Policies

Professionalism

I am committed to maintaining an inclusive, supportive, and professional environment in all academic settings including lectures, labs, and course-related online spaces. Students are expected to live up to the ACM Code of Ethics and Professional Conduct. This is the ethical code adopted by nearly every software professional. Failing to follow the ACM Code of Ethics and Professional Conduct can negatively affect course grades up to and including a failing grade for the course.

Communication Guidelines

Announcements

I will make all course-related announcements either in class or on Canvas. In-class announcements will be posted at the beginning of the lecture notes on the Schedule table on the course webpage. It is your responsibility to make sure that you see Canvas announcements promptly and check the in-class announcements if you miss class. Canvas should be configured to send you an email notification by default, but if you are unsure, please come see me in office hours.

Email

Email is the best way to get in touch with me. I do my best to check email regularly and respond when I can, but I am not able to be instantly responsive all the time. If you have something time-sensitive, email is the medium that I am most likely to see first. You can use Canvas messages as an alternative; these simply go to my email.

Grace

The policies for this course have “grace” built in for most categories of assignments: for example, you have slip days for assignments, and homework assignments with unlimited resubmits.

If any of the above forms of “grace” apply to your situation, you do not need to contact me: the grace policies are applied automatically. If you have extenuating circumstances that have caused you to go beyond the allowed grace, please contact me by email or in person to explain your situation.

Canvas Submission Comments

I do not read Canvas submission comments, so please do not use them. If you have a message for me and/or the TAs, please use email instead.

See Me After Class

Many quick questions can be resolved in a timely fashion by talking to me after class instead of using email or waiting for office hours. I will be available for up to 10 minutes following lecture, so please feel free to use this time to resolve quick questions or issues.

Late Work

You have five “slip days” that you may use at your discretion to submit programming assignments or written homeworks late. Slip days cannot be used for the final project. You may use slip days one at a time or together - for example, you might submit each of five assignments one day late, or submit one assignment five days late. Each slip day moves the deadline by exactly 24 hours from the original deadline; if you go beyond this, you will need to use a second slip day, if available.

After your slip days are exhausted, a penalty of 0.1 * total_assignment_points * floor(hours_late/24 + 1) - that is, 10% of the total points per day late, will be applied.

To use slip days or submit work late, you do not need to let me know ahead of time. For written homeworks, simply submit to Canvas when you are ready, and I will apply slip days according to the submission time, noting the number of slip days used in your feedback. For programming assignments, you will complete your submission by pushing code to Github and filling out a Canvas survey. The submission time of the survey must be after your final push to Github and will be used as the time of submission.

Slip days cannot be used for take-home exams or any deadlines associated with the final project.

Programming Guidelines

Your programs will be graded on correctness, clarity, and efficiency (in that order).

Correctness:

A correct program is one that always produces the correct output for a given input. Also, a correct program does not produce unintended side-effects. The most effective way to ensure that your program is correct is to test, test, test. Test each component as you introduce it; once you are confident that a component works you can use it in other routines. Try to break your program in testing, and if you succeed, locate the bug and fix it. The better you test your program, the more likely it is to be correct - the more likely it is to be correct, the more likely you’ll earn a good score. Most of your grade will depend on the correctness of your code.

Clarity:

The easier it is to read and maintain your code, the easier it is to locate and remove bugs. Your program should be well organized, appropriately commented, and easy to maintain. To have a well-organized program, design your program thoughtfully and modularly. Think before you code: hacking away blindly leads to ugly, difficult-to-read code. If you do hack away, producing a functional but ugly wall of code, try to clean it up a bit. Make sure that your cleaning does not introduce new bugs.

As for comments, please follow these simple guidelines proposed by Emeritus Professor Osborne:

Efficiency:

Your programs should be asymptotically efficient, e.g. checking graph reflexivity should be O(n), insertion into a balanced tree should be O(log n), etc. Do not optimize your code beyond the asymptotic level at the expense of clarity unless the benefits are substantial, and even then do so judiciously, and justify and document your optimizations in comments.

Academic Honesty

Collaboration Policy - Individual Assignments

Individual programming assignments are to be completed independently. Students are welcome to discuss assignments with each other on a conceptual level, but each student should be writing their code independently and without direct help from fellow students. Sharing your code with others or looking at someone else’s code is an explicit violation of this collaboration policy. The best way to be absolutely sure you are collaborating appropriately is follow these two rules:

Automated tools will be used to check your code for plagiarism at the push of a button. They are not fooled by tricks such as changing variable naming and whitespace: in fact, hiding plagiarism is harder than doing the assignment.

Collaboration Policy - Team Based Assignments

For pair programming assignments, the above policy applies to any collaborations with people outside your group. In addition, each partner must be able to independently explain all of the code that your team submits. Pair programming is the recommended way to ensure that this guideline is met, but it is not strictly required. If one team member writes code separately, I suggest having the other team member perform a thorough code review.

On The Use of AI Tools

AI tools such as ChatGPT and Github Copilot raise significant, new, and unanswered questions about their role in education, and indeed in the work your education is likely preparing you for. No one knows what this means for the future! This quarter, I am adopting a (perhaps radically) liberal policy towards the use of AI tools in completing coursework: you may use AI tools in any way to help you complete any work for this course with the exception of exams. The only condition is that you tell me about how you used AI tools. For written homeworks, you should include notes either inline or at the end describing how you used AI; for programming assignments, you should provide details on the Canvas survey for that assignment. Because I’m partly using this as a chance to learn how these tools can be useful, I expect a fair amount of detail in this reporting. Generic statements like “used ChatGPT to draft code for some methods” are insufficient. Instead, (in this example) tell me which methods you had it draft and what you had to do to each one to get to the final product. Or, submit the transcript of your session alongside the assignment.

Changes to the Syllabus

This syllabus is subject to change. Changes, if any, will be announced in class or online. Students will be held responsible for all changes.

University Policies

All University-wide policies apply to this course, including those outlined at http://syllabi.wwu.edu. These policies cover issues including:

Resources for Getting Help and Support

Help with Course Content

If you are stuck, struggling, or need help on any aspect of the course, you have several avenues for seeking help:

Other Resources

Faculty Community Ambassadors

The Computer Science department has Faculty community ambassadors. The role of these ambassadors is to hear concerns, feedback, or questions from students, faculty and staff, especially (but not limited to) those related to equity, inclusion and diversity issues. We hope that the Community Ambassadors can advise and also guide people to college, university or external resources.

Our current Faculty Community Ambassadors are (TODO - update) Yasmine Elglaly and myself (Scott Wehrwein). You can find more information on Commnity Ambassadors and contact details for both at the following link: https://cs.wwu.edu/diversity-equity-inclusion.

University Resources

As a reminder, the following University resources are always available: