Images made by students from previous year. Courtesy of (in order): Hunter Trieu, Astoria Ma, Chenron Gu, Jose Arreguin, Kate Jackson, Nihal Chowdhury, Rita Chang, Sean Park, Shan Jiang, Tim Lacaba, Adarsh Patel, Astoria Ma, Gilen Wu-Hou, Kate Jackson, Raymond Sun, Rita Chang, Samil Ahsan, Shan Jiang, Tim Lacaba, Tommy Ta, Weiwen Dong, Wing Chan, Xuewei Yan, Andrew Lu, Hunter Trieu, Kiyoshi Guo, Sean Park, Tsz Kit Koon, Tyler Le, Varun Sreedhar, William Kim.

Computer graphics is a field about processing ``visual data'', including images, videos, 2D and 3D shapes, light and reflection, motion, physical properties, and many more. Throughout the course, we will learn about:

### Prerequisites

(Modern) C++. Matrices and vectors.
### Logistics

**Instructor**: Tzu-Mao Li
**Lectures**: Monday/Wednesday/Friday 13:00-13:50 Pacific time. Location: CENTR 113.
**Dicussion**: Monday 17:00-17:50 Pacific time. Location: CENTR 212.
**Instructor office hour**: Wednesday 2pm-3pm. Location: CSE 4116.
**TAs/Tutors office hour**: Trevor Thu 3-4pm @ CSE-B275, Shiyang Wed 4-5pm @ Zoom, Shambhavi Mon 3-4pm @ B250A, Venkataram Tue 2-3pm @ B250A
**Posting rules in Piazza**: When asking debugging questions about the homework, please:
**Course recording**: We will record the class if the equipment is available. However, the class will be very interactive and you might be missing a lot of context if you are not in the classroom yourself. Please try to join us in person and let's have fun together!
### Grading, Homeworks and Projects

**Late penalty**: score * clamp(1 - (seconds passed after midnight of the deadline day) / 86400, 0, 1)

**Homework 1** (17.5%): 2D Graphics (due 10/14)
**Homework 2** (17.5%): 3D Software Rendering (due 10/30)
**Homework 3** (17.5%): 3D OpenGL Rendering (due 11/15)
**Homework 4** (17.5%): 3D Modeling (due 11/27)
**Final Project** (30%): Shadertoy Animation (due 12/13)

** Collaboration policy: ** You are expected to do the homeworks and the project alone (feel free to discuss between peers!).
** ChatGPT/Co-pilot/machine generated text/code policy: ** We do not encourage or discourage you for using ChatGPT or Co-pilot or Cursor or other similar software. Pick the way you feel is the best for learning computer graphics.
### Readings

### Schedule (tentative)

#### 9/27/2024 (Fri): Introduction. (HW 1 out) [slides]

#### 9/30/2023 (Mon): Vector graphics. [slides]

#### 10/2/2023 (Wed): Linear transformation. [slides]

#### 10/4/2023 (Fri): Cameras. [slides]

#### 10/7/2023 (Mon): Rasterization. [slides]

#### 10/9/2023 (Wed): Ray tracing vs rasterization. [slides]

#### 10/11/2023 (Fri): 3D transformation. [slides]

#### 10/14/2023 (Mon): 3D rotation. (HW1 due, HW2 out) [slides]

#### 10/16/2023 (Wed): Programmable graphics pipelines. [slides]

#### 10/18/2023 (Fri): Textures. [slides]

#### 10/21/2023 (Mon): Lighting. [slides]

#### 10/23/2023 (Wed): Materials. [slides]

#### 10/25/2023 (Fri): Colors. [slides]

#### 10/28/2023 (Mon): Global illumination. [slides]

#### 10/30/2023 (Wed): Shadow mapping and shadow volume. (HW2 due, HW3 out) [slides]

#### 11/1/2023 (Fri): Antialiasing. [slides]

#### 11/4/2023 (Mon): Non-photorealistic rendering. [slides]

#### 11/6/2023 (Wed): Procedural modeling. [slides]

#### 11/8/2023 (Fri): Geometry processing. [slides]

#### 11/11/2023 (Mon): Veterans Day Holiday.

#### 11/13/2023 (Wed): Curves and smooth surfaces. [slides]

#### 11/15/2023 (Fri): Animation. (HW3 due, HW4 out) [slides]

#### 11/18/2023 (Mon): Particle systems and mass-spring systems. [slides]

#### 11/20/2023 (Wed): Rigging, skinning, and blendshapes. [slides]

#### 11/22/2023 (Fri): Rigid-body simulation.

