[Pbrt-discuss] installation in Ubuntu

João Vicente ajohnny at gmail.com
Fri May 22 04:15:49 EDT 2009


Hi Sajjad,

I was able to build pbrt 1.03 in the Ubuntu 8.10 x64 environment performing
the following steps. (I guess it should work for Ubuntu 9.04 x64 too).

First, you need to install some packages in order to fulfill the
dependencies. You can install all at once by typing this command on the
console:

sudo apt-get install build-essential zlib1g zlib1g-dev flex bison
libopenexr6 libopenexr-dev libilmbase6 libilmbase-dev exrtools openexr
openexr-viewers

After that, you really should change lines 13 and 14 of the Makefile to:

EXRINCLUDE=-I/usr/include/OpenEXR
EXRLIBDIR=-L/usr/lib

(You may go into these folders and check if the files are really there if
you want to.)

You may also want to change the line 24 of the Makefile from:

OPT=-O2

to:

OPT=-O3 -msse3 -mfpmath=sse

if you have a processor that supports sse3. It does make the renderer a
little quicker.

Now, assuming you are using a 64 bit OS, you SHOULD change line 29 of the
Makefile from:

CXXFLAGS=$(OPT) $(INCLUDE) $(WARN)

to:

CXXFLAGS=$(OPT) $(INCLUDE) $(WARN) -fPIC

The PIC flag stands for Position Independent Code, which is needed in a 64
bit environment.

And also, if you have added any extra plugins to pbrt, you should add it to
the appropriate list between the lines 46 and 65 of the Makefile.

You may also want to fix a little bug in the "kdtree.h" file which makes
pbrt crash when rendering some scenes using the Photon Map integrator. To do
this, you should go to the "pbrt-1.03" folder and then to the "core"
subfolder. Open the file named "kdtree.h" for editing (first, check if you
have write permission on it). Change lines 96 and 97 from:

std::nth_element(&buildNodes[start], &buildNodes[splitPos],
&buildNodes[end], CompareNode<NodeData>(splitAxis));

to:

std::nth_element(buildNodes.begin() + start, buildNodes.begin() +
splitPos,
buildNodes.begin() + end, CompareNode<NodeData>(splitAxis));

and save the file. This fixes the problem.

Now you may go to the "pbrt-1.03" folder and type "*make*" on the console
and all should work fine. ;-)

Then you may need a ".pbrt" text scene description file to test the
renderer. You may create it by hand or using an exporter. Then, all you need
to type is: "*pbrt test_scene.pbrt*" And later, of course, "*exrdisplay -u
scene.exr*"

You may also see and edit ".exr" images using other softwares, like Krita
(available on the Ubuntu package repository) and Cinepaint.

Hope that helps.

Regards,

João Vicente








On Fri, May 22, 2009 at 4:42 AM, Sajjad <dosto.walla at gmail.com> wrote:


> I already did that.

>

> i even did try as follows:

>

> EXRINCLUDE=-I/usr/include/OpenEXR

> EXRLIBDIR=-L/usr/lib64

>

>

> Considering the fact that i am using a 64-bit OS

>

>

> Any other hint?

>

>

> Regards

> Sajjad

>

>

>

> On Fri, May 22, 2009 at 8:40 AM, Slavomir Kaslev <

> slavomir.kaslev at gmail.com> wrote:

>

>> On Fri, May 22, 2009 at 2:34 AM, Sajjad <dosto.walla at gmail.com> wrote:

>> > Hello forum,

>> >

>> > I believe that issue has already been posted. I have OpenEXR installed

>> and i

>> > am running a ray tracer that can write to .exr format and i can view the

>> > image using exrdisplay.

>> >

>> > When i try to compile PBRT the exrcheck fails. In The Makefile i gave

>> the

>> > directory where the include directory to look into as instructed.

>> >

>> >

>> > Any suggestion to get around that problem?

>>

>> Change in the Makefile

>>

>> EXRINCLUDE=-I/usr/local/include/OpenEXR

>> EXRLIBDIR=-L/usr/local/lib

>>

>> to

>>

>> EXRINCLUDE=-I/usr/include/OpenEXR

>> EXRLIBDIR=-L/usr/lib

>>

>>

>> >

>> >

>> > Regards

>> > Sajjad

>> >

>> > _______________________________________________

>> > pbrt-discuss mailing list

>> > pbrt-discuss at pbrt.org

>> > http://six.pairlist.net/mailman/listinfo/pbrt-discuss

>> >

>> >

>>

>>

>>

>> --

>> Slavomir Kaslev

>> _______________________________________________

>> pbrt-discuss mailing list

>> pbrt-discuss at pbrt.org

>> http://six.pairlist.net/mailman/listinfo/pbrt-discuss

>>

>

>

> _______________________________________________

> pbrt-discuss mailing list

> pbrt-discuss at pbrt.org

> http://six.pairlist.net/mailman/listinfo/pbrt-discuss

>

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://six.pairlist.net/pipermail/pbrt-discuss/attachments/20090522/f1958172/attachment.html>


More information about the pbrt-discuss mailing list