This is an extension of PBRT version 3 that implements our SIGGRAPH NA 2023 paper, A Practical Walk-on-Boundary Method for Boundary Value Problems by Sugimoto, Chen, Jiang, Batty, and Hachisuka. Specifically, this is the codebase used to generate the figure featured in section 5.3, WoB within MC rendering. This codebase only implements a solver for the interior Dirichlet problem.
All of the relevant extension code is contained within the src/wob
subfolder. In particular:
wob.cpp
andwob.h
: Main implementation of the extension through theWobIntegrator
class (specificallyWoBIntegrator::Li
)scenes
: Example scenes used in rendering. The figure in the paper used the bunny scene.thirdparty
: Dependency libraries
Additional modifications were made to src/core/api.cpp
to integrate the new WoBIntegrator
class,
src/core/film.h
to expose private methods,
src/core/geometry.h
to fix zero vector normalization,
and src/core/integrator.h
to disable negative luminance checks.
As with base PBRT, C++ dependencies are included as git submodules.
git clone --recurse-submodules https://github.com/tyxchen/WoBonPBRTv3.git
There is only one external C++ dependency:
- tinycolormap: a header-only library for colormaps
Running the turnkey render script (as described below) requires the following:
- Python 3.9+
- matplotlib
- numpy
- pandas
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make pbrt_exe
Due to how PBRT is architected, the solution must be rendered separately from the scene; the separate renders must then be composited to produce the final image. To render and composite the bunny example:
python3 render.py src/wob/scenes/bunny.pbrt --pbrt build/pbrt --render-scene
This will produce the following files:
bunny.png
: the interior solution as rendered by PBRTbunny.png.mask
: a mask file for compositingbunny.png.txt
: the raw numerical solution as rendered by PBRTbunny-scene.png
: the rendered background scenebunny-plt.png
: the final composited image
Subsequent runs can skip rendering the background scene by removing the --render-scene
flag.
PBRT version 3 is released by Matt Pharr, Wenzel Jacob, and Greg Humphreys under the BSD license.
The watertight Stanford Bunny model included in this repository is courtesy of Christopher Batty.