CS 465 Fall 2012
Computer Graphics Systems and Design
CS 465 Links:
Moddle [
http://moodle.csun.edu/ ]
will be used in this class for announcements, and discussions.
You can also view your grades in the class.
Reading Assignments
- Introduction to Graphics and OpenGL
- F. Durand,
A Short Introduction to Computer Graphics, viewed 7/27/2011.
- OpenGL Programming Guide 7th,
- Chapter 1, pp 1-30, Introduction to OpenGL
- Chapter 2, pp 31-90, State Management and Drawing Geometric Objects
- Appendix A, Basics of GLUT
- Appendix B, State Variables
- Appendix F. Programming Tips
- Chapter 7 Display lists
- Chapter 3 Viewing and matrices
- Appendix C Homogenous coordinates and transformation matrices
- Chapter 4 Color. You do not need to read about Color-Index mode.
- Chapter 5 Lighting
You do not need to read Lighting in Color-Index Mode and beyond.
- Appendix H Calculating normal vectors
- Chapter 13 Selection, don't read feedback
- Chaper 6, blending and fog
Do not need to read Antialiasing and Polygon Offset.
- Chapter 8 Drawing Pixels, Bitmaps, Fonts, and Images.
- Chapter 9 Texture Mapping.
Do not need to read after Automatic Texture-Coordinate Generation.
- Alternative reading to the 7th Edition:
much older on-line edition chapters:
- Chapter 1, Learning OpenGL, Version 1.1,
Introduction to OpenGL pp 1 - 23.
- Chapter 2,
State Management and Drawing Geometric Objects,
read upto "Stipling Polygons".
- Appendix B
OpenGL State Variables.
- Appendix D
GLUT: The OpenGL Utility Toolkit.
- Appendix G
Programming tips.
- Chapter 7,
Display Lists.
- Chapter 3,
Viewing, this chapter covers transformations and matrices.
- Appendix E
Homogeneous Coordinates and Transformation Matrices.
- Chapter 4,
Color
- Chapter 5,
Lighting.
Do not need to read Lighting in Color-Index Mode and beyond.
- Appendix E
Calculating Normal Vectors.
- Chapter 13,
Selection. Do not need to read Feedback.
- Chapter 6,
Blending and Fog.
Do not need to read Antialiasing and Polygon Offset.
- Chapter 8,
Drawing Pixels, Bitmaps, Fonts, and Images.
- Chapter 9,
Texture Mapping.
Do not need to read after Automatic Texture-Coordinate Generation.
- Related tutorials.
Sidelnikov, Greg, has on-line OpenGL related tutorials. All these
tutorials were viewed on 9/5/2011. There are other OpenGL tutorials
at his site you might find interesting.
Lecture Resources and Notes
Notes are usually Adobe Acrobat PDF files landscape 1 slide per page
format. If you print the notes, I strongly recommend you set your
printer to print in a 2 page or 4 page up mode.. This way you will get
readable notes with half the printed pages.
- Resources:
- Windows, Linux and Mac OSX
OpenGL Installation notes
updated 8/23 fix broken GLee windows zip link.
- Building OpenGL programs on:
- Graphics tutors, demonstrations (files to be downloaded and
unzipped or run)
- Nate Robin's
OpenGL tutors a zipped file. These are the demos I've been
using in class. You can run the *.exe on Windows systems w/o
re-compiling.
-
lightlab.exe
MS Windows demostration program.
- Lectures:
-
Introduction to computer graphics
- Introduction to OpenGL
updated 9 / 13 / 2012
- Coordinate systems and transformations.
updated 10 / 27 / 2012
- Movement transformations,
collisions, avoidance. updated 10/28/2012 for orient towards.
- Projection transformations
projection, shadows, picking (object selection).
- 3D Modeling -- hand and procedural.
updated 10/18/2012
- Buffers, textures, fog, blending
updated 12/11/2012
- GLSL shaders updated 11/27, vertex blending
- Curved surfaces
- CS 465 review
Schedule
| Task |
Due Date |
Description |
| P1 (10% lec, 33.3% lab) |
10 / 7 / 2012 date changed |
Target Practice P1
project specification
update #3 9/28/2012 new values for orbit degrees for planets and moons.
Excel
TargetPractice.xls
updated spreedsheet for project to be consistent with update #3.
|
| Midterm (30% lec) |
11 / 1 / 2012 |
study guide
practice quiz
crossword puzzle.
12 down is "feedback" -- we didn't discuss this in lecture...
|
| P2 (10% lec, 33.3% lab) |
11 / 11 / 2012 |
Fly the warbird, shoot the missile sites:
project specification
update #3 11/1/2012
Excel
TargetPractice2.xls
spreedsheet for project. update # 2 10/30/2012
|
| P3 (10% lec, 33.3% lab) |
12 / 7 / 2012
| Modeling: models, textures
project specification
update # 1, 11/13/2012
If you didn't submit at P2, P3 will contribute 20% of your lecture
and 67% of your lab grade.
triangleLoader.cpp
program to convert *.tri file to openGL draw method.
viewModel.cpp
program to display the openGL draw method created by
triangleLoader
|
| Final (40% lec) |
12 / 11 / 2012
5:30 to 7:30 pm
|
final study guide
practice quiz 2
|
Examples
To avoid any misunderstanding by anyone (aka a student in one of my
classes), the following disclaimer has been patterned from a Microsoft
web page and is applied to code found herein or on any of Professor
Barnes' web pages.
WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THESE WEB PAGES IS AT
YOUR OWN RISK.
Professor Barnes provides this code "as is" without
warranty of any kind, either express or implied, including but not
limited to the implied warranties of merchantability and/or fitness
for a particular purpose.
Professor Barnes will not be held responsible for any inaccuracies,
bugs, documented or undocumented, in the sample code below.
SHOULD YOU WISH TO USE THESE EXAMPLES FOR COURSEWORK, YOU ARE DOING SO
AT YOUR OWN RISK.
Professor Barnes will not grant extra credit, time, debugging time, or
anything else should you find a bug in the code;
I may say, "Thanks for pointing that out!".
- Draw a cube
- [ cube.cpp ]
demonstrates OpenGL and OOP class, basic OpenGL program
structure.
Cube * cube; // dynamic object reference example.
cube -> draw();
- [ staticCube.cpp ]
Cube cube; // static object reference example.
cube.draw();
- Most of the examples that follow also require file openGL.h to
be included. These examples allow you to add all include files
to the project as well as include them.
Examples that are in subdirectories have openGL.h in the
directory.
Single file examples use
[ openGL.h ]
- Animation of 3 torii
- Single viewport
[ animate directory ] :
torus.cpp and animate.cpp demonstrate using include for
class definition file, glutTimerFunc, glutIdleFunc, estimating fps.
updated 9/14/2012
- Three viewports
[ animateViewport directory ] :
animateViewport.cpp and torus.cpp files (uses openGL.h)
updated 9/21/2012
- Three viewports and a Transformation Matri
[ animateViewportMatrix directory ] :
animateViewportMatrix.cpp, torus.cpp and constants3D.h
- Using matrices to view and place many cube objects in a scene.
These examples have been updated to use #ifndef so that all files
can be added to the project. Also uses include openGL.h
- C++ and GLUT spot light demo
[ spotLight.cpp ]
: sphere tesselation, shading, menu, and spot light.
Modified from example in Ch 5 pp 212 - 222 SuperBible 4th edition.
updated 9/14/2012
- Using matrices in OpenGL
- Shadows in OpenGL with projection
shadowShape.cpp.
- Picking and selection buffer example
pickExample.cpp
Uses both ortho and pespective projection for selection.
Uses wireframe to visually show the selected sphere.
- Example that loads and display a *.raw texture
rawTexture directory .
You also need to save the texture "therapist.raw".
(*.raw and *.tga textures will not open in most browsers).
- Modified TGA image example from SuperBible V5
stonePyramid directory example.
Example stonePyramid illustrates loss of geometry color when
textures are not enabled/disabled (press 't' to see effect).
- Blending example
waterBlend directory contains program
and raw texture files.
- Using AC3D modeler triangle files in openGL.
triangleLoader.cpp
is a program to convert *.tri file to openGL draw method.
Usage in a terminal / command window:
triangleLoader < aModelFileName.tri
Output file is named "drawTriModel.cpp"
viewModel.cpp
is a program that displays the openGL draw method created by
triangleLoader.
- GLSL shader demos
- GLSLexample,
You need to copy all 3 files: GLSLexample.cpp, vertexShader.glsl,
and fragmentShader.glsl into a project. You may also need
to install GLee; see notes in header comment.
- GLSLattribute,
updated 11/20/2012 fixes light in shader
You need to copy all 3 files:
GLSLattribute.cpp, vertexAttribute.glsl,
and fragmentAttribute.glsl into a project.
Shader and no shader rendering / frame.
updated 11/27 to change light positions
- OpenGL NURBS surface demo
nurbsSurface.c.
Key 'c' displays control points, 'w' toggles wireframe or fill,
'u' and 'v' cycles through 3 sets of u and v knot values, and
's' cycles through 3 sets of sampling tolerances.
Resources
WARNING!
Many on-line tutorials and references for OpenGL may
be for earlier releases that used the fixed functional pipeline. We
are using a shader-only approach with the SuperBible textbook. In
additon, several of these links are old -- from several semesters ago
(I haven't checked them recently).
- CSUN Computer Science student's
Dreamspark account . You can download professional development tools for this class: Windows 7, Visual Studio 2010, ...
-
Getting started with OpenGL
- OpenGL installations
SDKs from opengl.org. These are additional libraries.
- C++ for Java programmers
- GLUT
on-line documenation .
- OpenGL
- OpenGL Programming Guide: The official Guide to Learning OpenGL,
Version 3.0 and 3.1 (7th edition), D. Shreiner
Addison Wesley, 2010 -- the "redbook". Chapter 15 covers shaders.
version 1 is on-line at:
glprogramming.com ,
or,
site 2 ,
and
source for all examples (v1.1)
- Interactive Computer Graphics: A Top Down Approach Using OpenGL
E. Angel, 2011,
example programs from 4th edition.
- OpenGL: A Primer 2nd edition, E. Angel, 2004,
Addison Wesley,
example programs
- OpenGL: SuperBible 5th edition, R. S. Wright, B. Lipchak,
N. Haemel, Addison-Wesley, 2011,
example programs
- Nate Robin's
OpenGL tutors a zipped file. These are the demos I've been
using in class.
- NeHe Productions,
OpenGL tutorials
- Mark Kilgard's
OpenGL pitfalls.
- An OpenGL
light / material
tutorial (a windows exe file).
- Paul Rademacher's
GLUI User Interface Library, and
manual.
- Java OpenGL bindings
- C# OpenGL bindings
CsGL .
Be sure to read the FAQ on how to install/deploy.
- Xiang, Z., Plastock, R., Schaum's Outline of Theory and Problems
of Computer Graphics , McGraw Hill, 2000.
- Game Developer Associations
- Kinetics, Simulation
- D.M. Bourg, Physics for Game Programmers, O'Reilly, 2002.
- E. Lengyel, Mathematics for 3D Game Programming and Computer Graphics,
Charles River, 2002.
- P. J. Schneider, D.H. Eberly, Geometric Tools for Computer Graphics,
Morgan Kaufmann, 2003.
- Algorithmic Modeling of objects and behavior
- Laurens Lapre's L system parser
LParser2.
Original
Lparser and links to other L Systems
- Craig Reynold's
Boids
algorithms for flocking behavior and links to related work.
- G. W. Flake, Computer Explorations of Fractals, Chaos,
Complex Systems, and Adaptation, MIT, 2000.
- P. Martz,
Generating Random Fractal Terrain
- H.C. Sun, D.N. Metaxas,
Automating Gait Animation
- Nvidia,
Procedural Tree demo -- zipped file.
- P Prusinkiewicz,
Algorithmic Botany .
Plants, L-Studio
- M. Walter, et.al,
Integrating Shape and Pattern in Mammalian Models
- Y. Parish, et.al,
Procedural Modeling of Cities
- SDKs, Related sites, books, miscellaneous
- SDL -- game engine
Sound library works well w/ OpenGL.
-
VTK -- Visualization ToolKit
- D. Bourg, AI for Game Developers, O'Reilly, 2004.
- M. Buckland, Programming Game AI by Example, Wordware, 2005.
Game AI tutorials
AI junkie
-
Digital Game Developer discussion, resources.
- D. Luebke, M. Reddy, J.D. Cohen, A. Varshney, B. Watson, R. Huebner,
Level of Detail for 3D Graphics, Morgan Kaufmann, 2003.
- K. Brilliant, Building a digital human,
Charles River Media, 2003.