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

Notes on the lab:

To submit the lab, create a directory called lab6.

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

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

Photorealistic Rendering

Renderman and BMRT (Blue Moon Rendering Tools) are rendering systems that comply with Pixar's Renderman Interface specification. They support advanced surfaces (various splines and NURBs) and complex surface, lighting and volume shading. Both renderers accept ascii files which specify a world model called RIB files (for Renderman Interface Bytestream). These files have a .rib extension. You can think of .rib files as something like VRML .wrl files. In fact the hierarchical block structure is very similar, although the syntax is quite different.

You can also generate Renderman worlds using procedural calls from C or another programming language. But that is a slow process, and for this lab and later ones, you will work directly with .rib files.

On Unix

If you are working on a Unix machine (only the machines in 349 Soda are licensed to run Renderman), copy the file ~cs184/public_html/lab6/sc.rib into a lab6 directory in your personal directory. If you are reading this page online, you can just click on the filename to get the file. Type

render sc.rib

After a short time, the render program will halt and you will have a file called "sc.tif" in your directory. This is an image file which is the output of the rendering process. You can view this file with xv the unix image viewer.

xv sc.tif

On a PC

If you are working on a PC, you can use BMRT's "rendrib" function to render the .rib file. If you're working on a home PC, install the BMRT as described in the BMRT web page. Be sure to set your path and the SHADERS variable. Copy the sc.rib file onto your PC. This file uses two of Pixars surface shaders. You will need to compile these before you can use them. Using FTP into an instructional unix machine, copy the files

/usr/local/prman/prman/lib/shaders/cmarble.sl
.../shaders/wood.sl

onto your PC. Then use BMRT's "slc" command to compile those shaders. The easiest way to do this is to define a double click action on .sl files that invokes slc, which is in the BMRT \bin directory. You should save the resulting .slc files in the BMRT \shaders directory.

Similarly, you can define the double-click action for .rib files to invoke rendrib, which is also in the BMRT \bin directory. Do this and then double-click on the sc.rib file. Some time later, you will get a .tif file. This file may not be easily viewable. Many image PC viewers dont support the features in this kind of tif file. The apple Quicktime viewer will give correct results. You can download it for free from Apple's web site.

Changing viewpoints, lights and materials

Try changing viewpoints by adjusting the transforms in the .rib file before the frame block(s). Take a look at the Renderman documentation to figure out how viewpoints (cameras) are handled. Then re-render the scene.

Then try adjusting the position and intensity of the light sources. Render the scene again.

Now try changing surface materials, by substituting another shader type for "cmarble" or "wood". You can see a list of the Renderman surface shader types in

/usr/local/prman/prman/lib/shaders

You can invoke any of those shaders (but make sure its a surface shader and not some other kind of shader like a light source).

Creating Your Own World

For the main part of the lab, you should create a simple world for yourself. Make a .rib file following the structure of the example given above. You can use simple shapes such as cylinder, sphere, cone etc, and Faceset shapes defined like the cube. Use builtin shader types for the surfaces. You should build an interesting world with 4 or 5 shapes. Figure out how to get shadows to show up. If using BMRT, explore the "shiny" surface type which is mirrored and will give you reflections.

If you're ambitious, you can create some spline shapes using a modeler such as sPatch for the PC or Sced for Unix. There are links to these modelers in the documentation section off the main course page.

What to turn in

You should create the world in a file called 'myworld.rib" which you turn in. There should also be a "myworld.tif" which is the result of rendering. Finally, include a "README" file that explains what platform (Renderman or BMRT) you use to render.