UCSD CSE 168 Computer Graphics II: Rendering

Images we will render this quarter. 3D data courtesy of the Stanford 3D scanning repository, Benedikt Bitterli's rendering resources, Blend Swap creator Wig42, Eric Veach, and Wenzel Jakob.
Normals of a sphere
Whitted-style ray tracing
Acceleration structures
Fresnel reflection
Diffuse interreflection
Multiple importance sampling
Combining everything
2021 final project from Baichuan Wu and Vincent Li
2022 final project from Danica Xiong and Jakob Getzel
2022 final project from Steven Miller and Andrew Le
2022 final project from Yifan Liu and Zhongyi Wang


Course Description

This is an advanced computer graphics course for undergraduates as well as Masters and PhD students who have strong interests in the field. We will learn about the foundation and algorithms for physically-based rendering: computer graphics techniques that simulate how light interacts with 3D scenes to produce photorealistic images. This course is a natural continuation of CSE 167. We will assume familiarity of basic computer graphics concepts, so make sure you are comfortable with the materials in CSE 167. Throughout the course, we will build a physically-based renderer together that will be capable of rendering images like the one above. It'll be quite a bit of programming and math, but it will be fun! Nothing matches the feeling when you "paint" a canvas using math and code.

The course will be counted for full credit for MS/PhD students.

You can take a look at last year's course webpage 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 (and that is probably sufficient to pass this course), but my lecturing style would be slightly different. While I will cover most contents covered by Ravi, the order and details might be different.

If you are interested in even more advanced materials, you might want to take a look at my CSE 272 course: Advance Image Synthesis. CSE 274: Sampling and Reconstruction of Visual Appearance from Ravi Ramamoorthi is also highly-related.

If you are looking into other aspects of computer graphics, CSE 191 B: Virtual Reality Technology and CSE 165:3D User Interaction from Jurgen Schulze, CSE 169: Computer Animation from Steve Rotenberg, CSE 273: Computational Photography from Ben Ocha, and CSE 274: Discrete Differential Geometry and CSE 291: Physics Simulation from Albert Chern are all super cool courses. UCSD has one of the largest faculty on graphics!

Prerequisites

You should be familiar with the materials in CSE 167 or an equivalent course. We will use C++ for programming. You also need some basic familiarity of undergraduate level calculus, but we will try to explain the mathematics in the more intuitive way.

Logistics

Instructor: Tzu-Mao Li
TA: Trevor Hedstrom (tjhedstr-at-ucsd.edu)
Lectures: Monday/Wednesday/Friday 11:00am-11:50pm Pacific time. Location: PCYNH 121.
Dicussion: Monday 9am-9:50pm Pacific time. Location: PCYNH 121.
Instructor office hour: Friday 3pm-4pm. Location: CSE 4116.
TA office hour: Wednesday 1pm. Location: CSE B275.
We will do most of the online discussions on Piazza. You are welcome to peek at the UCSD online discussions of this course but we will not be monitoring questions there.
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

There will be 4 programming homeworks (each 20%) and 1 final project (20%).
The homeworks involve quite a bit of programming and can be tough for inexperienced. Start early and ask questions!

Late penalty: score * clamp(1 - (seconds passed after midnight of the deadline day) / 86400, 0, 1)
(this means that after 1 day your score becomes 0! start early! no negotiation unless you get a letter from the dean.)
We will use the time on Canvas to determine how many seconds have passed. No late submission for the final project. The grade submission deadline is too close.

All the homeworks will be based on the torrey codebase.

Homework 1 (17.5%): Ray Tracing (due 4/17)
Homework 2 (17.5%): Triangles and acceleration structures (due 5/1)
Homework 3 (17.5%): Textures, shading normals, Fresnel, and area lights (due 5/12)
Homework 4 (17.5%): Indirect lighting, BRDFs, and Multiple Importance Sampling (due 5/26)
Final Project (30%): Torrey++ (proposal due 5/29, checkpoint due 6/5, final due 6/15)

Collaboration policy: For homeworks, you are expected to do them alone (feel free to discuss between peers!). For the final project, you can team up and form a group of at most two people.

