pbrt v2 alpha is now available

79 views
Skip to first unread message

Matt Pharr

unread,
Oct 7, 2009, 11:22:30 PM10/7/09
to pbrt-a...@pbrt.org, pb...@googlegroups.com
We're happy to announce that a first alpha release of the second version of 
pbrt is now available for the brave and adventurous.  This version of the
source code corresponds to the system that will be described in the second
edition of the book "Physically Based Rendering: From Theory To
Implementation", which is expected to be available at SIGGRAPH 2010.

The source code is available from github: http://github.com/mmp/pbrt-v2.
The easiest way to download the code and track changes is to use the git
source code management system:

% git clone git://github.com/mmp/pbrt-v2.git pbrt-v2

But you can also click the "download" button on that page to download a 
tar or zip file of the latest version of the code.

We are making the source code available before publication of the book in
the hopes that it will be useful to developers and users.  We in
particular hope that we will receive some feedback on the changes to the
system: comments on better implementation approaches, and performance or
portability shortcomings would be highly welcomed!  If you do have any
feedback, please either send it to the pbrt mailing list, or to

The remainder of README file (with much more information about what
has changed, etc.) is below.

Thanks,
-matt


We will release updated versions of the system frequently; the latest
version of the code will always be available at the github page 
http://github.com/mmp/pbrt-v2.  The best way to track changes to the system 
is to use the git source code management system, although tar files and 
zip files are also available for download from the github page.

The remainder of this document will summarize the major changes to the
system.  See the file README_BUILDING.txt for information about how to
compile the system.

--- Incompatibilities ---

