CS184 Lab exercise 7 - due Friday 11/13/98 at 10pm

Notes on the lab:

To submit the lab, create a directory called lab7. Your directory should contain README, .rib, shader and tiff files:

README     lab7.rib      lab7.sl      lab7.tif

To submit, cd to the lab7 directory and type "submit lab7".

This lab is an individual lab. You should do it and hand it in on your own.

Writing Shaders

In this lab, the goal is to create surface shading procedures using the Renderman shading language. You should apply the shaders to some surfaces, which could be the surfaces from the last lab (but feel free to create new ones).

Here are three proposed shaders:

A polka-dot shader. You can create a regular array of filled circles. The circle and background color should be programmable, as should the size and spacing of the dots. You can make a random pattern if you like, but this is harder.

A plaid shader. Get hold of a piece of plaid cloth and figure out how the different colors are overlaid. Write a shader to implement a programmable plaid pattern. Try to avoid having too many options. e.g. you might want to generate colors automatically, or have two or three base colors and automatically generate variations on them.

A soup shader. The soup shader should be both a color and a true displacement shader. Think about pea soup or minestrone, or some other soup that includes food particles. Your shader should create a random distribution of those particles, and should show both their color and their depth on the soup surface. Note: Dont try to make a volume shader. The goal is only to create the appearance on the surface of the soup.

The Pixar online documentation for the shading language is pretty good. You can find it in http://www.pixar.com/products/renderman/toolkit/RISpec/section8.html.

After writing your shader, dont forget to compile it with the shading language compiler slc. The result will be a .slc or .so file which should be in the same directory as your .rib file (so the renderer can find it when it runs). You dont need to include the compiled shading language file with your submission, because we will recompile that. You should include the .tif file which your program produced.

You should submit a README file explaining which Renderer you used. A good software engineering tip: a well-written shader should run under all the supported systems (original Renderman and BMRT in this case) and produce the same results. The files to submit are then:

README      lab7.rib       lab7.sl       lab7.tif

More Notes:

If you use some of the noise functions in BMRT 2.3.6, you may need to copy the header files noise.h and pattern.h into the directory where you run the slc program. They are in ~cs184/lib/BMRT2.3.6/shaders.