CS 413 Vector Graphics
Spring 2010
TTh 12:30-1:45
Mechanical Engieering 208
Instructor:
Joe Michael Kniss
Ferris 301G
277-2967
jmk (at) cs.unm.edu
Office Hours: TTr 3:30-5:30
Info:
Official class web page:
www.cs.unm.edu/~jmk/cs413
Recommended Text
Ray Tracing from the Ground Up Kevin Suffern, ISBN 978-1-56881-272-4
Order this book online
Realistic Ray Tracing Peter Shirley and Keith Morley, ISBN 1-56881-198-5
Order this book online (currently on back-order)
Note: text is not required, but recommended for the class.
Description
This course covers the basic mathematics and design of ray-based graphics.
Topics include ray tracing implicit surfaces and meshes, high dynamic
range images, high quality sampling, material modeling, and effects.
Students will write a complete working raytracer and produce realistic
images. Students will also be encouraged to pursue high performance,
parallel implementations and well engineered software.
Deliverables
Assignments must be delivered electronically. Only 1 late assignment
will be accepted with full credit (must be in before the next
assignment is due). Any other late assignments will incur a 10%
penelty per day. Students must solve 3-4 extra credit parts to
achieve an A in the class.
Content **
- Week 1
- Introduction
- Assignment 1: Viewer, due Jan 27.
- Use OpenGL and Glut or Java and Swing to produce a simple image viewer.
- Viewer must accept command-line parameters for size, camera, lights, etc...
- Viewer must report pixel values under mouse when image is clicked on...
- Viewer must report current state (size, camera...) in command line form
when 'C' key is pressed
- Viewer must display an image either read from file or generated by the program.
- Extra credit 1: measure speed of image updates. (how fast can images be loaded?)
- Extra credit 2: identify fastest method for image updates. (use GL extensions)
- Basic math
- Linear algebra
- line/ray equation
- ray-sphere intersection
- ray-plane intersection
- Software design issues.
- Week 2
- Basic math continued
- Viewer, Tracer, Scene design
- Week 3
- Barycentric Coordinates and intro to lighting.
- Viewing parameters (eye, at, and up)
- Assignment 2: Math Review, due Feb 11
- Describe the basic properties (Associativity, Commutativity, and
Transitivity Distributivity) of:
- The inner (dot) product
- The outer product
- The cross product
- What other properties do these operators have?
- Derive the ray-plane intersection (set up and solve for t)
- Derive the ray-sphere intersection (set up and solve for t)
- Derive the ray-triangle intersection (set up and solve for t)
- Extra Credit: Derive:
- the ray-cone intersection
- the ray-disk intersection
- the ray-cylinder (with cap) intersection
- Assignment 3: Vanilla Ray Tracer, due Feb 12
- Please make a web page for this assignment and discuss your results there.
- Implement a basic ray-tracer.
- Objects should be shaded using the Phong model.
- Render these objects (z is up) (all in one scene):
- Plane at [0,0,0], normal [0,0,1], diffuse color [.05, .05, 1], specular color [.2, .3, 1], specular power 3
- Sphere at [0,0,1] radius 1, diffuse color [1, .05, .05], specular color [1, .9, .9], specular power 10
- Sphere at [2,2,0.2] radius 1, diffuse color [.05, 1, .05], specular color [.9, 1, .9], specular power 30
- Triangle [-1, -1, .02][2,-2,.02][-1.5,-1.5,1.5], diffuse color [1, 1, .05], specular color [1,1,.9], specular power 100
- Light is at [4,4,4], color [1,1,1]
- Eye [0,5,2], Look-at [0,0,0], Up [0,0,1]
- Image plane is at [0,4,2] (distance of 1 from eye), Dimensions 2x2 (width and height)
- Rendered image should be 512x512 pixels
- Indicate runtime and computer specs with each rendered image.
- Extra Credit
- Implement shadows (test if light is blocked by other objects)
- Implement reflective bounce (3 bounces)
- Implement and discuss an optimization (with runtimes before and after)
- Week 4
- Shading and tone mapping
- Intro to texture mapping.
- Week 5
- BRDFs
- Assignment 4: Texture and Antialiasing, due Mar 3
- Texture the plane with a checkerboard pattern.
- Texture the red sphere with a map of the earth.
- Render the scene with 4, 16, 32, and 128 samples per-pixel.
- Discuss the method you use to sample the pixels
- Identify and illustrate the artifacts or improvements that anti-aliasing provides.
- Extra Credit 1 render the scene with new view points
- Extra Credit 2 make a movie of the the scene (moving through it) and compare different anti-aliasing methods
- Week 6
- More BRDFs and Shader Models
- Assignment 5: Acceleration Datastructures, due
Mar 12 extended to Mar 23. Turn it in on time for some extra credit!
- Implement a log(n) acceleration data structure for triangle intersections. (KD, BVH, or Octree)
- You must be able to load a .obj model.
- Provide timings before and after acceleration.
- Provide a detailed analysis of your ray-tracer's performance.
- Weeks 7,8,& 9
- Spectroscopy
- Units and terms of light transport
- Transparency
- Glass and dielectrics
- Week 10
- More dielectrics
- Fresnel terms
- Snell's Law
- Beer's Law
- Assignment 6: Dielectrics, due Apr 16
- Implement glass in your raytracer
- Glass must support a Fresnel term
- Glass must support different indexes of refraction
- Glass must support different absorption terms
- Produce a sequence of 7 glass spheres (all in one scene), each with a different index of refraction. Make sure the background you choose makes the differences clearly visible.
- Render a model of your choosing as glass.
- Extra Credit Render a scene with nested glass objects, each with a different index of refraction.
- Extra Credit Experiment with different absorption terms for your glass, try to simulate a real-world object (such as different colored glass bottles).
- Discuss how you implemented the reflection/refraction ray pairs, and provide performance statistics with and without dielectrics.
- Week 11
- Procedural Methods
- Splines
- Noise
- Hacking!
- Extra Credit: Scripting, due April 29
- Take this tutorial on Bash scripting
- Write a script (or scripts) demonstrate the usage of:
- Variables; declaration, usage, assignment, list/arrays
- Logical Tests; And/or, exists, is zero, etc... (how many different tests can you do?)
- If/then/elseif/else branching
- Loops, there are several kinds, how many distinct ways can you loop?
- Quoting, what's the difference between "$blah" and '$blah' ?
- Subshells
- Automated rendering (using your raytracer), e.g. Animation or variations of paraemters
- Final Project, due May 13
- Render an image or animation using a scene of your design in your raytracer
- Your rendering should demonstrate techniques developed in previous assignments
- Pay special attention to your use of color and composition
- Extra Credit: demonstrate a new rendering effect (e.g. photon mapping, environment mapping, novel shaders, etc...)
- You must include a brief writeup that includes details about the rendering methods you used, render times, and souces of content (i.e. where did you get your models, textures, maps, etc...)
- Image/Animation, code, and writeup must be submitted by the Due date for credit
(no late assignments can be accepted).
** subject to change
Resources