CMSC 435/634: Introduction to Computer Graphics

Assignment 1
Simple Scene
Due September 10, 2002

Now with color coded updates, new....old.
Last update: Thu Sep 5 13:22:13 EDT 2002

The assignment

Use BMRT (Blue Moon Rendering Tools, a shareware implementation of the Renderman Interface Standard) to model and render a cup on a table. The table should be square, 36"x36" with one leg at each corner 28" high. The cup should be 3" in diameter and 4" high, and sitting on the top of the table. The table and cup can be made of any material you choose, but should be made of different materials. Make them as realistic as possible. Your table and cup should be illuminated by specific lights (i.e. don't use a constant surface or ambient light source). Select a viewpoint that shows the table surface, cup and at least two table legs simultaneously.

Using BMRT

Read the handouts Renderman for Poets (for a very brief introduction to Renderman) and Blue Moon Rendering Tools: User Guide (for a information on running the BMRT programs). You may also find chapters 1-3 of The Renderman Companion (on reserve in the library) and the Renderman Specification (linked off the course web page) to be useful. BMRT runs on a variety of UNIX platforms (including PCs running Linux). BMRT is currently installed on gl, rooted at ~olano/public/435/BMRT.

Your development cycle will go something like this:

repeat
    edit table.c 
    make table.tif (you'll find a sample Makefile in ~olano/public/435/assn1)
    xv table.tif (full path == /usr/local/bin/xv)
until done

Strategy

Incremental development will probably result in the most efficient use of your time. For example, first try to get your program to draw a single flat square for the table. Once that's working to your satisfaction, add a cylinder for the cup on top. When both table and cup are working, add the legs beneath. Once you've got the basic setup, keep refining to make it more realistic until you're satisfied or you run out of time (whichever comes first).

Some debugging tips

  1. If your image is blank, check the camera position and direction. It may be pointing away from your scene.
  2. If some primitives are missing, check their orientation (the order in which you have specified the vertices). Polygons are transparent when viewed from behind.
  3. If some primitives are still missing, check the lighting. Surfaces on which no light falls will be black, just like the default background.
  4. If you're having trouble keeping everything straight, give each piece a different color until you've got them behaving properly. Then you can change the colors to whatever you want.

What to turn in

Turn in this assignment electronically as 'cs435 Proj1' using the submit mechanism:
    submit cs435 Proj1 [files...]
Submit a RIB file, the C program which generates it, and the image it creates. If you modified the Makefile, submit that as well (however, we must be able to run your submission on the gl systems to grade it).
Your comments should include information about which computer platform (HW and OS) you developed your program on. Additional comments may help your grade in cases where your program does not operate entirely correctly (since they can give me insight into what you were trying to do). In any case, your programs are expected to be robust and easy to understand.

Working at home

If possible, don't. I test things out on the university computers and may or may not be able to help you if things don't work right for you at home. If you do work at home, your final submitted version must be able to run on the gl machines and must be electronically submitted there.

If you absolutely must work at home, here are some things you may try:

Image display at home
Instead of "xv table.tif", copy table.tif to your home machine and display it there. TIFF image viewers exist for every platform out there (even windows). If you cannot find a working TIFF viewer, you can convert to another format on the gl machines:
    convert table.tif table.jpg
will convert from TIFF to JPEG. Convert keys off of the file extension and understands a huge number of image file formats. Two suggestions for free viewers that run on many platforms (including windows and linux) are GIMP (from www.gimp.org) and ImageMagick display (from www.imagemagick.org). GIMP is a full-featured image editor (and a great program) that happens to also be able to read and write many image formats. ImageMagick is a set of simpler tools for image display and conversion (including the convert program mentioned above).
Render at home
The Makefile provided operates in three steps. First, it compiles table.c into an executable program, table. Then it runs table to get a RIB format description of the scene. Finally, it renders the RIB to get table.tif. If you have a RenderMan renderer at home that accepts RIB files (all that I know of do), run
    make table.rib
on the gl machines, transfer the resulting RIB file to your home computer, to render there. RIB files are plain text, so transfer quite reliably.

I cannot help you find a working RenderMan renderer for home. If you run Linux or IRIX you may copy the version of BMRT on the gl machines. Otherwise, you may want to check the Dot C Software pages.

Compile at home
The Makefile I provided may not help you here, except for general guidance. Simple RenderMan C files should be quite portable, but allow some time to back-port before submission if you have any #includes beyond ri.h. You will need to figure out from your RenderMan documentation how to compile a RenderMan C program to either produce RIB or render directly.