CS 348B - Computer Graphics: Image Synthesis Techniques
Homework 1 - Introduction to PBRT
Assigned Thursday, April 1. Due Thursday, April 8
This assignment will introduce you to using pbrt and simple modelling tools.
Step 1: Install pbrt
Instructions are on the pbrt install page.
Step 2: Render a test scene
Once you have successfully compiled pbrt and set the environment variables, you can try rendering some images.
- Copy the file /usr/class/cs348b/scenes/killeroo-simple.lrt to
(you'll have to make this directory).
- Copy the file /usr/class/cs348b/geometry/killeroo.lrt to ~/cs348b/geometry
(you'll have to make this directory too).
- In ~/cs348b/scenes type 'pbrt killeroo-simple.lrt' to begin rendering. You will see some messages from
pbrt, and it will begin printing a sequence of '+'s to the screen to let you know it is working.
When the rendering finishes, you will have a new image,
killeroo.exr, in your scenes directory. The EXR
format is a high dynamic range
image format created by Industrial Light and Magic.
- Convert the exr file to a tiff file by typing 'exrtotiff killeroo.exr
killeroo.tiff'. This command uses the exrtotiff utility that is part of
pbrt. View the tiff file with your favorite image viewer. For
example, try 'xv killeroo.tiff'. It should look like something like this (but
Congratulations! You've rendered your first image in pbrt.
- For submission, you will need to convert the image to a browser format, such
as jpg. On the linux systems, you can do this with the installed ImageMagick
utility. Try 'convert -quality 100 killeroo.tiff killeroo.jpg'.
- Now take a look at the scene file, killeroo-simple.lrt -- it is a text
file. Try reducing the resolution and sampling rate to create a faster,
lower-quality render -- you will do this a lot over the course of the quarter
for debugging. Also experiment with changing the materials, lights and
camera. The file format is described in Appendix C of the pbrt
textbook. You fill find several other scene files in the /usr/class/cs348/scenes/.
You can also find industry-standard RenderMan (.rib) files on the internet,
such as through the links on the Resources
page. Although pbrt does not accept rib files directly, pbrt comes with
a rib2pbrt utility program that can translate between the two. Beware,
however, that pbrt is not fully RenderMan compliant.
Step 3: Readings from the pbrt textbook
Our pre-publication copy book is hot off the press from the publisher. We
have permission only to distribute hard copies, which will be available by
Tuesday, April 6. We apologize for the delay, and ask you to plan ahead to
do the readings when the books arrive.
Read the first 1-3 chapters of the pbrt book. Answer the following questions (one
word or one line answers suffice):
- What physical quantity do we measure along a ray?
- What pbrt class is used to describe the reflection of light at a point?
- How are vectors and normals treated differently?
- What's the difference between 'Intersect' and 'IntersectP'?
- How is the information about intersection between a ray and a shape represented in pbrt?
- What kind of coordinates are used to parameterize a triangle?
Step 4: Submission
In all the homeworks for this class we will evaluate your work by
browsing web page write-ups. Create a "Homework 1" web page somewhere (for instance, under the
www directory of your leland account). Include the following and no more,
1. Your killeroo image, so that it can be seen in a browser.
2. The answers to the pbrt review questions from step 3.
Mail the URL for your web page to email@example.com.
Copyright © 2004 Pat Hanrahan