CS 457 / 557 -- RenderMan and OpenGL Shaders

Winter Quarter 2017

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


Classes Projects Handouts Grades VHR


This page was last updated: March 24, 2017


"Don't wake me for the end of the world unless it has very good special effects."
-- Roger Zelazny (science fiction writer)


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. 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 3-4 years.

Access to the CGEL is by the card-reader chip in your OSU ID. I will be submitting a class roster to EECS so that you can all be enabled.

CS 457/557 topics include:

Graphics Card Levels

If you are wondering what types of shaders your own graphics card supports, check this box. You can tell what shaders the card supports by looking at the Shader Model (or Shader Level) or what DirectX / OpenGL version it supports:
Shader ModelOpenGLDirectXSupporting
3.02.x9Vertex, Fragment
4.03.x10Geometry
5.04.x11Tessellation, Compute

We will cover all of these different types of shaders.

Prerequisites

You should come in having some graphics programming experience. 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 491 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, tessellation, and compute 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 for storing 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 (2nd floor, south side)
Phone: 541-737-2542
E-mail: mjb@cs.oregonstate.edu
Web site: http://cs.oregonstate.edu/~mjb

Prof. Bailey's Office Hours:

Mondays 2:00 - 4:00 In Kelley 2117
Tuesdays 11:00 - 1:00 In Kelley 2117
Fridays 2:00 - 4:00 In Kelley 2117
    or, anytime my office door is open
    or, by appointment -- send email

TA


The TA for the course is Zhicheng Fu. fuz@oregonstate.edu.
He took this course a year ago. We are lucky to have a TA that is so experienced!

Zhicheng Fu's Office Hours:

Mondays 1:00 - 4:00 In the CGEL (Bachelor 244)
Tuesdays 2:00 - 5:00 In the CGEL (Bachelor 244)
Thursdays 9:00 - 12:00 In the CGEL (Bachelor 244)
Thursdays 3:00 - 6:00 In the CGEL (Bachelor 244)
    or, by appointment -- send email

The Virtual Hand Raise (VHR)

It takes courage to ask a question in class. But, the worst thing of all is to not ask! So, this class also has 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.

Optional Textbook

This book was written based on the Oregon State University shaders class notes.

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

You are not required to get it. However, it has more detailed information than the course notes do.

If you want it, it is available through Amazon, or through CRC Press.

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 printable notes, web pages, and notes taken in class.

Other Good References

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

Class Schedule

To see an Academic Year calendar, click here.

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

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

  Date Room Topics
1 Jan 9 Owen 101 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 Owen 101 Introduction to RenderMan:
RenderMan coordinate system, RIB files
3 Jan 13 Owen 101 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 Owen 101 More RenderMan: displacement shaders
6 Jan 20 ----- Prof. Bailey out of the office -- no class today
7 Jan 23 Owen 101 Noise: Positional, Gradient. Cubic and quintic interpolation. Fractional Brownian Motion (FBM, 1/f), turbulence. RenderMan-to-GLSL transition.
8 Jan 25 Owen 101 Introduction to the OpenGL Shading Language (GLSL)
How GLSL is similar to, and different from, RenderMan shaders
Attribute, Uniform, and Varying variables GLSL built-in functions and variables
glman
Vertex shaders
Geometry Morphing
9 Jan 27 Owen 101 Grab the file Jan27.zip and unzip it into its own folder.
More glman
Checkers
Z-buffer pollution
Stripes in model vs. world coordinates
Noise stripes
10 Jan 30 Owen 101 Fun-with-one.
More fun with vertex shaders: Dome projection, Hyperbolic geometry. Fragment Shaders, I
Lighting
11 Feb 1 Owen 101 Registration for the February 15 EECS Industry Reception starts today!
Fragment Shaders, II
GLSL Textures: unsigned byte, floating point, 2D, 3D, parameters, binding, texture units, multitextures, sampler functions
GLSL Noise
12 Feb 3 Owen 101 Cube mapping. Reflection, Refraction.
13 Feb 6 Owen 101 Test #1 review.
Cube mapping, continued.
14 Feb 8 Owen 101 Bump mapping, I
15 Feb 10 Owen 101 Test #1
16 Feb 13 Owen 101 Go over test answers
Discuss the Final Project.
Image Manipulation, I
Don't forget that tomorrow is Valentine's Day.
17 Feb 15 Owen 101 Image Manipulation, II
The EECS Industry Reception is tonight.
The Winter Quarter Engineering Career Fair is tomorrow -- you should go!
18 Feb 17 Owen 101 The optics of rainbows
The optics of diffraction
The optics of lenses
19 Feb 20 Owen 101 Geometry Shaders, I
20 Feb 22 Owen 101 Geometry Shaders, II
21 Feb 24 Owen 101 Written Final Project proposals due
Finish Geometry Shaders
22 Feb 27 Owen 101 The GLSL API. The glslprogram C++ class.
23 Mar 1 Owen 101 Tessellation shaders, I
24 Mar 3 Owen 101 Tessellation shaders, II
25 Mar 6 Owen 101 Scientific Visualization using shaders
26 March 8 Owen 101 Scientific Visualization using shaders
27 March 10 Owen 101 Compute Shaders
28 March 13 Owen 101 Compute Shaders
Vulkan
29 March 15 Owen 101 Class Evaluations
Test #2 review.
More Information
30 March 17 ----- Prof. Bailey out of the office -- no class today
* March 22 Owen 101 Test #2 Wednesday, March 22, 9:30 - 11:00 AM.
(You can confirm this for yourself by going here.

Projects

Project # Points Title Due Date
1 60 Elliptical Dots January 23
2 100 Noisy Displaced Elliptical Dots January 30
3 100 Interactive Noisy Elliptical Dots February 7
4 100 Displacement Mapping, Bump Mapping, and Lighting) February 20
5 100 Image Manipulation in a Magic Lens February 27
6 60 Salmon Poster March 7
7 100 Tessellation Shaders March 15
557 Paper 100 Paper Project (for those in CS 557) March 20, 23:59:59, no BDs
FP 100 Final Project March 22, 23:59:59, no BDs


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 5 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 2 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 within a week after turning in your project.

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 557 will be graded on a fill-the-bucket basis. There will be 7 projects, 10 quizzes, 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 1120, grade cutoffs will be no higher than:

