Assignment title: Information
COMP330: Computer Graphics (2016s1)
Assignment 3
This assignment is designed to give you practice with aspects of 3D
graphics programming including:
A. Hierarchical 3D modelling.
B. User activated animations.
C. Perspective viewing from both a fixed and moving viewpoint in
3D space.
D. Viewports.
E. Use of lighting and texturing.
F. Scene management, generation.
The objective of the assignment is to design and implement in C++
and OpenGL a program which displays a simple robot inside a room.
The robot should be able to move around the room, and to pick up
and set down objects within the room. The following diagram
displays a perspective view of a simplified android robot.
While you are in principle free to design your own robot, you should
aim to create one which has a roughly similar structure, and at least
a reasonably similar level of detail.
Your program will be marked out of 40, and this mark will be worth
20% of your final mark for this unit.
Relevant sample programs
Two relevant sample programs are available for downloading from
the Assignments section of the COMP330 iLearn space: please
download the filesrobotArmLambert.zip and manualModelling.zip from
there. (These files are also available in the Week 7 section.) Study,
compile (build), and run each program.
Notice that the scene displayed by the first program can be simply
animated via the keyboard bottom row zxcvbnm, (together with
pqr), or alternatively by pressing 1 to obtain a timed animation. This
program does not use a scene graph to store a logical model of the
scene. Consequently its structure is relatively simple: no classes are
defined, but there are numerous functions.
The scene displayed by the second program shows a simple timed
animation of a "quad chain"; some other objects are displayed fixed.
This program does use a scene graph (tree) to store a logical model
of the scene. Furthermore, this program makes strong use of object
oriented programming techniques to represent and process the
scene graph (tree). Consequently, it structure is relatively complex: a
class is defined for each scene object, and some such classes are
derived from others. Nevertheless, the overall structure of the
program is not too difficult to understand. It will be discussed in
lectures and practical classes.
You are free to use either (or neither, or both) of these sample
programs to guide your work on this assignment. Indeed you could
use one of the sample programs, of your choice and modified as
necessary, as a kind of starting point for your work. But since your
assigned requirements are rather different from the features of the
sample programs, you may want to prune much away from your
chosen sample program before starting your own development
work.
Keep in mind also that lectures and practical classes will provide you
with many of the concepts you will need to be successful in this
assignment and in the final exam.
Tasks
The requirements are set out below.
1. (4 marks) Title page / Start window
Please provide a simple but attractive title page/ start window
in colour which introduces the user to the program. (This page
should contain at least your name and an image of your
robot.)
2. (12 marks) The initial basic scene
Upon the user's request a perspective view of a room should
appear. The view should be from a point located at the front of
the room, and looking toward the rear wall. The room should
contain at least a robot, situated left foreground, and a table,
situated right background. The robot's structure should be
roughly similar to that of the robot depicted above, although
the exact details of the design are up to you. That is, it should
consist of a base (perhaps a pedestal base, as in the diagram)
and an upper body which could swivel on the base. The upper
body should comprise (at least) a head, a trunk and two arms.
It is suggested that the head could rotate relative to the trunk;
and each arm could rotate independently about a horizontal
axis at each shoulder. Moreover each arm could contain some
kind of gripping mechanism, such as a fixed hand and a sliding
(translating) thumb as gripper. The table should have four legs.
In a first, simple version of your program, a few simple objects
(such as a box, a ball and a vase) could be displayed on the
floor.
A later, more advanced, version should provide an interface
which permits the user to position using the mouse an
assortment of objects on the floor of the room. It is suggested
that you provide a set of basic object types such as box, ball,
vase, triangular pyramid and cylinder. Your objects should be
different from those in the second sample
program ManualModelling. If you have time, you could provide a
more interesting collection of objects -- see component 4
below.
Your interface need provide only relatively limited object
placement capability. For example, only one object of each
allowable type, with a standard size and colour particular to
the type, could be placed for each object type.
You may wish to include a separate viewport displaying a view
of the floor from directly above in order to facilitate placement
of the objects.
You should also provide some basic lighting for the room. For
example, define a single light source, and assign appropriate
properties to it and the materials.
3. (10 marks) User initiated animation
Provide an interface which enables the user to initiate an
animation sequence. A user could then nominate an object in
the room, resulting in the robot moving (gliding) to the object,
picking it up, moving (gliding) to the table, placing it on the
table, and finally returning to the starting position. The interface
for object selection could be a simple one -- one which uses
either the keyboard or a mouse button, for example. (If you
have time, you could allow the user to choose the desired
object by clicking on the object in the scene -- see component
4 below.) Gripping of objects need not be too realistic. Also,
collision avoidance need not be a concern unless you have
time (see component 4 below).
4. (8 marks) Further features
Time permitting, you could provide further features such as:
o further use of lighting and shading
o use of textures
o a more detailed or more realistic robot
o a more realistic room and a more interesting collection of
objects
o object selection within the scene using the mouse
o a viewport on the screen displaying a robot-eye view
which changes in response to the movement of the robot
o collision avoidance
As a rough guide, each of the above will earn you
approximately 2 marks, up to a maximum of 8 marks for this
component.
5. (4 marks) Coding style
Four marks will be awarded for good coding style, including
such aspects as modularity, understandability and reusability.
6. (2 marks) Documentation
Two marks will be awarded for good documentation. This does
not have to be extensive; but please inform the user (marker)
about the keyboard commands, mouse actions, etc. that are
available, unless they are clear to a user simply by looking at
the screen upon starting up. Documentation could be supplied
as part of your electronic submission.
Submission
Please submit an exported eclipse project in a .zip file to iLearn by
the due date. Do not include your executable program. Your
documentation can be included in your project folder.
Please format the .zip file as "COMP330_A3_[your student
number].zip".