Many existing pbrt scene files will work unmodified with the second version
of the system.  The most significant user-visible change is that we have
taken this opportunity to fix the long-standing bug where LookAt
inadvertently flipped the handed-ness of the coordinate system
(http://pbrt.org/bugtracker/view.php?id=5).  You may find that scene files
that use LookAt now render flipped images or otherwise have problems with
the camera positioning.  Add "Scale -1 1 1" to the top of any scene
description files with this problem to return to the previous camera
position.

pbrt no longer has a plugin implementation based on runtime loading of DSOs
or DLLs.  All implementations of shapes, lights, etc., are just statically
compiled into the pbrt binary.  (We found that the complexity of supporting
this, both in cross-platform headaches, user issues with plugins not being
found, and so forth wasn't worth the limited benefits.)  The
PBRT_SEARCHPATH environment variable is no longer used, and the SearchPath
directive has been removed from the input file syntax.

We have removed the "shinymetal" material, replacing it with a physically
based "metal" material.  (Described further in the new features section
below.)

--- New Features ---

-- General --

pbrt is now multithreaded; performance should scale well with increasing
numbers of CPU cores.  We are particularly interested to hear any
experience running the system with >4 cores as well as any insight gained
from digging into any scalability bottlenecks.  The system attempts to
automatically determine how many CPU cores are present in the system, but
the PBRT_NTHREADS environment variable can be used to override this.

OpenEXR is no longer required to build the system (but it is highly
recommended).  pbrt now includes code to read and write TGA format files;
support for that file format is thus always available.  If pbrt is compiled
with PBRT_HAS_OPENEXR #defined, then OpenEXR files can be used as well.
(With the file suffix determining which format is used.) 

An accelerator based on bounding volume hierarchies has been added
(accelerators/bvh*).  This accelerator is now the default; it spends
substantially less time than the kd-tree accelerator in hierarchy
construction, while providing nearly equal performance. 

pbrt now supports full spectral rendering as a compile-time option; to
enable it, change the "typedef RGBSpectrum Spectrum" in core/pbrt.h to
"typedef SampledSpectrum Spectrum".  The number of spectral samples taken
(30 by default, leading to 10nm spacing), can be changed in the
core/spectrum.h file.

Animation is now supported via animated transformations for cameras and
shapes in the scene.  (But not light sources, however.)  See the included
example files scenes/anim-killeroos-moving.pbrt and
scenes/anim-moving-reflection.pbrt.  It is likely that the method for
specifying animated transformations in input files will change in order to
be more similar to that used by lux render.

A rudimentary adaptive sampler is included, see samplers/adaptive.*.

-- Integrators --

The 'instant global illumination', 'extended photon map', and 'extended
infinite area light source' implementations from the author-supplied
plugins at http://pbrt.org/downloads.php are now standard; the previous
photon map and infinite area light source implementations described in the
first version of the book have been removed.

The irradiance cache implementation has been substantially improved,
following many of the ideas from the Tabellion and Lamorlette paper from
SIGGRAPH 2004.

A subsurface scattering integrator based on the Jensen and Buhler 2002
SIGGRAPH paper has been added (integrators/dipolesubsurface.*).  Two new
materials for translucent materials have been added, "kdsubsurface" and
"subsurface".  The former implements Jensen and Buhler's more intuitive
approach for setting subsurface scattering parameters.  The latter also
incorporates measured scattering parameters from a number of recent papers;
many translucent material types are available by name.  (See the source
code for details.)

An implementation of Metropolis light transport has been added (based on
the Kelemen et al 2002 Eurographics paper).  This is implemented as a new
"renderer", rather than for example a surface integrator.  See the included
example scene file scenes/metal.pbrt.

Support for a variety of forms of precomputed radiance transport has been
added.  A new renderer that computes radiance light probes in spherical
harmonics on a grid has been added (renderers/createprobes.*), and a
surface integrator that uses them is available in integrators/useprobes.*.
The diffuse precomputed radiance transfer (PRT) method of Sloan et al's 2002
SIGGRAPH paper is implemented in integrators/diffuseprt.* and a technique
for glossy PRT is in integrators/glossyprt.*.  Note that in general, one
would use pbrt to do the precomputation part of PRT and then use the
results in a real-time rendering system.  Here we have also implemented the
code that uses the results within pbrt for pedagogical purposes (and so
that we don't need to include a real-time renderer with the book!).

-- Materials --

A new 'metal' material has been added; it supports setting the spectral
index of refraction and extinction coefficients via measured data from real
metals.  See the example file scenes/metal.pbrt.  A large number of
spectral measurements are available in the scenes/spds/metals/ directory.

Support for measured BRDF data is now available via the "measured"
material.  Two BRDF representations and file formats are supported.  First
is the binary file format used by the MERL BRDF database.
(http://merl.com/brdf).  For arbitrary scattered BRDF measurements, a
general text file format is supported; see the comments in
scenes/brdfs/acryl_blue.brdf.

--- Example Scenes ---

A small number of example scenes that demonstrate some of the new features
are provided in the scenes/ directory.

anim-killeroos-moving.pbrt, anim-moving-reflection.pbrt: demonstrates
motion blur features.

bunny.pbrt: measured BRDFs

metal.pbrt: Metropolis light transport, measured BRDFs

prt-teapot.pbrt: precomputed radiance transfer

ss-envmap.pbrt: subsurface scattering

Joo-Haeng Lee

unread,
Oct 14, 2009, 12:48:34 AM10/14/09
to pb...@googlegroups.com
It's great!

I got no error while rendering all sample scenes in my iMac, after building pbrt-v2 with no pain.

I am going to try in two more machines: (1) Vista 64 with VS2005, and (2) OSX both on MacPro.

Thanks.

/Joo-Haeng

Rachit Agrawal

unread,
Oct 16, 2009, 8:11:26 AM10/16/09
to pbrt
It builds very smoothly.

There are some queries that I have:

1. There are some textures that are removed like shinymetal. How to I
render the scenes using these materials? Will the material "metal" do?
2. How can I specify the number of threads I want to spawn?
3. There seem to be problem with almost all my old scene files. Can
they be fixed? These are the following errors:

buddha.pbrt
---------------

geometry/happy.pbrt(1631379): Warning: Material "bluepaint" unknown.
geometry/happy.pbrt(1631379): Error: Unable to create material
"bluepaint"

dof-dragons.pbrt
---------------------

geometry/dragon.pbrt(1309069): Warning: Material "bluepaint" unknown.
geometry/dragon.pbrt(1309069): Error: Unable to create material
"bluepaint"

geometry/dragon.pbrt(1309069): Warning: Material "clay" unknown.
geometry/dragon.pbrt(1309069): Error: Unable to create material "clay"

dragon.pbrt
--------------

dragon.pbrt(81): Warning: Parameter "directphotons" not used
dragon.pbrt(81): Warning: Parameter "directwithphotons" not used

Shooting photons: [+++++++++++++++++++++++++++++++++ ]
(224.2s|61.3s) terminate called after throwing an instance of
'std::bad_alloc'
what(): std::bad_alloc
Aborted

tt-tire.pbrt
------------
geometry/tt.pbrt(885986): Warning: Parameter "Ks" not used
geometry/tt.pbrt(885986): Warning: Parameter "roughness" not used
geometry/tt.pbrt(885990): Error: Expected numeric parameter value for
parameter "roughness" with type "float". Ignoring.
geometry/tt.pbrt(885990): Error: Expected numeric parameter value for
parameter "bumpmap" with type "float". Ignoring.
geometry/tt.pbrt(958231): Warning: Material "shinymetal" unknown.
geometry/tt.pbrt(958231): Warning: Parameter "Ks" not used
geometry/tt.pbrt(958231): Warning: Parameter "roughness" not used
geometry/tt.pbrt(958231): Error: Unable to create material
"shinymetal"

tt.pbrt
-------
geometry/tt.pbrt(238175): Warning: Parameter "Ks" not used
geometry/tt.pbrt(261795): Error: Expected numeric parameter value for
parameter "uroughness" with type "float". Ignoring.
geometry/tt.pbrt(270096): Error: Expected numeric parameter value for
parameter "uroughness" with type "float". Ignoring.
geometry/tt.pbrt(276304): Error: Expected numeric parameter value for
parameter "uroughness" with type "float". Ignoring.
geometry/tt.pbrt(278858): Error: Expected numeric parameter value for
parameter "uroughness" with type "float". Ignoring.
geometry/tt.pbrt(281002): Error: Expected numeric parameter value for
parameter "bumpmap" with type "float". Ignoring.
geometry/tt.pbrt(282007): Error: Expected numeric parameter value for
parameter "bumpmap" with type "float". Ignoring

Can any help me how to rectify these errors? Thanks



On Oct 8, 8:22 am, Matt Pharr <matt.ph...@gmail.com> wrote:
> We're happy to announce that a first alpha release of the second  
> version of
> pbrt is now available for the brave and adventurous.  This version of  
> the
> source code corresponds to the system that will be described in the  
> second
> edition of the book "Physically Based Rendering: From Theory To
> Implementation", which is expected to be available at SIGGRAPH 2010.
>
> The source code is available from github:http://github.com/mmp/pbrt-v2.
> The easiest way to download the code and track changes is to use the git
> source code management system:
>
> % git clone git://github.com/mmp/pbrt-v2.git pbrt-v2
>
> But you can also click the "download" button on that page to download a
> tar or zip file of the latest version of the code.
>
> We are making the source code available before publication of the book  
> in
> the hopes that it will be useful to developers and users.  We in
> particular hope that we will receive some feedback on the changes to the
> system: comments on better implementation approaches, and performance or
> portability shortcomings would be highly welcomed!  If you do have any
> feedback, please either send it to the pbrt mailing list, or to
> auth...@pbrt.org.
>
> The remainder of README file (with much more information about what
> has changed, etc.) is below.
>
> Thanks,
> -matt
>
> We will release updated versions of the system frequently; the latest
> version of the code will always be available at the github pagehttp://github.com/mmp/pbrt-v2.  The best way to track changes to the  
> plugins athttp://pbrt.org/downloads.phpare now standard; the previous

John Danks

unread,
Oct 16, 2009, 1:33:55 PM10/16/09
to pb...@googlegroups.com
On Fri, Oct 16, 2009 at 5:11 AM, Rachit Agrawal <rachit.k...@gmail.com> wrote:

It builds very smoothly.

There are some queries that I have:

1. There are some textures that are removed like shinymetal. How to I
render the scenes using these materials? Will the material "metal" do?

Metal should work, but you'll have to look at the parameters for both the old material and the new one to get a good match.
 
2. How can I specify the number of threads I want to spawn?

PBRT v2 makes 1 thread for each processor core it detects. You can force it create a specific number of threads by defining the PBRT_NTHREADS environment variable.
 
3. There seem to be problem with almost all my old scene files. Can
they be fixed? These are the following errors:

I can't speak for all your scene errors, but...

dragon.pbrt
--------------

dragon.pbrt(81): Warning: Parameter "directphotons" not used
dragon.pbrt(81): Warning: Parameter "directwithphotons" not used

Shooting photons: [+++++++++++++++++++++++++++++++++         ]
(224.2s|61.3s)  terminate called after throwing an instance of
'std::bad_alloc'
 what():  std::bad_alloc
Aborted

Dragon is a _very_ large model. You are most likely running out of memory.

Matt Pharr

unread,
Oct 16, 2009, 4:29:31 PM10/16/09
to pb...@googlegroups.com
(Second reply to the original email coming in a few minutes as well.)

On Oct 16, 2009, at 10:33 AM, John Danks wrote:

1. There are some textures that are removed like shinymetal. How to I
render the scenes using these materials? Will the material "metal" do?

Metal should work, but you'll have to look at the parameters for both the old material and the new one to get a good match.

Shinymetal has turned into a bit of a hack, now in this day where there's good spectral measured data from real metals.
The scenes/spds/metals/ directory has measured spectral data for a ton of different metals--if you can remember your chemical symbols, it should be easy to figure out (Ag for silver, etc.)  The metal.pbrt file shows how to use the new one.


dragon.pbrt
--------------

dragon.pbrt(81): Warning: Parameter "directphotons" not used
dragon.pbrt(81): Warning: Parameter "directwithphotons" not used

Shooting photons: [+++++++++++++++++++++++++++++++++         ]
(224.2s|61.3s)  terminate called after throwing an instance of
'std::bad_alloc'
 what():  std::bad_alloc
Aborted

Dragon is a _very_ large model. You are most likely running out of memory.


I think it's running out of memory, but I think that's due to a bug--I'll investigate and see if my hypothesis is right (but probably not until over the weekend...)  The new photon map integrator doesn't support doing direct lighting with photons, so those parameters are gone.  But it does store direct lighting photons during photon shooting, since they're needed as part of the computation that's done for final gathering.  Anyway, the important part is that it just stores as many direct photons as it finds and never stops (under the assumption that once enough other kinds of photons are found, that's a fine place to stop for direct.

The problem is that if it has to shoot a lot of photons to find caustic paths, say, it may store a ton of direct photons along the way, way more than one would want, purely because it had to start many paths to find a smaller number of caustic paths.  So my guess is that it's running out of memory due to that..  (Which I'd say is definitely a bug!)

Thanks,
-matt

Matt Pharr

unread,
Oct 16, 2009, 5:03:27 PM10/16/09
to pb...@googlegroups.com
On Oct 16, 2009, at 5:11 AM, Rachit Agrawal wrote:

dof-dragons.pbrt
---------------------

geometry/dragon.pbrt(1309069): Warning: Material "bluepaint" unknown.
geometry/dragon.pbrt(1309069): Error: Unable to create material
"bluepaint"

geometry/dragon.pbrt(1309069): Warning: Material "clay" unknown.
geometry/dragon.pbrt(1309069): Error: Unable to create material "clay"

The Lafortune BRDF stuff is gone from the system now (with time, it's become apparent that it's not a very good representation for measured BRDF data, and those materials were based on it..)  scenes/brdfs has some measured BRDF data from Cornell; there's some good paint data there at least.



tt-tire.pbrt
------------
geometry/tt.pbrt(885986): Warning: Parameter "Ks" not used
geometry/tt.pbrt(885986): Warning: Parameter "roughness" not used
geometry/tt.pbrt(885990): Error: Expected numeric parameter value for
parameter "roughness" with type "float".  Ignoring.
geometry/tt.pbrt(885990): Error: Expected numeric parameter value for
parameter "bumpmap" with type "float".  Ignoring.

Change those "float"s to "texture" to fix those errors.  That was a bug in the tt.pbrt file we distributed; pbrt v1 had a work-around that accepted it and printed a warning.  For v2 we're just reporting an error.  (And same for the Errors below....)

Thanks,
-matt
Reply all
Reply to author
Forward
0 new messages