Points Grade
1070
1050 A- 
1030 B+
1010
990 B- 
970 C+
950
930 C- 
910 D+
890
870 D- 

Downloadable Files

  1. .rib and .sl files
  2. OpenGL/GLSL-related files
  3. .obj files

  4. Want to use the Kelley Atrium in a cube map? Here are the files:
    kec.posx.bmp
    kec.negx.bmp
    kec.posy.bmp
    kec.negy.bmp
    kec.posz.bmp
    kec.negz.bmp

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.

Graphics Pipeline 1pp 2pp 6pp
Homogeneous Coordinates 1pp 2pp 6pp
Introduction to RenderMan 1pp 2pp 6pp
List of RIB Commands 1pp    
RenderMan shader global variables 1pp    
RenderMan shader functions 1pp    
RenderMan Quadrics 1pp    
Bvrman documentation PDF    
Stripes, Rings, and Dots 1pp 2pp 6pp
Noise 1pp 2pp 6pp
RenderMan-to-GLSL Transition 1pp 2pp 6pp
Glman Documentation PDF    
Mixing 1pp 2pp 6pp
Noise With Glman PDF    
Timer 1pp 2pp 6pp
Morphing 1pp 2pp 6pp
Dome Projection 1pp 2pp 6pp
Hyperbolic Geometry 1pp 2pp 6pp
Lighting 1pp 2pp 6pp
Cube Mapping 1pp 2pp 6pp
Bump Mapping 1pp 2pp 6pp
Image Manipulation 1pp 2pp 6pp
Lens Effects 1pp 2pp 6pp
Spectral Effects 1pp 2pp 6pp
Geometry Shaders 1pp 2pp 6pp
Tessellation Shaders 1pp 2pp 6pp
GLSL API 1pp 2pp 6pp
Scientific Visualization using Shaders 1pp 2pp 6pp
Compute Shaders 1pp 2pp 6pp
More Information PDF    
Creating a Video Demo of a Graphics Project 1pp 2pp 6pp

Executables

These executables are all loaded on the CGEL machines, but you can also get them here in case you want to run them on other Windows 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. libcd.dll
  4. libcid.dll
  5. msvcr71d.dll

Class Rules

Students With Disabilities

Accommodations for students with disabilities are determined and approved by Disability Access Services (DAS). If you, as a student, believe you are eligible for accommodations but have not obtained approval please contact DAS immediately at 541-737-4098 or at http://ds.oregonstate.edu. DAS notifies students and faculty members of approved academic accommodations and coordinates implementation of those accommodations. While not required, students and faculty members are encouraged to discuss details of the implementation of individual accommodations. .

Religious Holidays

Oregon State University strives to respect all religious practices. If you have religious holidays that are in conflict with any of the requirements of this class, please see me immediately so that we can make alternative arrangements.

Other Useful Online Graphics and Shader Information