CMSC 435/634: Introduction to Computer Graphics

Assignment 1
Simple Scene
Due September 14, 2009

Now with color coded updates, new....old.
Last update: Aug 26 03:00:14 EDT 2009

The assignment

Use Pixie (a free Renderman compliant renderer) to model and render a handful of candy on a plate. The plate should be round, roughly 12" in diameter. It does not need to be resting on anything. The candy should be realistically proportioned relative to the plate (e.g. a gumball is about an inch in diameter). At least one of confections should be not based on a sphere, cylinder, or other simple primitive. The plate and candy can be made of any material you choose, but should be made of different materials. Make them as realistic as possible. Your scene should be illuminated by specific lights (i.e. don't use a constant surface or ambient light source). Select a viewpoint that shows the scene from an oblique angle (i.e. not aligned with any of the coordinate axes).

Using Pixie

Read the handouts Renderman for Poets (for a very brief introduction to Renderman) and Pixie Wiki (for a information on running the Pixie 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. Pixie runs on a variety of platforms (including PCs running Linux, Windows, Mac OSX). Pixie is currently installed on gl, at /afs/umbc.edu/users/r/h/rheingan/pub/435/pixie-2.2.4

Your development cycle will go something like this:

source /afs/umbc.edu/users/r/h/rheingan/pub/435/pixie-csh
       (or pixie-bash for bash users)
repeat
    edit candy.c 
    make candy.tif (here's a sample Makefile)
    display candy.tif (you must be running in an X-terminal for this to work)
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 circle for the plate. Once that's working to your satisfaction, add a sphere for a gumball / jawbreaker / etc on top. Then add some more candy (remember to make at least one using something other than a sphere). Now line up a good view and lighting. 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.

Grading

Eighty percent of the grade will be for turning in a working program which meets the minimum specifications (correct objects, view, and lighting). The remaining twenty percent will be for realism and creativity (interesting objects, advanced lighting, textures, etc.).

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. Your comments MUST include a description of help you received or a statement that no help (beyond the text and course staff) was received. If you do not include a statement about help, your project will be returned ungraded.

Working at home

If possible, don't. We 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 "display candy.tif", copy fruit.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 candy.tif candy.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) is 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
Rendering includes three steps. First, you compile candy.c into an executable program, candy. Then you run candy to get a RIB format description of the scene. Finally, you render the RIB to get candy.tif. If you have a RenderMan renderer at home that accepts RIB files (all that I know of do), you can perform the first two steps on the gl machines and transfer the resulting RIB file to your home computer to render there. RIB files are plain text, so transfer quite reliably.

You can download your own copy of Pixie. It seems to install simply and reliably (we've tried on linux and OSX), but we can't help you find problems if it doesn't (since they are likely to be related to your particular OS configuration).

Compile at home
The Makefile we 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.