Programming assignment 4 - Scene Graph Manager

CS 354 - Introduction to Computer Graphics
Fall, 2015
Don Fussell

DUE Thursday Nov 5 at 11:59pm

In this assignment, you'll refine your Assignment 3 project to make it a full blown scene graph manager. Your new system will continue to read input files in .obj format, and now it will allow you to build scene graphs using them, and render the results. You'll continue to use the camera control from the previous assignment, but you will do this using transformation within the scene graph. Your scene graph will also support simple animations.

Rendering

You will need to render the scene graph in every frame in your display callback. This will entail a depth first traversal of the graph as we've described in class, managing a transform stack. You should still be able to use the rendering modes from your previous assignment, but you should be able to change the rendering mode on an object by object basis as well as globally.

These are the rendering modes from the previous assignment.

Hierachical modeling and motion control

You should implement all camera and object motions as well as placement of lights using a scene graph. All drawing should be done by a generic traversal of the graph to draw it. Changes to what is drawn are accomplished by changes to the scene graph. You should have several types of scene graph nodes:

This scene graph should have a root object, at least one light node, a camera node and a child object of the root that will link to the geometry node that contains your parsed object data. All of these object, light, and camera nodes will be linked by transform nodes. You should move the camera by manipulating the transform node connecting it to the world, likewise you will do object motions this way. Due to GUI limitations, the only required motion is for your object to be able to spin around any of its local object coordinate system primary axes. You should be able to turn on or off any combination of these spins interactively.

User Interface

Note: If you are having problems with crashes using glui on the lab machines, try building your code with this makefile. It does appear we are having problems with g++ on the lab machines again.

In order to alleviate the limitations of the glut GUI, we will be using the GLUI widget package. This is a simple gui package that allows many input capabilities that are not possible with glut and that will allow us to replace the text based inputs from the previous assignment with input from an appropiate widget. The glui package and example programs are available here. To build, untar the file, then go to the src directory, and type "make". They should build as distributed on the lab linux machines. The library will be put in the lib subdirectory, and the example program executables will be in the bin subdirectory. We are working to get a standard installation of this library on the lab machines, but in the meantime you can build and link to your own copies.

You should implement interactive commands to accomplish the addition of nodes of the types described above to a scene graph. You should be able to create and delete object, geometry, transformation, attribute, and light nodes and to set and change their key parameters interactively with a mouse and keyboard. All nodes should have identifiers that you can use to modify or delete them once created. Note that deletion of nodes should only be allowed where it makes sense, deleting a node from the middle of a graph may not be allowed if it isn't clear what the resulting graph would be. You should also use widgets to allow interactive controls for motions and other requirements described above.

There are a number of ways widgets can be used to implement interactive control. Selections from menus, subwindows for text entry and many other options will be available, as demonstrated in the glui example programs. You are free to choose a user interface style that you like as long as you provide the required capabilities.

Extra credit

As you will presumably notice doing it, there are many ways to enhance this project if you're so inclined. Here are some suggestions:

Notes:


Last modified: 10/08/15 by Don Fussell fussell@cs.utexas.edu