Readings

The Ray Tracing in One Weekend series from Peter Shirley is a great read. Our homeworks will follow closely their structure.
smallpt is a great reference of a simplistic path tracer.
Physically-based Rendering: from Theory to Implementation contains a comprehensive reference to many topics we talk about. It might be a dense read though.
Eric Veach's thesis contains a rigorous mathematical foundation of rendering theory. Good for theory minded students. Probably a bit too deep for this course.
Ke-Sen's webpage is where you find all the (recent) cool graphics papers!

Schedule (tentative)

4/3/2023 (Mon): Introduction (Homework 1 out) [slides]

Why rendering? Course overview. Introduction to (Whitted-style) ray tracing.

4/5/2023 (Wed): Illumination and reflection [slides]

Indirect lighting vs direct lighting. Reflection models. Lambertian. Phong. Blinn-Phong.

4/7/2023 (Fri): Distributed ray tracing [slides]

Cameras. Depth of field. Motion blur.

4/10/2023 (Mon): Acceleration structures [slides]

Spatial subdivision, grids, nested grids, kd-trees, and BSP trees.

4/12/2023 (Wed): Acceleration structures 2 [slides]

Bounding volume hierarchies. Top-down vs bottom-up constructions. Surface area heuristics.

4/14/2023 (Fri): Sampling and reconstruction [slides]

Nyquist Shannon sampling theorem. Pixel filters. Mitchell-Netravali filter.

4/17/2023 (Mon): Textures (Homework 1 due, Homework 2 out) [slides]

UV mapping. Procedural textures. Perlin noise.

4/19/2023 (Wed): Texture filtering [slides]

Ray differentials and mipmapping.

4/21/2023 (Fri): Normals and displacements [slides]

Shading normals. Bump mapping. Normal mapping. Displacement mapping.

4/24/2023 (Mon): Monte Carlo integration [slides]

Random number generation. Bias vs variance. Dimensionality. Stratified sampling.

4/26/2023 (Wed): Importance sampling [slides]

Rejection sampling. Inverse transform sampling.

4/28/2023 (Fri): Importance sampling 2 [slides]

5/1/2023 (Mon): Importance sampling 3 (Homework 2 due, Homework 3 out) [slides]

Sampling Blinn-Phong. Spherical light source sampling. Discrete distribution sampling.

5/3/2023 (Wed): BRDFs and Microfacet theory [slides]

Cook-Torrance-Sparrow BRDF. Fresnel equation.

5/5/2023 (Fri): Rendering equation [slides]

Path tracing. Russian roulette.

5/8/2023 (Mon): Multiple importance sampling [slides]

5/10/2023 (Wed): History of computer animation [slides]

5/12/2023 (Fri): Image-based lighting (Homework 3 due, Homework 4 out) [slides]

Capturing and rendering environment maps.

5/15/2023 (Mon): Tonemapping [slides]

5/17/2023 (Wed): Tesselation [slides]

Catmull-Clark and Loop subdivision. Hardware tesselation.

5/19/2023 (Fri): Vector graphics rasterization [slides]

Rendering closed 2D Bezier curves and strokes.

5/22/2023 (Mon): Irradiance caching/photon mapping [slides]

5/24/2023 (Wed): Adaptive sampling/denoising [slides]

5/26/2023 (Fri): Path guiding (Homework 4 due) [slides]

Lafortune's 5D tree. Photon map importance sampling. Importance caching.

5/29/2023 (Mon): Memorial day (Final project proposal due)

5/31/2023 (Wed): Shadow mapping [slides]

Percentage-closer filtering. Moment shadow map.

6/2/2023 (Fri): Alpha blending and order-independent transparency [slides]

Depth peeling. Weighted OIT. Linked list sorting.

6/5/2023 (Mon): Light baking (Final project checkpoint) [slides]

Precomputed radiance transfer. Ambient occlusion. Light maps.

6/7/2023 (Wed): Point clouds, voxels, SDFs, and neural networks [slides]

6/9/2023 (Fri) A sneak peak of CSE 272 [slides

6/15/2023 (Thu) Final project due