Please email cs348b-spr0506-staff@lists.stanford.edu if you are having problems building or running PBRT using your preferred environment. The following instructions might help you out though (big thanks to Lee Hendrickson for taking good notes as he went through the trouble).
Building PBRT on Linux (the 'myth' machines in Sweet Hall)
The public release of PBRT 1.02 available on www.pbrt.org requires modification to build on Stanford's 'myth' machines. We have placed a myth-specific tar file online at /afs/ir/class/cs348b/pbrt/pbrt1.02.cs348b.tar.gz. This archive contains two subdirectories:
/pbrt - which contains the PBRT 1.02 source tree with modifications made to its makefiles
/cs348b_extras - which contains a build of OpenEXR and libtiff that are required to properly build PBRT on myth.
After unzipping this archive to %%MY_LOCAL_DIR%% in your home directory, you will need to add the following directories to your environment's library search path.
%%FULL_PATH_TO_MY_LOCAL_DIR%%/pbrt/bin
%%FULL_PATH_TO_MY_LOCAL_DIR%%/cs348b_extras/lib
For example, assume I unzipped the archive to /afs/ir/stanford/users/k/a/kayvonf/src. Then in csh I'd set my LD_LIBRARY_PATH to:
setenv LD_LIBRARY_PATH /afs/ir/stanford/users/k/a/kayvonf/src/pbrt/bin:/afs/ir/stanford/users/k/a/kayvonf/src/cs348b_extras/lib
So the entire process to compile PBRT on a myth machine is:
extract /afs/ir/class/cs348b/pbrt/pbrt1.02.cs348b.tar.gz into your local AFS space.
- set the appropriate LD_LIBRARY_PATH (probably a good idea to add this to your .login)
- build pbrt by typing 'make' from the /pbrt directory
- build the tools by typing 'make' from the /pbrt/tools directory
Building PBRT on Windows Using Visual Studio 2003
The build of PBRT using Visual Studio 2003 is pretty much straight out of the box, and following the instructions in the PBRT book should get you all the way there. A couple notes:
You will need a mimimal installation of cygwin (for flex and bison) to properly build PBRT. Note that if you install cygwin into the default c:\cygwin directory, no modifications to the Visual Studio build are necessary. If cygwin is not installed into this directory, you will need to do change the custom build step for the files {pbrtlex.l} and {pbrtparse.y} in the 'parser files' directory of the 'core' project. Right click on these files to bring up the property page, and change the commandline for the custom build step to correctly call the cygwin flex and bison executables on your system.
PBRT includes no Visual Studio projects to build exrtotiff on Windows. I'm working on Visual Studio project file to build exrtotiff. It should be available shortly.
To view high-dynamic range (exr) images on Windows, download the OpenEXR Windows binaries from http://savannah.nongnu.org/download/openexr/OpenEXR-1.2.2-win32.zip. The program exrdisplay in this package is a simple exr viewer for Windows.
Building PBRT on Windows Using Visual Studio 2005
Unfortunately, PBRT doesn't build straight out of the box using Visual Studio 2005. I'll get instructions up on how to do this shortly. Shout loudly if you need this immediately.