Computer Graphics Tietokonegrafiikka 52493S Winter-Spring 2004

bullet1 Homeworks

bullet2 Simple Viewer


Your task is to use Blender to design geometry (and materials, etc., if you so choose), export the data out to a file, and use the data in your OpenGL program. Here's a sample blend file  to get you started, see also the lectures.

The program needs to be able to display a model of a creature (person, robot, or an animal). Whatever it is, it needs to have some appendices (hands, feet, antennae, ...), each with several joints that you need to animate in a hierarchical fashion, a bit like the animation of a human figure (p. 39, slide set 2).

In your scene there should be at least 2 light sources. One light source should be attached to the camera, the other one(s) should just be somewhere so the scene is lit well.

You need to use at least 2 texture maps. One for the face of the creature, one for the ground. Use the web or draw yourself, I drew this one with Powerpoint in 2 minutes (then a screenshot, saved with Irfanview). And you should use at least 3 different materials, of which at least one needs to be transparent. You can find an example about texturing at the source pages , and you'll learn more about it in lecture 6 (where you'll learn also about transparency).

The creature should move and do something with its appendices, such as walk around along a path.

The user should be able to control the camera using a virtual trackball, see the last 4 pages of slide set 3. Here's something to get you started: tbex.py . The callbacks are already given in the example. Moving mouse with left button down should rotate the scene, holding CTRL down should zoom in or out, holding SHFT should pan. Just like in Blender...

The viewer should support various rendering modes. Implement keyboard callbacks, so that when you hit 'c' you can toggle back face culling on and off, with 'd' you can toggle depth test (z-buffering) on and off, and with 'p' you can toggle between drawing polygons, lines, or points. Hitting 'l' toggles the main light source on and off. And maybe with 'h' you get a help of keyboard commands. For culling, z-buffering, and main light, use glEnable() / glDisable() with appropriate arguments, for 'p' use the command glPolygonMode().

Draw at least part of the scene using display lists. Things that don't move, or move in unison, are good candidates. Can you improve the rendering speed that way? By how much?

Please use the latest version of Blender (2.32, became available within the last couple of weeks). The Blender page contains also a link to the Blender Python documentation.

More information in the 5th slide set.

The homework is due in five weeks, on 9:00 AM on Mar 17 .

Please be thorough with the report in the sense that you include a picture and some text about each component that I asked you to implement (with some kind of link to the code, at least the name of the function where the feature was implemented). In other words, I should be able to see what has been done without looking at the code or running the program (which I still want to do, so give good instructions how to run your programs).