This is the course information web page for TNCG20 - Introduction to Computer Graphics Programming 2013. It contains the schedule and information about the course. All material distributed during the course will be linked to from this page.
 
Course Overview
The course is organized as a set of seminars, a set of homework exercises, and a project. Students are expected to actively participate in the discussions during the seminars. The main course book will be:
"Ray Tracing from the Ground Up" by Kevin Suffern.
If you feel that you also need a book in C++ programming we recommend that you also buy:
"C++ How to Program" by Paul Deitel and Harvey Deitel.
 
This course is organized by Jonas Unger, who together with Camilla Forsell will give the lectures and manage the examination tasks.

 
Course Schedule
 
1.) Monday Sept. 2, 13-15, lecturer Jonas Unger
Course overview, graphics basics and introduction to programming
Keywords (programming): C++, programming evironment, basic layout of a program
Keywords (graphics): rendering images, pixels, real-time/off-line, OpenGL, ray-tracing
Useful links:
www.cplusplus.com - Programming in C++ (tutorials etc.)
www.learncpp.com - Programming in C++ (tutorials etc.)
www.cprogramming.com - Programming in C++ (tutorials etc.)
www.glfw.org - An Open Source library for creating windows with OpenGL contexts.
www.libsdl.org - An Open Source library for creating windows with OpenGL contexts.
-----
 
2.) Friday Sept. 6, 10-12, lecturer Jonas Unger
Graphics basics and introduction to programming
Keywords (programming): classes, data types, dynamic memory handling, pointers
Keywords (graphics): OpenGL, textures, vertices, polygons
Deadline: homework 1
Useful links:
www.openexr.com - Library for handling high dynamic range (HDR) images in the .exr format.
cimg.sourceforge.net - Library for image IO and processing.
www.opengl-tutorial.org - Information and tutorials for OpenGL version 3.3 and later.
www.hdrv.org - Sample HDR images that can be used in homework 2.
-----
 
3.) Wednesday Sept. 11, 10-12, lecturer Camilla Forsell
Scientific writing
-----
 
4.) Monday Sept. 16, 10-12, lecturer Jonas Unger
Ray-tracing basics
Keywords (programming): inerhitance, operator overloading
Keywords (graphics): scene, objects, camera, ray-tracing, rasterization
Reading (before class): Chapters 1-3 in "Ray Tracing from the Ground Up"
Deadline: homework 2
Useful links:
www.codermind.com - Simple ray-tracer in C++
Program listing and class diagram for homework 3 (Can also be found below under homework 3 overview.)
-----
 
5.) Friday Sept. 20, 9-11, lecturer Jonas Unger
The viewing system
Keywords: perspective viewing, orthographic viewing
Reading (before class): Chapters 8 and 9 in "Ray Tracing from the Ground Up"
 
We will go through and work with homework 3 (see document above).
Program listing and class diagram for homework 3
 
Please note that time has changed to 9-14 to give us some more time.
 
Useful links:
-----
 
6.) Tuesday Sept. 24, 9-11, lecturer Jonas Unger
Scene representations and transformations
Keywords: scene graph, transformations, homogeneous coordinates
Reading (before class): Chapters 20 and 21 in "Ray Tracing from the Ground Up"
Useful links:
-----
 
7.) Thursday Sept. 26, 13-15, lecturer Camilla Forsell
Scientific writing
 
8.) Monday Sept. 30, 10-12, lecturer Jonas Unger
Lighting the scene
Keywords: radiometry, normals, radiance, BRDF, rendering equation, point lights Reading: Chapters 13 and 14 in "Ray Tracing from the Ground Up"
Useful links:
-----
 
9.) Friday Oct. 4, 10-12, lecturer Jonas Unger
Reflectioons and shadows
Keywords: normals, specular reflections, shadow rays Reading: Chapters 15 and 16 in "Ray Tracing from the Ground Up"
Useful links:
-----
 
10.) Wednesday Oct. 9, 8-10, lecturer Camilla Forsell
Scientific writing -----
 
11.) Monday Oct. 14, 10-12, lecturer Jonas Unger
Antialiasing and sampling
Keywords: regular sampling, random sampling, jittered sampling, reconstruction Reading: Chapters 4 - 7 in "Ray Tracing from the Ground Up"
Useful links:
-----
 
12.) Friday Oct. 18, 10-12, lecturer Jonas Unger
Introduction to global illumination
Keywords: area lights, hemisphere sampling, stochastic rendering Reading: Chapters 18 and 26 in "Ray Tracing from the Ground Up"
Useful links:
-----
 
