CS 419 / 519 -- RenderMan and OpenGL Shaders

Winter Quarter 2012

http://cs.oregonstate.edu/~mjb/cs519


IM Lectures Projects Handouts Grades VHR


This page was last updated: April 10, 2012


Announcements:


What We Will Be Doing This Quarter

The goals of this course are to leave you "career-ready" (i.e., both work-ready and research-ready) for tasks, both GPU and RenderMan, that require the implementation of graphics algorithms in the form of shaders.

You will have access to the graphics systems in OSU's Computer Graphics Education Lab (CGEL) in Batcheller Hall 244. This is likely the only place around OSU where you can get access to RenderMan. It is also a place to get access to the OpenGL Shading Language (GLSL), although you probably have it if you've bought a good graphics card in the last 2-3 years.

Speaking of graphics cards, you can tell if a card will support vertex and fragment shaders by looking for the phrase Shader Model 3.0 compliant in its specifications. A card will support vertex, fragment, and geometry shaders if it is Shader Model 4.0 compliant. Some of the very-new cards will be Shader Model 5.0 compliant. This means that they will also support tessellation shaders.

CS 519 topics include:



Prerequisites

You must come in being a good OpenGL programmer. This is not a good time to learn computer graphics and OpenGL for the first time.

CS 450/550, 419/553, or 554 are acceptable preparation. CS 419G is adequate preparation if you looked at and understood the graphics programs we used.

Learning Objectives

On completion of the course, students will have demonstrated the ability to:

  1. Explain the difference between Model Coordinates, World Coordinates, Eye Coordinates, Clip Coordinates, Normalized Device Coordinates, and Screen Coordinates.
  2. Explain the ModelView and Projection matrices, and what operations belong in each, and why.
  3. Describe where surface, displacement, vertex, fragment, geometry, and tessellation shaders fit into the graphics pipeline
  4. Explain the difference between uniform, varying, and attribute variables.
  5. Apply the concept of octave noise to shader effects.
  6. Explain the difference between bump-mapping and displacement-mapping.
  7. Demontrate how to use cube mapping to achieve a good approximation to reflection and refraction. Explain what is different about reflection and refraction done this way and real reflection and refraction.
  8. Apply shaders to visualization problems
  9. Use textures in shaders for imaging and general data.
  10. Explain how to avoid the aliasing effects of sharp transitions.
  11. Demonstrate how shaders can be used to simulate various optics effects.



Professor

The class is being taught by Professor Mike Bailey.

Office: Kelley 2117
Phone: 541-737-2542
E-mail: mjb@cs.oregonstate.edu
Web site: http://cs.oregonstate.edu/~mjb

Office Hours:

Sundays 7:00-8:00 (PM) Instant Messaging
Mondays 10:00 - 12:00 My office
Wednesdays 1:00 - 3:00 My office
Thursdays 11:30 - 2:00 My office
    or, anytime my office door is open
    or, by appointment -- send email

The Virtual Hand Raise (VHR)

I recognize that it sometimes takes a certain amount of courage to ask a question in class. But, the worst thing of all is to not ask! So, this class also offers a feature called the Virtual Hand Raise. Click here to get into it. It will allow you to send me a question or comment, completely anonymously. I will answer questions submitted this way by email to the class or in class.



Textbook

You are expected to have the following book handy:

Bailey and Cunningham, Graphics Shaders: Theory and Practice, Second Edition, CRC Press, 2012. ISBN: 978-1-56881-434-6.

This is available through Amazon or through CRC Press.

There will be assigned readings from it. You don't need your own copy, but at least have one you can share. There is one in the CGEL "library", but chained to a bookshelf is a tough way to read a book.

Other course material will consist of web pages, handouts, and notes taken in class.



Other Good References

The Rost, Upstill, and Shreiner books are in the "CGEL Library".



Lecture Schedule

To see an Academic Year calendar, click here.

Class lecture time is: Monday, Wednesday, and Friday, 9:00 - 9:50.

