Assignment 0: Warm-up
Due: Thursday, Feb 7 2008 at 11:59pm
This assignment is designed to get you acquainted with
, a physically-based rendering system you will use throughout this course. Your goal should be to get comfortable with the software by rendering several test scenes and reading the beginning chapters of the text book.
has been developed and tested extensively on Linux, MacOS
, and Windows. Feel free to use whatever platform you desire, however your assignment code should be portable (so as to ease the grading process for the TA).
Follow the instructions here to install
the latest version of
. Do not use the source code provided by the textbook, as there have been many bug fixes since that version. If you are having trouble getting
to run on your system, remember to check whether you've correctly set
. For missing dll's or other library files, be sure to check the
folder as well.
Once you have successfully compiled pbrt, you should try rendering some images. The scene files (including geometry and textures) can be copied from the textbook CD to your local directory, say
. For an example scene, look for
. From inside the scenes directory type:
You will see some messages from pbrt. After a minute or so, the rendering will finish. You will have a new image, either
depending on the output file name, in your directory. Use the
) to view the image, or convert it to a tiff using
. Congratulations! You've rendered your first image with
. You should see something that looks like this:
scene file in a text editor. You will see a perspective Camera description followed by a Film type. Try reducing the resolution to half the current size. Also, try reducing the Sampler pixelsamples count from 2 to 1, and render the scene again. It will be smaller and have some jaggies, but it will render much faster. This will be useful later in the course
: you'll need to quickly generate lots of quick and dirty renders for debugging purposes.
Next in sphere-over-plane.pbrt you will find the description of the scene. You should be able to figure out the meaning of the lines that describe the area light source and the sphere shapes. Experiment with changing the colors of materials and lights. Try to build some intuition for how the transformations affect the final image. The CD contains several other scene files. Feel free to experiment with more complex scenes. You can find detailed information about pbrt scene descriptions in appendix B of the text book.
Next, let's experiment with some basic lighting control using an example scene included in the package called
. First, render the default scene by typing:
This will produce an image
that you can either visualize in
, or convert to a TIF image with
. The image should look like this:
As you can see, it uses a small area light (a spherical light) which casts a fairly sharp shadow on the ground. In natural scenes, however, we normally have fairly large area lights. To experiment with that, open
in a text editor, and look for the following two lines:
Translate 150 0 20
Translate 0 120 0
AreaLightSource "area" "color L" [2000 2000 2000] "integer nsamples" 
Shape "sphere" "float radius" 
As you can see, this defines a spherical area light of radius
. Try to increase the radius to
, and render the scene again. You should then get softer shadows which look more natural. There are two things you will notice immediately: First, the scene becomes much brighter, which is normal since the light is bigger thus emits more energy. You can easily adjust the exposure in
. Second, the shadow boundaries look noisy, and you need to increase the
parameter to smooth it out. This parameter controls how many samples are used to estimate the illumination from the light source, so naturally when you have a bigger area light you need to send more samples. Try to change this fro
and re-render the scene (which will take longer time). You should get an image that looks like this:
Finally, try to move the light source around by changing the amount of
(the first two lines above), and produce an image that looks like this:
At this point, you should have a pretty good idea of how to control the lighting in
. You can try some more experiments, such as adding additional light sources into the scene. If you have difficulties getting things to work like they should be, contact the instructor.
You should read through the first three chapters of the pbrt book. As a quick check on what you've read, answer the following four questions about pbrt.
- What physical quantity do we measure along a ray? (answer in one word)
- How are
normal treated differently? (answer in one line)
- What's the difference between the
IntersectP routines? (answer in one line)
- What pbrt class is used to describe the intersection between a ray and a shape? Give a brief description of each field in this class. (answer in one line per field)
For this assignment, you should follow Steps 1 through 4. It is extremely important that you complete all these experiments as they will make your subsequent work much easier. You must submit answers to the questions in Step 5 as a single
file to the instructor by the due date and time.
The grading for this assignment is on a scale of
, based on how many questions you answered correctly.