#### 11/25/2023 (Mon): Graphics systems and domain-specific languages. [slides]

#### 11/27/2023 (Wed): Point-based graphics. (HW4 due, final out)

#### 11/29/2023 (Fri): Thanksgiving Holiday.

#### 12/2/2023 (Mon): Transparency and volumes. [slides]

#### 12/4/2023 (Wed): Neural networks. [slides]

#### 12/6/2023 (Fri): Sneak peak of other graphics classes. [slides]

#### 12/13/2023 (Fri): Final due.

**Modeling**: How to describe and edit 2D and 3D shapes.**Rendering**: How to turn 2D and 3D shapes into images algorithmically, and how to make it fast using domain-specific hardware.**Animation**: How to create motion.

You can take a look at previous CSE 167 web pages (either my version, Albert Chern's version or Ravi Ramamoorthi's version) to have a better sense of what the course is about. This course is also offered on MOOC and UCSD Online by Ravi Ramamoorthi. You are free to look at Ravi's lectures, but my lecturing style would be slightly different. While I will cover most contents covered by Albert and Ravi, the order and details might be different.

This course is only the tip of an iceburg of a fascinating field. If you are interested in computer graphics, you should look the more advanced materials in CSE 168 for rendering (either my version or Ravi's version), CSE 169 for animation, CSE 191 B: for virtual reality and CSE 165 for user interaction.

For graduate students, CSE 272, CSE 273, CSE 274: Sampling and Reconstruction of Visual Appearance, CSE 274: Discrete Differential Geometry, CSE 275: Deep Learning for 3D Data, and CSE 291: Physics Simulation are all relevant and super cool courses.
UCSD has one of the largest faculty on graphics!

We will do most of the online discussions on Piazza.

- Read other posts first. See if your question has been answered before.
- Describe clearly what are the specific problems you are facing.
- Describe clearly what are the solutions you have tried, and why you think they did not work.
- Describe clearly what kind of help would be the most helpful for you.

There will be 4 programming homeworks (each 17.5%) and a final project (30%).

The homeworks involve quite a bit of programming and can be tough for inexperienced. Start early and ask questions!

(this means that after 1 day your score becomes 0! start early!)

We will use the time on Canvas to determine how many seconds have passed.

Homeworks 1-4 will be based on the balboa codebase.

All of these are optional.

CMU 15-462/662: a very nice (but intense) computer graphics course from Keenan Crane.

Immersive Linear Algebra: linear algebra tutorials with interactive figures.

Essence of Linear Algebra: video tutorials of linear algebra from 3Blue1Brown

Fundamentals of Computer Graphics from Steve Marschner and Peter Shirley is the standard textbook.

Computer Graphics: Principles and Practice from John Hughes, Andy van Dam, Morgan McGuire, David Sklar, James Foley, Steven Feiner, and Kurt Akeley is another standard textbook.

Physically-based Rendering: from Theory to Implementation contains a comprehensive reference to many topics we talk about. It might be a dense read though.

Ke-Sen's webpage is where you find all the (recent) cool graphics papers!

Why computer graphics? Course overview.

Rasterizing 2D graphics. Antialiasing. Transparency. Bezier curves.

Basic linear algebra. 2D linear transformation. Affine transformation.

Pinhole cameras. Field of view vs focal length. Perspective and orthographic projection.

Triangle meshes. Depth interpolation. Z buffer. Perspective-corrected interpolation. Frustrum culling. Occlusion culling.

Z culling vs acceleration structures.

Homogeneous coordinates. Scene graphs.

Euler angles. Axis-angle representation. Quaternion/Rotors.

GPU architecture. Fixed-function pipeline. Vertex shaders. Fragment shaders.

Image textures. Procedural textures. UV mapping. Mipmapping.

Ambient/diffuse/specular lighting. Shading normals. Gouraud/Phong/Deferred.

Measured BRDFs. Blinn-Phong. Microfacet BRDFs.

Color spaces. Gamma.

Path tracing. Radiosity.

MSAA. FXAA. TAA.

Toon shading. Contours. Line drawing.

Fractal surfaces. L-systems. Grammars. SDFs.

Surface reconstruction. Mesh smoothing. Mesh simplification. Remeshing/Parameterization.

Bezier cuves. B-splines. NURBS. Catmull-Clark and Loop subdivision.

Newtonian mechanics. ODEs. Numerical integration. Forward and inverse kinematics.

Boids. Cloth simulation. Constrained dynamics.

Alpha compositing. Volume rendering. Ray marching.

Representation. Inverse problems.

CSE 168/169 and more.