Instructions for Installing PBRT


Below I provide a simplified version of the installation instructions. You may also refer to these two pages for more details instructions:

Get pbrt

Please grab the pbrt source code (version 1.03) which is available at the following two locations (Please do not use the pbrt code provided on the textbook CD. The downloads below contain many bug fixes from the original release).

You should still use the scene models included in the textbook CD. For those who are still waiting for their books to arrive, here is a small set of the example scenes for you to start with:

Unzip the pbrt archive into a local directory; also unzip the scenes to a directory. From now on, I'll define the full path to (your_local_dir/pbrt-1.03) as PBRTSRC_ROOT.

Building pbrt on Windows Using Visual Studio 2003/2005

  1. To build pbrt, you will need a minimal installation of cygwin (you will need programs flex and bison from the cygwin package). It is highly recommended that you install cygwin into the default c:\cygwin directory. In this case, 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 'core' project. In VS, 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.
  2. Install OpenEXR. If you've downloaded the pbrt-src-1.03 windows zip file from the above links, you should already have an OpenEXR 1.4.0 VS2005 build folder in /win32 projects, and no further change is needed. If your are using Visual Studio version 2003, you need to obtain OpenEXR from this link: http://www.openexr.com/downloads.html. Be sure to get the correct binaries for your system.
  3. Build the entire pbrt solution from the solution file PBRTSRC_ROOT/win32/pbrt.sln. 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.
  4. 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 working with a debug or release build. You may also find it convenient to add one of these directories to your system PATH.

Note

If you would rather not install cygwin, at least install bison and flex, which you can download from this link. Put them in c:\cygwin\bin folder so that the parser files can find them.

Building pbrt on Linux

  1. You will need to download and install OpenEXR 1.4.0 on your machine before attempting to compile pbrt. OpenEXR downloads are available at http://www.openexr.com.
  2. Build pbrt: Type make from the PBRTSRC_ROOT directory to build pbrt. Binaries will be placed in $(PBRTSRC_ROOT)/bin.
  3. Build pbrt tools: Type make from $(PBRTSRC_ROOT)/tools directory to build some utility programs that are useful for working with files that you might include in pbrt scenes. Most notably is exttotiff, which converts between the EXR and TIFF image formats.
  4. Set paths:
    • pbrt builds each of its subcomponents into separate dynamically linked libaries. At runtime, it uses the environment variable PBRT_SEARCHPATH to find these libraries. Please set PBRT_SEARCHPATH to $(PBRTSRC_ROOT)/bin in your environment.
    • It is convenient to add the directories PBRTSRC_ROOT/bin and PBRTSRC_ROOT/tools to your PATH.

Building pbrt on Mac OS

  1. Install OpenEXR 1.4.0 on your system, which can be obtained at http://www.openexr.com/downloads.html.
  2. You need need to modify the pbrt makefiles so that EXR libraries and header files can be found by the pbrt build process.
  3. You will need to set up the PBRT_SEARCHPATH environment variable as discussed in the Linux and Windows build instructions.

Viewing and Converting EXR Images

  1. To view .EXR images produces by pbrt, you can either convert them to .TIF files using exrtotiff (look inside the /tools folder) or view them directly using an imaging program that supports them, such as the ImageView tool available here (Windows and Linux executables).
  2. Other Programs that can display EXR images:
    • The latest version of Photoshop.
    • In the /bin subdirectory of your OpenEXR binaries is a program called exrdisplay that can be used to directly view and adjust the exposure of EXR files.
    • Go to http://www.openexr.com/downloads.html for more information.

Topic revision: r4 - 2008-02-07 - RuiwanG
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 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