Assignment 0: Warm-up

Due: Thursday, Feb 7 2008 at 11:59pm


This assignment is designed to get you acquainted with pbrt, 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. pbrt 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).

Step 1

Follow the instructions here to install the latest version of pbrt. 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 pbrt to run on your system, remember to check whether you've correctly set PBRT_SEARCHPATH and system PATH. For missing dll's or other library files, be sure to check the /OpenEXR/bin folder as well.

Step 2

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 pbrt/scenes/. For an example scene, look for sphere-over-plane.pbrt. From inside the scenes directory type: pbrt spheres-over-plane.pbrt

You will see some messages from pbrt. After a minute or so, the rendering will finish. You will have a new image, either spheres.exr or pbrt.exr depending on the output file name, in your directory. Use the imageview binary (or exrdisplay) to view the image, or convert it to a tiff using exrtotiff. Congratulations! You've rendered your first image with pbrt. You should see something that looks like this:


Step 3

Open the sphere-over-plane.pbrt 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.

Step 4

Next, let's experiment with some basic lighting control using an example scene included in the package called killeroo-simple.pbrt. First, render the default scene by typing:

pbrt killeroo-simple.pbrt

This will produce an image pbrt.exr that you can either visualize in exrdisplay and ImageView, or convert to a TIF image with exrtotiff. 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 killeroo-simple.pbrt 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" [8]
Shape "sphere" "float radius" [3]

As you can see, this defines a spherical area light of radius 3. Try to increase the radius to 20, 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 exrdisplay or ImageView. Second, the shadow boundaries look noisy, and you need to increase the integer nsamples 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 8 to 64 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 Translate (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 pbrt. 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.

Step 5

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.

  1. What physical quantity do we measure along a ray? (answer in one word)
  2. How are vector and normal treated differently? (answer in one line)
  3. What's the difference between the Intersect and IntersectP routines? (answer in one line)
  4. 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 .txt file to the instructor by the due date and time.


The grading for this assignment is on a scale of 0 to 4, based on how many questions you answered correctly.

Topic revision: r3 - 2008-01-30 - RuiwanG
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding UMass CS EdLab? Send feedback

mersin escort adana escort izmir escort gaziantep escort