You are not allowed to edit this page.

    JustinTalbot/Assignment1

Installing PBRT

I didn't have too bad a time installing PBRT for both VS 2003 (at home) and VS 2005 (on campus). I spent some time, however, trying to make the process work a little nicer.

  • VS 2005 required turning off the deprecated function warning. Replacing all of the deprecated functions would have been a pain.
  • I added the missing type casts (about 6 of them) to get rid of the warnings about losing precision.
  • I copied the OpenEXR PDB files to the same directory as the LIB files, so the linker could find them.
  • I had to turn off parallel building in VS 2005.
  • Switching between Debug and Release builds (which I do frequently) was a pain since it requires changing the PBRT_SEARCHPATH. In VS 2005 I found that you can set environment variables in the Debug options for a project. By setting this for the Debug and Release builds, it now switches the search path automatically for me. VS 2003 doesn't have this nice feature. Instead, I set PBRT_SEARCHPATH to the Debug directory by default. Then I wrote a small batch file to change the environment variable when I run the Release build. This works nicely.
  • I added the ability to output to PFMs so I could look at the images in HDRShop.

Coordinate System

As others have noticed PBRT sometimes has strange coordinate system problems. The problem is that the LookAt() function is implemented incorrectly. On page 76 of the book the authors describe how to compute the right and up vectors for the LookAt matrix: right = up X dir. and newUp = dir X right. However, in the subsequent code segment, they compute: right = dir X up and newUp = right X dir. This switches the direction of the right vector.

The result is that any scene that uses LookAt to place the camera will behave like a right-handed coordinate system, except, rotations around the x and z axes will be clockwise, rather than counterclockwise. Any scene that uses some other Transform method to place the camera will be correct (left-handed).

If you choose to fix LookAt(), beware that you will also have to manually fix any scenes that were designed to be rendered with the old LookAt.

Here's a diff for the fix: http://research.justintalbot.org/pbrt/transform.cpp.1.diff

Recent