Giter Site home page Giter Site logo

cgcw3's Introduction

pbrt, Version 3

Build Status Build status

This repository holds the source code to the new version of pbrt that will be described in the forthcoming third edition of Physically Based Rendering: From Theory to Implementation, by Matt Pharr, Wenzel Jakob, and Greg Humphreys. As before, the code is available under the BSD license.

Although the new version of the book won't be released until this Fall, we're making the source code available now so that interested users can look at the code, try out the system, and possibly help us out. (See how you can help for more information about contributing.) The initial release of the source code doesn't include updated documentation (and the book isn't out yet!), so you should only try it out if you're comfortable digging into source code.

Resources

Two branches of the source code are available:

  • book: this branch corresponds as closely as possible to the code in the printed version of the book--bug fixes are the only reason for divergence between the two.
  • master: this branch includes all of the bug fixes in the "book" branch as well as some new features that cause the small divergences from the code printed in the book.

Over 4GB of example scenes are available for download. (Many are new and weren't available with previous versions of pbrt.) We're trying an experiment and making them available via git. Run:

$ git clone git://git.pbrt.org/pbrt-v3-scenes

to get them. We will update this repository as more scenes become available. (See the README.md.html file in the scene distribution for more information about the scenes and preview images.)

The pbrt website has general information about both Physically Based Rendering as well as pbrt-v2, the previous version of the system.

Significant Changes

The system has seen many changes since the second edition. To figure out how to use the new features, you may want to look at the example scene files and read through the source code to figure out the parameters and details of the following. (Better documentation will come once everything is finalized.)

  • Bidirectional path tracing: Integrator "bdpt" does proper bidirectional path tracing with multiple importance sampling.
  • Metropolis sampling: Integrator "mlt" uses the bidirectional path tracer with Hachisuka et al.'s "Multiplexed Metropolis Light Transport" technique.
  • Improved numerical robustness for intersection calculations: epsilons are small and provably conservative. Section draft
  • Subsurface scattering: all new implementation, integrated into the path tracing integrator. See the scenes/head example scene.
  • Curve shape: thin ribbons described by bicubic Bezier curves. Great for hair, fur, and grass.
  • PLY mesh support: meshes in PLY format can be used directly: Shape "plymesh" "string filename" "mesh.ply"
    • Existing scenes with triangle meshes specified via Shape "trianglemesh" can be converted to PLY using the --toply command-line option, which emits a PLY mesh for each triangle mesh and prints an updated scene description file to standard out.
  • Realistic camera model: tracing rays through lenses to make images! See the scenes/dragons example scene.
  • Participating media: the boundaries of shapes are now used to delineate the extent of regions of participating media in the scene. See the scenes/medium-sphere example scene.
  • New samplers: a much-improved Halton sampler, and an all-new Sobol' sampler are both quite effective for path tracing and bidirectional path tracing.
  • Fourier representation of measured materials: an implementation of Jakob et al's A Comprehensive Framework for Rendering Layered Materials. (See an example in the scenes/dragons example scene).
    • New versions of the BSDF files it uses can be generated with layerlab.
  • Improved microfacet models: specular transmission through microfacets, and Heitz's improved importance sampling.
  • No external dependencies: thanks to Lode Vandevenne's lodepng, Diego Nehab's rply, and Emil Mikulic's TARGA library, no external libraries need to be compiled to build pbrt. The only slightly bigger dependency is OpenEXR, and its build system is fully integrated with that of PBRT.

Many other small things have been improved (parallelization scheme, image updates, statistics system, overall cleanliness of interfaces); see the source code for details.

Building The System

First, to check out pbrt together with all dependencies, be sure to use the --recursive flag when cloning the repository, i.e.

$ git clone --recursive https://github.com/mmp/pbrt-v3/

If you accidentally already cloned pbrt without this flag (or to update an pbrt source tree from before change b9aa97b1f21f36b0, run the following command to also fetch the dependencies:

$ git submodule update --init --recursive

pbrt uses cmake for its build system. On Linux and OS X, cmake is available via most package management systems. For Windows, or to build it from source, see the cmake downloads page.

  • For command-line builds on Linux and OS X, once you have cmake installed, create a new directory for the build, change to that directory, and run cmake <path to pbrt-v3>. A Makefile will be created in that current directory. Run make -j4, and pbrt and some additional tools will be built.
  • To make an XCode project file on OS X, run cmake -G Xcode <path to pbrt-v3>.
  • Finally, on Windows, the cmake GUI will create MSVC solution files that you can load in MSVC.

File Format Changes

We've tried to keep the scene description file format as unchanged as possible. However, progress in other parts of the system required changes to the scene description format.

First, the "Renderer", "SurfaceIntegrator", and "VolumeIntegrator" directives have all been unified under "Integrator"; only a single integrator now needs to be specified.

The following specific implementations were removed:

  • Accelerator "grid"
    • Use "bvh" or "kdtree" instead.
  • Material "measured", "shinymetal"
    • The new "fourier" material should now be used for measured BRDFs.
    • Use "uber" in place of "shinymetal".
  • VolumeRegion: all
  • SurfaceIntegrator: photonmap, irradiancecache, igi, dipolesubsurface, ambientocclusion, useprobes, diffuseprt, glossyprt
    • Use "sppm" for the "photonmap".
    • The "path" integrator now handles subsurface scattering directly.
    • The others aren't as good as path tracing anyway. :-)
  • VolumeIntegrator: single, emission
    • Use the "volpath" path tracing integrator.
  • Sampler: bestcandidate
    • Use any other sampler.
  • Renderer: all
    • Use "Integrator", as described above.

cgcw3's People

Contributors

aaronmk avatar ambakshi avatar dakerfp avatar koiava avatar kojinakamaru avatar mjhsnps avatar mmp avatar mwkm avatar mx7f avatar nextdesign1 avatar nyue avatar rcythr avatar samsymons avatar sriravic avatar syoyo avatar tdapper avatar tristanpenman avatar tunabrain avatar twinklebear avatar wjakob avatar z-boson avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.