Be sure to check the class room in the table below to see what days we will be in Graf 306 and what days we will be in the Computer Graphics Education Lab (CGEL -- Batcheller Hall room 244).

  Date Room Reading Pages Topics
1 Jan 9 Graf 306   Introductions. General course information. Project #1.
The graphics pipeline -- how it really works.
Homogeneous coordinates.
Coordinate systems: Model, World, Eye, NDC, Clip, Screen.
2 Jan 11 Graf 306 1-20 The graphics pipeline -- how it really works, continued.
Introduction to RenderMan:
RenderMan coordinate system, RIB files
3 Jan 13 CGEL   Shaders, built-in functions and variables
Uniform and Varying variables
bvrman.
RenderMan surface and displacement shaders
4 Jan 16 -----   Martin Luther King Holiday -- no class today
5 Jan 18 CGEL 213-236 Noise: Positional, Gradient. Cubic and quintic interpolation. Fractional Brownian Motion (FBM, 1/f), turbulence.
6 Jan 20 Graf 306 54-67, 91-120 RenderMan-to-GLSL transition.
Introduction to the OpenGL Shading Language (GLSL)
How GLSL is similar to, and different from, RenderMan shaders
Attribute, Uniform, and Varying variables
7 Jan 23 CGEL 60-90, 139-153 GLSL built-in functions and variables
glman
Vertex shaders
Geometry Morphing
Fun-with-one.
8 Jan 25 CGEL   More glman
More fun with vertex shaders: Dome projection, Hyperbolic geometry.
9 Jan 27 CGEL 124-136, 157-174 Fragment Shaders, I
Lighting
10 Jan 30 ----- 177-200 Prof. Bailey out of town - no class today
11 Feb 1 ----- 147-175 Prof. Bailey out of town - no class today
12 Feb 3 CGEL 179-211 Fragment Shaders, II
GLSL Textures: unsigned byte, floating point, 2D, 3D, parameters, binding, texture units, multitextures, sampler functions
13 Feb 6 CGEL 213-236, 200-204 Test #1 review.
GLSL Noise
Cube maps. Reflection, refraction.
14 Feb 8 CGEL 193-200 Bump mapping, I
15 Feb 10 Graf 306   Test #1
16 Feb 13 Graf 306 426-445 Go over test answers
Bump mapping, II
The optics of rainbows
17 Feb 15 CGEL   The optics of diffraction
The optics of lenses
18 Feb 17 CGEL   Finish up difrraction and lenses.
19 Feb 20 CGEL 240-285 Discuss the Final Project.
Image manipulation in shaders, I
20 Feb 22 CGEL   Image manipulation in shaders, II
21 Feb 24 CGEL 292-311 Geometry Shaders, I
Written Final Project proposals due
22 Feb 27 CGEL   Geometry Shaders, II
23 Feb 29 Graf 306 353-371 The GLSL API
24 March 2 CGEL 315-350 Tessellation shaders.
25 March 5 CGEL 376-420 Data Visualization using shaders
26 March 7 CGEL 205-211 Render-to-Texture
27 March 9 CGEL   Torus Poster class presentations!
28 March 12 CGEL   Torus Poster class presentations!
29 March 14 CGEL   Torus Poster class presentations!
Serious Fun
30 March 16 Graf 306   Test #2 review.
More Information
* March 22 Graf 306   Test #2 Thursday, March 22, 2:00 - 3:30 PM.



Projects

Project # Points Title Due Date
1 20 Register your Grade-Posting Alias January 11
2 60 Elliptical polka-dots January 20
3 100 Noisy displaced elliptical polka-dots January 27
4 100 Interactive noisy elliptical polka-dots February 3
5 100 Displacement Mapping and Lighting (and Bump Mapping) February 13
6 100 Cube Mapping February 22
7 100 Image manipulation and Displacement Textures February 29
8 60 Torus Poster March 7
9 200 Final Project March 21