13.) Wednesday Oct.
23, 10-12, lecturer Jonas Unger
Introduction to global illumination
Keywords: area lights, hemisphere sampling, stochastic rendering Reading: Chapters 18 and 26 in "Ray Tracing from the Ground Up"
Useful links:
-----
 
14.) Wednesday Nov. 6, 10-12, TP31, lecturer Camilla Forsell
Oral presentations of selected chapters in "Ray Tracing from the Ground Up"

-----
 

 
Examination
The examination of this course is divided into two parts:
 
(1) A set of 7 practical homework assignments (labs) deadline Oct. 30 2013
(2) A take home exam, deadline Oct. 30 2013
(3) A 5 page executive summary of chapters 13 - 16 in the course book, deadline Oct. 9 2013
(4) An presentation in fron of the class of selected chapters in the course book, date Nov. 6 2013
(5) A final project with a written report (7hp)
 
Items (1)+(2) is worth 6 hp in total, (3)+(4) is worth 1 hp in total, and (5) is worth 7 hp.
 
- Remember that deadlines are strictly enforced. Late submissions will NOT be accepted!
- Read the requirements carefully
 
Homework excercises
The main focus of the course during it's first part, i.e. September and October 2013, is that you will develop an OpenGL based viewing system that is used to display images generated using a computer graphics technique called ray-tracing. The homework excercises are laid out to be a step by step implementation of this rendering system. As the course progresses your renderer will be more an more advanced.
The idea is that you by the end of October shall have a working rendering system which you can extend during the project in the second part of the course, i.e. November and December 2013. During the lectures, we will together, discuss the different parts and how to proceed with the implementations. The excercises are quite loosely held and you are welcome to carry out the implementations in a way that suits you.
 
Homework assignment 1 - Open a window
The excercise will be to use a window handlig library of your choice, e.g. glfw or SDL described above, to open a window and check which version of OpenGL that is supported on your computer.
This will require you to install a programming environment with a C++ compiler, a library for handling windows, OpenGL, and IO, possibly install/update OpenGL drivers, and write a small C++ program.
Requirements:
- A programming environment
- Installed development for a library for handling windows on your platform
- Working OpenGL drivers and development libraries
- A small program that opens a window and prints which version of OpenGL that is supported on your platform.

 
Homework assignment 2 - Displaying an image using OpenGL
In this excercise, you will implement a small program that can load an OpenExr image and display the image on-screen as the texture on a quad. This will require you to download and use the OpenEXR development libraries and implement a class for handling images and a small OpenGL program that use this class to handle textures.
You can find some example .exr images to load and display here: www.hdrv.org
Requirements:
- A C++ class for handling images in your renderer.
- The class should use OpenEXR libraries to load images.
- Use OpenGL to implement an orthographic view displaying a quad that is textured an image that you load.
- Implement a small program that takes a string as commandline input and loads an image with that name.

 
Homework assignment 3 - Simple ray-tracing
In this excercise, you will implement a small ray-tracer as described in chpaters 1-3 in the book "Ray Tracing from the Ground Up". See Program listing and class diagram for homework 3 for a small overview.
Requirements:
- Extend your image viewer from homework 2 to not only load images, but instead render images.
- Implement a simple camera model as described in the book.
- Implement a Scene class, a Camera class and an Object class.
- Let Scene have a list of Objects and let a class Sphere inherit from Object
- Implement the ray tracing and ray-sphere intersections.
- Render an image.
 
Homework assignment 4 - Viewing system
In this excercise, you will extend your ray-tracer with a viewing system that allows the camera to move freely in the scene.
Requirements:
- Implement a matrix class
- Extend your camera class with a transformation matrix
- Add a method: void LookAt(Point3 position, Vector3 viewDirection, Vector3 up);
- Add a method: Ray GetPerspectiveRayAtPixel(unsigned int x, unsigned int y);
 
Homework assignment 5 - Scene structure
In this excercise, you will extend your ray-tracer so that the geometrical objects in the scene can be transformed.
Requirements:
- Extend your object class with a transformation matrix
- Update the bool IntersectionTest(Ray &R) of your geometric primitives to take the transformation into account
- Extend class Ray and the void Render() method to support ray tracing with multiple geometric objects in the correct way.

 
Homework assignment 6 - Lighting and materials
In this excercise, you will extend your ray-tracer with directional- and point-light sources as well as support for adding materials on the surfaces in the scene.
Requirements:

 
Homework assignment 7 - Shadows and reflections
In this excercise, you will extend your ray-tracer to support shadows and more advanced materials.
Requirements:

 

  Valid XHTML 1.0 Transitional
Jonas Unger 2013