Thursday, Sep 2

We did a general overview of the entire semester. A Zoom recording of this lecture is available at here.

There will be lots of opportunity this semester to work on-line, and to work in groups. We will try to make this a mixed classroom, so that during some weeks we will meet in person and during other weeks you will have the flexibility to work on-line with each other.

We first discussed the complementary roles of the CPU (Central Processing Unit) and the GPU (Graphics Processing Unit), and how rendering is done: Triangles are sent down from the CPU and GPU. After that, vertices are moved around in the GPU by a Vertex Shader program on the GPU. Finally, individual pixels are shaded by a Fragment Shader program on the GPU. Because the GPU needs to perform only specialized tasks, it can be designed to run hundreds of times faster than the general purpose CPU.

We talked about how we will start out for now rendering to a single square that fills the entire image, defined by the xyz coords of two triangles: [-1,1,0],[1,1,0],[-1,-1,0] and [1,1,0],[-1,-1,0],[1,-1,0]. We can compress this information into a triangle strip, so that we can send it as single array: [-1,1,0, 1,1,0, -1,-1,0, 1,-1,0].

All of our initial work will be in the fragment shader, where we will gradually build a ray tracer. This will allow us to render to simple shapes like spheres, but will also allow us to implement fancy things like reflection, refraction and shadows.

Ray tracing mathematically positions the screen as a rectangle in 3D space, floating in front of a point that represents the "lens" of a pinhole camera. Rays of light are traced backwards from the pinhole through each pixel of the screen rectangle. The first object encountered by the ray is rendered at that pixel.

After ray tracing, we will learn about 4x4 Matrices, which is the way to do linear transformations. In order to be transformable by 4x4 matrices, we will use homogeneous coordinates: points will be represented by column vectors of the form [x,y,z,1], and directions will be represented by column vectors of the form [x,y,z,0]:

Translation
Matrix
Point
Vector
Direction
Vector
1     0     0     Tx
0     1     0     Ty
0     0     1     Tz
0     0     0     1
x
y
z
1
x
y
z
0

After learning about matrices, we will learn to build simple shapes from triangles, including cubes, cylinders and spheres. In each case, the shape will be created as a collection of triangles. In the case of round objects, such as spheres and cylinders, we can only approximate the shape by using triangles. The surface shading done on the GPU will fool the user's eye into thinking that the objects are truly round.

Then we will learn how to create smooth curves, which can be used both to define advanced shapes and to define interesting paths of movement for animation. We will focus on cubic polynomial curves as our primitive for doing this, and show various ways to build and to use those curves.

After that, we will learn about hit testing: Tracing a single ray into a 3D scene to figure out what object is at a pixel, so that we can interact with that scene.

Then we will learn about movement (kinematics) and forces (dynamics). Setting matrix values to make things move is forward kinematics. Setting end goals (like the position of an object to reach for), and then working backwards to figure out the proper matrix values, is called inverse kinematics. We will learn how to use both kinematics and dynamics to create cool 3D animations and interactions.

Finally there will be an end of semester project in which you get to create something -- perhaps an animation, or a game, or an architectural model, or a physics simulation, or a musical instrument -- of particular interest to you.

Assignment 0:

Due next Tuesday, Sept 7, before class begins; Set up your class Web site as per the instructions on the course homepage. On that site describe what motivated you to take this course, and what you hope to get out of it.