the robot arm

Project 2: Modeler

Assigned: 4/16/2001
Due: 4/30/2001
Artifact: 5/3/2001

Project TA : Brian Smith
Email : jbrians@cs




Quick Links

  1. W2K Skeleton Code and examples (zip) Updated 4/19/01 12:39 AM
  2. FLTK headers and library (zip)
  3. How to use and extend the modeler
  4. Answers to occasionally asked questions (OAQ)
  5. Height Fields - an idea for triangles

Project Description

In this project you define a 3D model and its controls, and then display and operate the model.  The project skeleton includes the full source for a simple robot-arm model. You will replace the robotarm.cpp file with your own model. You should not need to modify any other files, though you may create additional files to define more primitives. You may choose to modify some files in order to implement advanced effects. Do not modify files marked as read-only, as the animator project

Project Objectives

In this project you will use OpenGL to create and animate a character of your own design. You will become familiar with 3D hierarchical modeling and transformations.

What is a Hierarchical Model?

A hierarchical model is a way of grouping together shapes and attributes to form a complex object. Parts of the object are defined in relationship to each other as opposed to their position in some absolute coordinate system. Think of each object as a tree, with nodes decreasing in complexity as you move from root to leaf. Each node can be treated as a single object, so that when you modify a node you end up modifying all its children together. Hierarchical modeling is a very common way to structure 3D scenes and objects, and is found in many other contexts.

Project Requirements

First of all, you must come up with a character. This character can be composed solely of primitive shapes (box, generalized cylinder, sphere, and triangle).  It should use at least ten primitives and at least four levels of hierarchy. You must also use at least one each of the glTranslate(), glRotate() and glScale() calls to position these primitives in space (and you will probably use many of all of them!) You must also use glPushMatrix() and glPopMatrix() to nest your matrix transformations. The modeler has facilities for creating user interface widgets and hooking them to different features of your model. You must use at least one of these to add a simple animation to your model - have your character do some simple action as you scrub a slider back and forth.

You are required to complete two bells (or equivalent) from the list below. Feel free to come up with your own ideas and pass them by us. If they're cool, we'll count them as bells and whistles.

You must not break the built-in viewpoint controls unless you implement your own. This means you should not call glLoadIdentity in your code, and you should not remove the ModelerView::draw(); call at the beginning of your draw function.

Other than these requirements, you have complete artistic freedom on this, so be creative!

Bells and Whistles

One bell is worth two whistles.

[whistle] Change the default light source to illuminate your scene more dramatically.

[whistle] Come up with another whistle and implement it.  A whistle is something that extends the use of one of the things you are already doing.  It is part of the basic model construction, but extended or cloned and modified in an interesting way.

[bell] Use a texture map on all or part of your character. (This requires altering the implementation of the primitives shapes to include texture coordinates, or implementing your own primitives that do texture mapping).

[bell] Build a complex shape as a set of polygonal faces, using the "triangle" primitive to render them.

[bell] Make your character perform an animation.  Although you can try to use a timed callback (see here for more information), an easier solution is just to increment values each time your model's draw() function is called. If you use the menu option to turn on animation, your draw() function will be executed at around 30 times per second.

[bell+whistle] Add controls that let you change the "style" of your model.  Changing these controls will make your model morph into a dramatically different looking model (but with the same controls).  Dramatic and very creative style changes can earn more credit, whereas simple morphs will earn less.  The transformation could either be an instantaneous style change, or a gradual animated transition.

[bell+whistle]Implement the "Hitchcock Effect" described in class, where the camera zooms in on an object, whilst at the same time pulling away from it (the effect can also be reversed--zoom out and pull in) .  The transformation should fix one plane in the scene--show this plane.  Make sure that the effect is dramatic--adding an interesting background will help. 

[bell+whistle] Make your character express at least three moods (for example: happy, sad, and puzzled), and have it change its mood over time or in response to a control.  The reason there is a little more credit for this is that you are also expected to put some thought into the personality of the character.  Implement features or gestures that express a mood in a convincing and recognizable way.  Note that just changing color is not a mood change.

[bell][bell] Add a function in your model file for drawing a new type of primitive. You will be awarded one or two bells depending on coolness and difficulty.  The following examples will definitely garner two bells: 1) Extruded surface - given two curves, create a surface by sweeping one curve along the path defined by the other curve. 2) Surfaces of rotation - given a curve and a rotation axis, sweep out a surface by rotating the curve around the axis.

[bell][bell] Use some sort of procedural modeling (such as an L-system) to generate all or part of your character. Have parameters of the procedural modeler controllable by the user via control widgets.

[bell][bell] In addition to mood cycling, have your character react differently to UI controls depending on what mood they are in.  Think about the mood that the character is in, and the things that you might want the character to do, and then provide a means for expressing and controlling those actions.

[bell][bell] Come up with another heavy duty extension and implement it.  "Heavy duty"  is something that explores an area of technical or artistic development that is interesting, challenging, and well beyond the requirements of the assignment.