= PBRT Help = Please email cs348b-spr0607-staff@lists.stanford.edu if you are having problems building or running PBRT using your preferred environment. Before emailing, read over the following notes on common issues with getting PBRT up and running on your system. == Building pbrt on Linux (the 'myth' machines in Gates B08) == COMPLETE INSTRUCTIONS COMING SOON {{{Exrtotiff}}} is a simple utility provided with pbrt to convert high dynamic range (HDR) image files (.EXR) produced by a pbrt render into tiff files (.TIF) that can be displayed by most image programs. {{{exrtotiff}}} src is located in the {{{PBRTSRC_ROOT/tools}}} directory. Typing make from this directory will build {{{exrtotiff}}}. == Building pbrt on Windows Using Visual Studio 2003 == The build of pbrt using Visual Studio 2003 is pretty much straight out of the box. 1. Download the PBRT 1.02 distribution from: http://www.pbrt.org/src/pbrt-src-1.02.zip 2. Unzip the source archive, I'll refer to the directory {{{YOUR_LOCAL_PATH/src-1.02}}} as {{{PBRTSRC_ROOT}}}. You will find VS2003 solution file in {{{PBRTSRC_ROOT/win32/pbrt.sln}}} 3. To build pbrt, you will need a minimal installation of [http://www.cygwin.com cygwin] (for flex and bison). 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 command line for the custom build step to correctly call the cygwin flex and bison executables on your system. 4. Build the entire pbrt solution. A Debug mode build will place binaries in {{{PBRTSRC_ROOT/win32/Projects/Debug}}}. A Release mode build will place binaries in {{{PBRTSRC_ROOT/win32/Projects/Release}}}. 5. Set the {{{PBRT_SEARCHPATH}}}. Pbrt compiles each of its modules as dynamically linked libraries and uses {{{PBRT_SEARCHPATH}}} to find these libraries when running. Create a system environment variable called {{{PBRT_SEARCHPATH}}} and set its value to either {{{PBRTSRC_ROOT/win32/Projects/Debug}}} or {{{PBRTSRC_ROOT/win32/Projects/Release}}}, depending on whether you are developing using a debug or release build of the program. You may also find it convenient to add one of these directories to your system path. ==== Building Exrtotiff on Windows ==== {{{Exrtotiff}}} is a simple utility provided with pbrt to convert high dynamic range (HDR) image files (.EXR) produced by a pbrt render into tiff files (.TIF) that can be displayed by most image programs. {{{exrtotiff}}} src is located in the {{{PBRTSRC_ROOT/tools}}} directory. The pbrt archive does not include a Visual Studio project file to build {{{exrtotiff}}} on Windows. We will attempt to provide one shortly. For now, you can download a compiled Win32 binary '''[http://foobar here]'''. == Building pbrt on Windows Using Visual Studio 2005 == COMPLETE INSTRUCTIONS COMING SOON == Viewing and converting EXR Images == To view .EXR images produces by pbrt, you can either convert them to .TIF files using {{{exrtotiff}}} or view them directly using an imaging program that supports them. The most common usage of {{{exrtotiff}}} is simply converting from an {{{.exr}}} file to a {{{.tif}}}. {{{ exrtotiff srcfilename.exr outputfilename.tif }}} === Other Programs that can display EXR images === * The latest versions of Photoshop (beginning with CS) can open EXR files directly. * OpenEXR software provides an exr-photoshop plugin for both Windows and OS X. You may download the package from http://www.openexr.com/downloads.html. The documentation is at http://www.openexr.com/photoshop_plugin.html. * 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.