I’m taking Prof. Pat Hanrahan’s CS348B “Advanced Rendering” course this quarter, and we’re extending the pbrt renderer as part of the course assignments. It’s probably worth documenting how I compiled this on my Snow Leopard machine.
After downloading and extracting pbrt 1.04 from the pbrt downloads page I had to install OpenEXR using MacPorts:
sudo port install OpenEXR
MacPorts installs libraries like this one in
/opt/local/ to prevent conflicts with libraries from other sources (it has a handy pkgconfig directory for each library in
/opt/local/var/macports/software/.../lib/ that is full of info). We need to update pbrt’s makefile to point here. We modify lines 13 and 14 in the Makefile to read:
You should now be able to
make the directory and produce pbrt. Remember, you need XCode installed!
Now you need to set the
PBRT_SEARCHPATH environmental variable. I did this the easy way and
cd‘d to the pbrt bin directory, and ran: