CMSC 435/634: Introduction to Computer Graphics

Assignment 1

Simple Scene

Due February 14, 2008

The Assignment

Use Pixie (a free RenderMan compliant renderer) to model and render a bowling alley scene. The bowling alley should contain at least one lane of regulation size of 42.5" x 60'. The scene should further include six or more pins and a bowling ball striking the pins. The pins should all be the same, but one should be a toy of a different shape, something not normally found in a bowling alley. I'll show the best few in class, so be creative. You may choose any toys you like, but it is best to make sure that it and everything in your scene can be made by simple compositions of RenderMan primitives (RiPatch, RiCylinder, RiDisk, RiCone, RiSphere, RiTorus, RiHyperboloid or RiParaboloid). Examples could include simple cylinder or cone shaped pins. All objects in the scene should be sitting on (touching) the bowling lane. The elements of the scene can be made of any "surface" material you choose, but should be made of different materials. Make them as realistic as possible. You can find many surface options in the $PIXIEHOME/shaders directory, look for the surface ones (not light or volume).

Your scene should be illuminated by at least two specific lights (i.e. something like pointlight or distantlight). You can find the light options in the same directory as the surfaces, but look for the light ones. We want light/surface interaction, so 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), and allows us to see all the elements. The bowling lane need not be completely visible, however, the ball, pins and toy should be.

Getting started and submitting your work

You will be using the university linux.gl systems, and using CVS to submit all work in this course. Refer to the class CVS instructions for details, but you will need to first check out a copy of your CVS files from the class repository. This will give you the sample files you need to start work on this assignment. Do all of your work in your checked out copy, then check in your submission by the deadline. DO NOT work directly in the repository, if you do, we may not be able to retrieve your assignment and your work may be lost!

Turn in this assignment electronically by checking it into your Assn1 CVS directory by 11:59 PM on the day of the deadline. We will use a dated checkout for grading, so you will be graded on whatever has been checked in as of 11:59 PM. Submit a readme.txt file telling us about your assignment. What help, if any, did you receive from books, web sites or people other than the instructor and TA? What are your toys supposed to be? What did you do to make it look more realistic?

Also submit all source and data files we need to build and run your submission. We should be able to run 'make' in your submission directory on the linux.gl systems to produce a TIFF image for your project. Submit your modified Makefile, any C/C++ files, and any other auxiliary files we might need, but not the object (.o), executable or RIB files. Be sure to comment your code! You will not be graded on the presence or quality of your comments, but we will look at your code. Anything that helps us understand what you did (or were trying to do) can only help. In any case, your programs are expected to be robust and easy to understand.

Remember: If you do not include the statement of help in a readme submitted with your assignment, the assigment will be returned ungraded!!! You will need follow the CVS instructions to cvs add this file for it to be included it in your submission. Since this is the first assignment, you may want to check out a second copy of your repository after you submit to make sure your submission is complete.

Using Pixie

Read RenderMan for Poets (for a very brief introduction to RenderMan) and the 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 to be useful. Pixie runs on a variety of platforms (including PCs running Linux, Windows, Mac OS X). 3Delight for Linux is currently installed on linux.gl, rooted at ~olano/public/pixie.

To set up 3Delight for use, csh or tcsh users must

source ~olano/public/pixie-csh

bash or sh users would instead use

. ~olano/public/pixie-bash

Your development cycle will go something like this:

repeat
    edit assn1.c 
    make assn1.tig
    display assn1.tif
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 rectangle for the alley. Once that's working to your satisfaction, construct and position ball and pins. You may want to model each in isolation, then position them in an appealing scene. 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).

We are using CVS to submit assignments, but it is really a revision control system. Use it! Check in to CVS often. If you break or delete something, you can always go back to a previous revision if you have been checking them in.

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. Most primitives 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, use the constant surface and give each piece a different color until you've got them behaving properly. Then you can change the colors to whatever you want.

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 assn1.tif", copy assn1.tif to your home machine and display it there. TIFF image viewers exist for every platform out there (even web-entabled cell phones!).

Render at home

The Makefile provided operates in three steps. First, it compiles your .c into an executable program, table. Then it runs that to get a RIB format description of the scene. Finally, it renders the RIB to get the TIFF. If you have a RenderMan renderer at home run

    make assn1.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 debug your home RenderMan installation.

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.