GLART -- OpenGL as an Art Medium (January 2010)

NOTE:
These course materials use JOGL for the OpenGL binding. I created a set of java classes (called JOCode) to make it easier to
create JOGL apps. JOCode is a thin layer over OpenGL and is useful as a framework to get started building Java/OpenGL programs.
The code is heavily commented and provides many useful functions that demonstrate OpenGL and provide working examples to build on.

To see JOCode demos download the JOCode demo zip file
For the complete GLART examples: download the GLART class examples, images, models and JOCode source
The JOCode project code repository is online at Google code: code.google.com/p/jocode
You can get the previous GLART course materials (using LWJGL) at the GLART_2008 course folder
JOCode classes can be called from Processing as well: DOWNLOAD JOCode Processing Examples


Course Description

The computer provides artists with a bewildering variety of options for creating images: image editors, 3D modelling tools, animation tools, and dozens of progrmaming languages. Yet at the lower level of all computer rendering lies a relatively simple and very powerful graphics processor. OpenGL provides access to this lower level of rendering, and gives artists the opportunity to create their own "brush and canvas", to produce high performance animated graphics in both 3D and 2D. The purpose of this course is to introduce OpenGL and provide a working knowledge of this powerful API. We will use Java, Eclipse and an OpenGL library to explore basic concepts of OpenGL such as coordinate systems, navigating in a 3D space, cameras, rendering models, mouse and keyboard input, lighting, texturing and blending. The course consists of weekly programming assignments and a final project. This class is intended for students who are comfortable with programming.


Syllabus

Week 1 — OpenGL Intro / Geometry

  • Class Intro / Overview
  • Brief history of OpenGL
  • Anatomy of an OpenGL program
  • Geometry: Vertices and Triangles
  • Eclipse review

  • Week 2 — Geometry Transformations

  • The coordinate system
  • Intro to Matrix math
  • Translate, Scale and Rotate
  • The "Model view"

  • Week 3 — Space

  • Perspective vs. Ortho
  • Defining the space: Frustum
  • The Depth buffer and Z
  • The viewpoint: gluLookat
  • The viewport

  • Week 4 — Light and Materials

  • Light components: ambient, diffuse, specular
  • Color and light
  • Directional vs. Positional light
  • Material reflectivity
  • Interaction of light and material

  • Week 5 — Texture

  • Loading images — pixel formats
  • Texture coordinate space
  • Color and texture
  • Alpha blending textures

  • Week 6 — Models

  • Model file formats
  • Intro to (very) basic modelling
  • Loading and rendering a model

  • Week 7 — Navigation

  • Mouse and keyboard input
  • Converting Screen to world coordinates — Project and Unproject
  • Moving through the space
  • Interaction

  • Week 8 — Text

  • Texture mapped text
  • Drawing text in and over a scene
  • Save and restore OpenGL settings
  • Use the Java Font class to generate text

  • Week 9 — Shadows

  • Casting shadows onto a plane
  • Using a matrix to project geometry onto a plane
  • Using the Stencil buffer to control shadow rendering
  • Shadow mapping intro

  • Week 10 — Stencil Buffer and Buffer Summary

  • Using the Stencil buffer to mask an area
  • Buffer tests
  • Controlling read/write to buffers

  • Week 11 — Timing

  • The "Game Loop": controlling rendering speed
  • Hardware level timers

  • Week 12 — The FrameBuffer and Screenshots

  • Frame buffer objects, render to texture
  • Saving the screen, giant screen captures

  • Week 13 — Final Projects in Progress

    Week 14 — Final Project Presentations

     

    Reading Materials

  • OpenGL Programming Guide (the Red Book), Woo, Neider, Davis (Required)
  • The Red Book first edition available online not as up to date, but can be used for this course.
  • Essential Mathematics for Games (Optional) If you want to get into 3D mathematics in depth this book is clear and practical
  • Resources

  • NeHe tutorials, excellent source of OpenGL coding tutuorials
  • Nate Robins tutorials, programs demonstrate key features of OpenGL
  • OpenGL.org, official OpenGL site
  • OpenGL reference, documentation of OpenGL API
  • LWJGL.org, home of the Lightweight Java Game Library
  • JOGL, Java OpenGL project
  • Potatoland (Mark Napier), Java/OpenGL demos using the LWJGL binding
  • Homework Wiki, link to your class assignments here
  • Email

  • napier __at__ potatoland __dot__ org