If you want to experiment with Physically Based Rendering, PBRT is the tool to use. Unfortunately, the latest builds have some incomplete instructions on how to build PBRT on your own machine.This article will show you how to compile and use PBRT on Ubuntu(
Version12.10 ).
First,you should install some packages that would use in the process of compiling.Copy/paste the next line to install
them:
sudo apt-get install build-essential openexr openexr-viewers libopenexr-dev libilmbase-dev libfl-dev
Second,download the zip file from pbrt-v2-src.tar.bz2, for Linux and OSX (12MB) ,then extract the file to some place (For example :~/pbrt)
Third,go into the src folder(For example : cd ~/pbrt/pbrt-v2/src) from terminal ,then run make in the src directory.If
there is no error happened,that means you have complete the compile.
Fourth,add the PBRT to environment viarable. Run the next line in terminal:
sudo gedit /etc/profile
then add the path at the end
export PATH="$PATH:/home/{the account you use }/pbrt/pbrt-v2/src/bin"
save the change,and you should restart your computer to make the change effective.
To see if the path had been added successfully ,run in terminal:
echo $PATH
if there have the path you have added ,that means you have done
The next is to test what you have done above.Run in terminal:
cd ~/pbrt/pbrt-v2/scenes
pbrt bunny.pbrt
this is rendering the bunny .If you have no error hanppened,that you can see a file named pbrt.exr in the folder .This is what you rendered.To see the result,run in terminal:
exrdisplay pbrt.exr
Ha ,you will see the result