Project Turn-In Procedures


Bonus Days and Late Assignments

Projects are due at 23:59:59 on the listed due date, with the following exception:

Each of you has been granted five Bonus Days, which are no-questions-asked one-day extensions which may be applied to any project, subject to the following rules:

  1. No more than 3 Bonus Days may be applied to any one project
  2. Bonus Days cannot be applied to tests
  3. Bonus Days cannot be applied such that they extend a project due date past the start of Test #2.

Click here to get a copy of the Bonus Day Submission Form. Fill this out and turn it in the next class period after turning in your project.

After the due date, after you have exhausted all your eligible Bonus Days, projects can still be turned in for 50% credit, as long as you turn them in within two weeks of the original due date. You still need to turn in your paper bundle. (That's how I will know to go look for your project in the turn-in area.)



Grading

Grades will be posted through this web page. To protect your privacy, they will be posted by your alias that you give me in Project #1.

Click here to see the current grade posting.

CS 519 will be graded on a fill-the-bucket basis. There will be 8 projects and two tests. You get to keep all the points you earn.

Your final grade will be based on your overall class point total. Based on an available point total of 1040, grade cutoffs will be no higher than:

Points Grade
1010
980 B+
950
920 C+
890
860 D+
830



Downloadable Files

  1. glman-related files
  2. .rib and .sl files
  3. .obj files



Handouts

Don't print these until you are told to do so in the Announcements section.
Sometimes I will put notes out here that are not quite complete, just to show you where we are headed.

  1. Homogeneous Coordinates 1pp 2pp 6pp
  2. Graphics Pipeline 1pp 2pp 6pp
  3. Introduction to RenderMan 1pp 2pp 6pp
  4. List of RIB Commands 1pp
  5. RenderMan shader global variables 1pp
  6. RenderMan shader functions 1pp
  7. RenderMan Quadrics 1pp
  8. Bvrman documentation 1pp
  9. Noise 1pp 2pp 6pp
  10. RenderMan-to-GLSL Transition 1pp 2pp 6pp
  11. Glman Documentation PDF
  12. Mixing PDF
  13. Morphing with the Vertex Shader 1pp 2pp 6pp
  14. Fun-with-One 1pp 2pp 6pp
  15. Dome Projection 1pp 2pp 6pp
  16. Hyperbolic Geometry 1pp 2pp 6pp
  17. Lighting 1pp 2pp 6pp
  18. Noise-with-Glman PDF
  19. Cube Mapping 1pp 2pp 6pp
  20. Bump Mapping 1pp 2pp 6pp
  21. Spectral Effects 1pp 2pp 6pp
  22. Lens Effects 1pp 2pp 6pp
  23. Image Manipulation 1pp 2pp 6pp
  24. Geometry Shaders 1pp 2pp 6pp
  25. GLSL API 1pp 2pp 6pp
  26. Tessellation Shaders 1pp 2pp 6pp
  27. Visualization using Shaders 1pp 2pp 6pp
  28. Render-to-Texture 1pp 2pp 6pp
  29. More Information PDF

Executables

These executables are all loaded on the CGEL machines, but you can also get them here in case (1) you want to run them on other machines, or (2) there are newer versions than what are on the CGEL machines.

  1. noisegraph.exe
  2. glman.exe

The bvrman executable is not included here because it looks for a local copy of RenderMan in order to work. Unless you have renderMan installed on your own computer, you will need to do the RenderMan work in the CGEL.

You might also need these dlls:

  1. glew32.dll
  2. glut32.dll
  3. msvcr71d.dll



Class Rules



Students With Disabilities

Accommodations are collaborative efforts between students, faculty and Disability Access Services (DAS). Students with accommodations approved through DAS are responsible for contacting the faculty member in charge of the course prior to or during the first week of the term to discuss accommodations. Students who believe they are eligible for accommodations but who have not yet obtained approval through DAS should contact DAS immediately at 737-4098.



Other Useful Online Graphics and Shader Information