| Projects | Handouts | PB Zoom |
This page was last updated: March 13, 2022
| "Don't wake me for the end of the world unless it has very good special effects." |
| -- Roger Zelazny (science fiction writer) |
OSU requires the use of face coverings in indoor spaces. Face coverings are defined as an item affixed to the face to help prevent the spread of the COVID-19 virus, including cloth garments that cover the nose and mouth and medical-grade disposable masks. This definition and policy exclude face coverings that incorporate a valve to facilitate easy exhalation, mesh masks, lace masks, face shields or other coverings with openings, holes, or visible gaps in the design, material or vents.
| Monday | March 14 | 11:00 - 1:00 |
| Tuesday | March 15 | 11:00 - 1:00 |
| Wednesday | March 16 | 11:00 - 12:00 |
| 24:07 | How they created the "shimmering" effect of the personal shield |
| 27:37 | Why they used "Sand Screens" instead of greenscreens |
| 34:15 | The thousands of explosions used in the night ambush |
| 42:26 | Why dragonflies were the key to making the ornithopters feel real |
| 59:12 | Solving the complex animation of the sandworm |
Also, here is a Podcast about How to Make Money doing 3D. The part about How to Apply for a 3D Job comes in at 15:32.
| Vertices | Triangles | File |
|---|---|---|
| 1,178 | 2,113 | tigerstsL.obj |
| 4,359 | 8,452 | tigerstsM.obj |
| 25,541 | 50,712 | tigerstsH.obj |
These OBJ files each have normals and texture coordnates.
Just in case you've forgotten what a real tiger looks like, click here. (I took this picture at the Oregon Zoo.)
The goals of this course are to leave you "career-ready" (i.e., both work-ready and research-ready) for tasks that require the implementation of graphics algorithms in the form of shaders.
CS 457/557 topics include:
If you are wondering what types of shaders your own graphics card supports, check this table. 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 Model | OpenGL | DirectX | Supports |
|---|---|---|---|
| 3.0 | 2.x | 9 | Vertex, Fragment |
| 4.0 | 3.x | 10 | Geometry |
| 5.0 | 4.x | 11 | Tessellation, Compute |
We will cover all of these different types of shaders.
While you don't exactly need previous 3D graphics programming experience to take this course,
we are going to jump into shader topics as if you have it.
CS 450/550, 453/553, or 554 are good preparation.
CS 491 is adequate preparation if you looked at and understood the graphics programs
that were supplied to you.
If you don't have any of these under your belt,
I suggest that you look over the CS 450/550 class notes,
which can be found
here.
Prerequisites
Professor
The class is being taught by
Professor Mike Bailey.
| Office: | Kelley 2117 (2nd floor, south side) |
| Phone: | 541-737-2542 |
| Email: | mjb@cs.oregonstate.edu |
| Mondays | 12:00 - 2:00 |
| Tuesdays | 2:00 - 4:00 |
| Wednesdays | 2:00 - 4:00 |
| LL: Fridays | 12:00 - 2:00 |
| or, by appointment -- send email |
The TAs for this course are Jian Tang and Julie Kuang. Both have a huge amount of computer graphics experience. We are lucky to have them!
| Prof. Bailey | Julie Kuang | Jian Tang | |
| mjb@cs.oregonstate.edu | kuangqi@oregonstate.edu | tangjian@oregonstate.edu | |
| Zoom-room | Zoom | Zoom | Zoom |
| Mondays | 12:00 - 2:00 | 8:00 - 10:00 | |
| Tuesdays | 2:00 - 4:00 | 9:00 - 11:00 , 12:00 - 2:00 | |
| Wednesdays | 2:00 - 4:00 | 8:00 - 10:00 , 3:00 - 5:00 | |
| Thursdays | 9:00 - 11:00 , 12:00 - 4:00 | ||
| Fridays | LL: 12:00 - 2:00 | 8:00 - 12:00 |
| 8:00 | 9:00 | 10:00 | 11:00 | 12:00 | 1:00 | 2:00 | 3:00 | 4:00 | 5:00 | |
| Mondays | JK | JK | Class | Class | PB | PB | ||||
| Tuesdays | JT | JT | JT | JT | PB | PB | ||||
| Wednesdays | JK | JK | Class | Class | PB | PB , JK | JK | |||
| Thursdays | JT | JT | JT | JT | JT | JT | ||||
| Fridays | JK | JK | JK | JK | PB: LL | PB: LL |
|
|
Bailey and Cunningham,
Graphics Shaders: Theory and Practice,
Second Edition,
CRC Press,
2012.
ISBN: 978-1-56881-434-6.
If you do end up wanting it, it is available through Amazon, or through CRC Press. Last I looked, it was much cheaper on the CRC site. Not sure why. |
| All required course materials for this class will cost you $0.00 (i.e., free) |
|
| Week # | Topic | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| 1 | Introduction to CS 457/557 | 1pp | 2pp | 4pp | 6pp | LV | |||
| 1 | Our Class Resources Page | HTML | LV | ||||||
| 1 | Project Notes for CS 457/557 | 1pp | 2pp | 4pp | 6pp | LV | |||
| 1 | Teach Doesn't Work the Way You Think It Does | 1pp | 2pp | 4pp | 6pp | LV | |||
| 1 | History of Shaders | 1pp | 2pp | 4pp | 6pp | LV | |||
| 1 | Homogeneous Coordinates | 1pp | 2pp | 4pp | 6pp | LV | |||
| 1 | Shaders Notes from CS 450/550 | 1pp | 2pp | 4pp | 6pp | LV-A | LV-B | LV-C | DV |
| 1 | Model vs. Eye/World Coordinates | -- | -- | -- | -- | -- | -- | -- | DV |
| 1 | GLSL API | 1pp | 2pp | 4pp | 6pp | LV | |||
| 2 | Glman | DV | |||||||
| 2 | Mixing | 1pp | 2pp | 4pp | 6pp | LV | |||
| 2 | Morphing | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 2 | Stripes, Rings, and Dots | 1pp | 2pp | 4pp | 6pp | LV-1 | LV-2 | DV | |
| 2 | Texturing in GLSL | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 2 | Displacement Textures | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 2 | Noise | 1pp | 2pp | 4pp | 6pp | LV-1 | LV-2 | LV-3 | DV |
| 2 | Noise Terrain | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 3 | Bump Mapping | 1pp | 2pp | 4pp | 6pp | LV-1 | LV-2 | DV | |
| 3 | Disco-ball Lighting | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 3 | Dome Projection | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 3 | Hyperbolic Geometry | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 4 | Timer | 1pp | 2pp | 4pp | 6pp | LV | |||
| 4 | Lighting | 1pp | 2pp | 4pp | 6pp | LV | |||
| 4 | Screen Space Ambient Occlusion (SSAO) | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 4 | Cube Mapping | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 5 | Red-Cyan Stereographics | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 5 | Test #1 | HTML | LV | ||||||
| 6 | Image Manipulation | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 6 | Render-to-Texture | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 6 | Spectral Effects | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 6 | Lens Effects | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 7 | Geometry Shaders | 1pp | 2pp | 4pp | 6pp | LV-1 | LV-2 | DV | |
| 7 | GLM | 1pp | 2pp | 4pp | 6pp | LV | |||
| 7 | A short GLM Primer | HTML | |||||||
| 7 | Shadows | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 7 | The Science Behind Pixar | 1pp | 2pp | 4pp | 6pp | LV | |||
| 8 | Tessellation Shaders | 1pp | 2pp | 4pp | 6pp | LV-1 | LV-2 | DV | |
| 8 | Modeling Wave Motion | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 8 | Scientific Visualization using Shaders | 1pp | 2pp | 4pp | 6pp | LV-1 | LV-2 | LV-3 | DV |
| 8 | The SuperQuad | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 9 | GPU 101 (from the CS 475/575 notes) | 1pp | 2pp | 4pp | 6pp | ||||
| 9 | Compute Shaders | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 9 | Bump Mapping with Surface Local Coordinates | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 9 | Advanced Bump Mapping: Normal Mapping | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 9 | Advanced Bump Mapping: Parallax Mapping | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 10 | Introduction to Vulkan | 1pp | 2pp | 4pp | 6pp | LV | |||
| 10 | Vulkan GLSL | 1pp | 2pp | 4pp | 6pp | LV | |||
| 10 | Vulkan Ray Tracing | 1pp | 2pp | 4pp | 6pp | LV | |||
| 10 | Efficient Ray-Triangle Intersections | 1pp | 2pp | 4pp | 6pp | ||||
| 10 | Algorithmic Art | 1pp | 2pp | 4pp | 6pp | LV | DV | ||
| 10 | Introduction to RenderMan for GLSLers | 1pp | 2pp | 4pp | 6pp | LV | |||
| 10 | More Information | LV | |||||||
| 10 | Test #2 Review | HTML | |||||||
| -- | Creating a Video Demo of a Graphics Project | 1pp | 2pp | 4pp | 6pp |
To see an Academic Year calendar,
click here.
Class time is:
Mondays and Wednesdays, 10:00 - 11:50.
Unless otherwise specified,
all of our classes will be in
LiNC 228.
No class on: January 17.
Note: this schedule is my best guess at where we will be when.
It is only approximate.
Class Schedule
| Week # | Starting Date | Topics |
|---|---|---|
| 1 | Jan 3 |
Introductions.
General course information.
History of Shaders The graphics pipeline -- how it really works. Homogeneous coordinates. Coordinate systems: Model, World, Eye, NDC, Clip, Screen. Introduction to the OpenGL Shading Language (GLSL) Attribute, Uniform, and Varying variables GLSL built-in functions and variables glman The GLSL API The GLSLProgram C++ class Vertex shaders |
| 2 | Jan 10 |
Stripes in model vs. world coordinates
The smoothstep( ) function Checkers Z-buffer pollution Geometry Morphing GLSL Textures: unsigned byte, floating point, 2D, 3D, parameters, binding, texture units, multitextures, sampler functions Using textures in the vertex shader: displacement maps Noise: Positional, Gradient. Cubic and quintic interpolation. Fractional Brownian Motion (FBM, 1/f), turbulence. glman Noise Reading a noise texture Using noise to create terrain |
| 3 | Jan 17 |
No class on January 17: Martin Luther King holiday.
More noise Lighting Disco-ball Lighting Bump mapping |
| 4 | Jan 24 |
SSAO
Morphing Timer Noise Terrain |
| 5 | Jan 31 |
Cube mapping
Reflection, Refraction More fun with vertex shaders: Dome projection, Hyperbolic geometry. Test #1 Review Test #1 goes live at 12:01 PM on Wednesday, February 2 (Happy Groundhog's Day!). It closes at 23:59 on Sunday, February 6. It wil consist of 40 questions, on Canvas, multiple choice, open-notes. |
| 6 | Feb 7 |
Discuss the Final Project.
Image Manipulation Render to Texture A Public Service Announcement: Valentine's Day is next week! |
| 7 | Feb 14 |
Happy Valentines's Day!
The optics of rainbows The optics of diffraction The optics of lenses Geometry Shaders A one-page PDF project proposal is due to me by 23:59:59 on Wednesday, February 16. Turn it in on Teach. |
| 8 | Feb 21 |
Geometry Shaders
Tessellation shaders Scientific Visualization using shaders |
| 9 | Feb 28 |
Compute Shaders
Click here to see the Compute Shader particle system from the class notes. Advanced Bump Mapping: Surface Local Coordinates Advanced Bump Mapping: Normal Mapping Advanced Bump Mapping: Parallax Mapping |
| 10 | March 7 |
Algorithmic Art
Vulkan and its GLSL Shaders Test #2 review. Test #2 goes live at 12:01 PM on Wednesday, March 16. It closes at 23:59 on Sunday, March 20. It wil consist of 40 questions, on Canvas, multiple choice, open-notes. More Information |
Every Friday, 12:00-2:00, I will be hosting a Live Lecture. We will go over some current materials and see live demos. It will be a time for you to also ask live questions. Attendance at the live session is optional. These sessions will be recorded (see below) in case you missed them.
Here is my Zoom-room.
If you need a passcode, use ZeldaDog
LLV = Live Lecture Video
| Week # | Video |
|---|---|
| 1 | LLV |
| 2 | LLV |
| 3 | LLV |
| 4 | LLV |
| 5 | LLV |
| 6 | LLV |
| 7 | LLV |
| 8 | LLV |
| 9 | LLV |
| 10 | LLV |
LV = Lecture Video
Projects
DV = Demo Video
| Project # | Points | Title | Due Date | LV | DV | |
|---|---|---|---|---|---|---|
| 1 | 60 | Step- and Blended-edged Elliptical Dots | January 14 | LV | DV | |
| 2 | 100 | Noisy Elliptical Dots | January 19 | LV | DV | |
| 3 | 100 | Displacement Mapping, Bump Mapping, and Lighting | January 26 | LV | DV | |
| 4 | 100 | Cube Mapping Reflective and Refractive Bump-mapped Surfaces | February 9 | LV | DV | |
| 5 | 100 | Image Manipulation | February 15 | LV | DV | |
| FP Proposal | 10 | Final Project Proposal | February 16, 23:59:59, no BDs | LV | ||
| 6 | 60 | The Tiger Menagerie Project | February 23 | LV | ||
| 7 | 100 | Geometry Shaders | March 4 | LV | DV | |
| 557 Paper | 100 | Paper Project (for those in CS 557) | March 15, 23:59:59, no BDs | LV | ||
| FP | 90 | Final Project | March 15, 23:59:59, no BDs | LV |
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:
If you turn in a project three or more days late, your score is a zero.
If you turn in a project late and you don't have enough Bonus Days left to spend on it,
your score is a zero.
You don't need to ask me, or even tell me, that you are using Bonus Days.
Just turn your project in two-or-less days late.
I have a script that will check your turn-in date and deduct the Bonus Days.
It is up to you to track how many Bonus Days you have used up.
However, I also keep a spreadsheet of all of your Bonus Days.
If you lose track, send me an email and ask.
Project Turn-In Procedures
Bonus Days and Late Assignments
| Points | Grade |
| 1080 | A |
| 1060 | A- |
| 1040 | B+ |
| 1020 | B |
| 1000 | B- |
| 980 | C+ |
| 960 | C |
| 940 | C- |
| 920 | D+ |
| 900 | D |
| 880 | D- |
Notice that this grade scale is not 90%-80%-70%-60%. That is because I just do a soft grade on the projects.
Here is a folder with some of my favorite OBJ files.
Opening up the Sample2019.zip or SampleLinux.tar file
will produce a folder full of all the other files you need.
You do not need to go hunt the internet for any other files.
Use the ones that have been given to you.
Downloadable Files
| Windows Visual Studio 2019 Sample Program | Sample2019.zip | Un-zip and double-click on the .sln file, then select Build→Clean Solution, then select Build→Build Sample, then select Debug→Start Without Debugging |
| Linux Sample Program | SampleLinux.tar | Un-tar (tar xvf SampleLinux.tar), then cd SampleLinux, then make sample, then ./sample |
| Windows Visual Studio 2019 Sample Shaders Program | ShaderIntro2019.zip | Un-zip and double-click on the .sln file, then select Build→Clean Solution, then select Build→Build Sample, then select Debug→Start Without Debugging |
| Windows Visual Studio 2019 Shadows Program | Shadows2019.zip | Un-zip and double-click on the .sln file, then select Build→Clean Solution, then select Build→Build Sample, then select Debug→Start Without Debugging |
| Windows Visual Studio 2019 Vertex Buffer Object sample Program | VBO.zip | Un-zip and double-click on the .sln file, then select Build→Clean Solution, then select Build→Build Sample, then select Debug→Start Without Debugging |
| A color-picker program | ColorPicker.exe | |
| Our own version of the sphere-drawing function | osusphere.cpp | |
| C++ class to use GLSL shaders | glslprogram.h, glslprogram.cpp | |
| Code to load an OBJ file | loadobjfile.cpp | |
| glm Folder | glm.zip | Un-zip into your VS project folder |
| Keytime Animation C++ class | keytime.h, keytime.cpp | |
| 2D Noise Texture | noise2d.064.tex | |
| 3D Noise Texture | noise3d.064.tex | |
| Kelley Engineering Center test image | kec.bmp | |
| The find shader | find.glib, find.vert, find.frag | |
| Shader code to produce the rainbow and heated-object color scales | colorscales.txt | |
| Mars Panoram | MarsPanoram.zip |
If you want to load a .obj file as part of one of your projects,
incorporate the file loadobjfile.cpp
into your own code.
I usually use this by placing the .obj object into a display list:
// a global variable:
GLuint DL;
. . .
// do this in InitGraphics( ):
DL = glGenLists( 1 );
glNewList( DL, GL_COMPILE );
LoadObjFile( "spaceship.obj" );
glEndList( );
. . .
// do this in Display( ):
glCallList( DL );
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.
You might also need these dlls:
It is important you feel safe and welcome in this course. If
somebody is making discriminatory comments against you,
sexually harassing you, or excluding you in other ways, contact
the professor, your academic advisor, and/or report what
happened at
https://studentlife.oregonstate.edu/studentconduct/
reporting so we can connect you with resources.
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 yet 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.
OSU has twelve established student rights.
They include due process in all university disciplinary processes, an equal opportunity to learn, and grading in accordance with the course syllabus.
See:
https://asosu.oregonstate.edu/advocacy/rights
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.
As {John Lennon? Allen Saunders?} has said: "Life is what happens to you while you're busy making other plans".
I care about you as a person.
When life happens to you, send me an email and come see me.
I might be able to help.
But I surely can listen.
You are not alone.
University students encounter setbacks from time to time.
If you encounter difficulties and need assistance, it's important to reach out.
Consider discussing the situation with me or an academic advisor.
Learn about resources that assist with wellness and academic success at
http://oregonstate.edu/ReachOut.
If you are in immediate crisis, please contact the Crisis Text Line by texting
OREGON to 741-741 or call the National Suicide Prevention Lifeline at 1-800-273-TALK (8255)
Any student who has difficulty affording groceries or accessing sufficient
food to eat every day, or who lacks a safe and stable place to live,
is urged to contact the
Human Services Resource Center (HSRC)
for support:
hsrc@oregonstate.edu,
541-737-3747.
The HSRC has a food pantry, a textbook lending program, and
other resources to help.
Furthermore, if you are comfortable doing so, please come talk with me.
I will do everything I can do to help you.
University Housing & Dining Services has been piloting a meal program called Food for Thought.
Using the extra food generated by campus dining locations, they create pre-packaged,
balanced meal options available at no cost to Oregon State students who meet eligibility
criteria determined by the Human Services Resource Center.
For others, these packages are available for purchase at a reduced price.
Class Rules
Establishing a Positive Community
Students With Disabilities
Link to the Code of Student Conduct
Student Bill of Rights
Religious Holidays
Life Events
Reach Out for Success
Basic Needs
Other Notes You Might Enjoy!
| University Classes | |
| Intro to Computer Graphics | |
| Scientific Visualization | |
| Parallel Programming | |
| CS Skills for Simulation and Game Programming | |
| Vulkan | |
| Paraview |
| Grades 2-12 Outreach | |
| Scratch (including Scratch Jr.) | |
| TinkerCad | |
| Blender | |
| Processing | |
| SketchUp |
Other Useful Online Graphics and Shader Information
This is not absolutely essential to print out, but it can be really handy to have around.
This is not absolutely essential to print out, but they can be really handy to have around.