Coder Social home page Coder Social logo

peterzs / var-aware-mis-pbrt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pgrit/var-aware-mis-pbrt

0.0 0.0 0.0 5.68 MB

Implementation of the paper "Variance-Aware Multiple Importance Sampling" for bidirectional path tracing in PBRT.

License: BSD 2-Clause "Simplified" License

CMake 0.45% Dockerfile 0.01% Shell 0.03% Python 1.22% C 0.68% C++ 89.14% Objective-C 8.49%

var-aware-mis-pbrt's Introduction

Variance-aware MIS weights in PBRTv3

This repository implements the approach discussed in the "Variance-Aware Multiple Importance Sampling" paper.

The core of the implementation is in src/util/samis.h and src/util/samis.cpp: The class SAMISRectifier implements the rectification as a black box: given the outcome of paths sampled from the first iteration, it computes the required variance estimates and the resulting factors.

For reference value computations, the files src/util/varestim.h and src/util/varestim.cpp provide a utility class to compute accurate estimates of the variance factors given a large number of samples.

The implementation required minor changes in the bidirectional path tracer integrator (src/integrators/bdpt.cpp and bdpt.h) to separate the rendering into multiple iterations and to look-up and multiply with the propper variance factors during the MIS computation. Furthermore, the weighted combination of the first iteration with the following one also required a small addition to the Film class in src/core/film.cpp and src/core/film.h. The defensive sampling application is implemented in a new integrator, see src/integrators/guideddi.cpp and src/integrators/guideddi.h. The implementation is analogous to the one from the "Optimal Multiple Importance Sampling" paper by Kondapaneni et al.

For build instructions, documentation, test scenes, etc., refer to the original PBRTv3 repository or the repository created by Benedikt Bitterli. All results in the paper were generated from (sometimes slightly modified versions of) the scenes from those repositories.

Testing

The folder test contains a number of Python scripts to render comparison images with various approaches.

The test/runtests_bdpt.py script loads a number of PBRT scene files (specified in the script) and replaces the integrator and sampler definitions by the appropriate methods, as given in the beginning of the script.

The test/runtests_di.py script does the same for the defensive sampling application. For the comparison to the optimal MIS weights, the path to the source code from that paper needs to be hard-coded in the script (by modifying the optimal_mis_executable variable in the beginning.)

var-aware-mis-pbrt's People

Contributors

aaronmk avatar abusch avatar ambakshi avatar amtinits avatar dakerfp avatar henrikdahlberg avatar immocat avatar kiwaiii avatar koiava avatar kojinakamaru avatar matt77hias avatar mjhsnps avatar mmp avatar mx7f avatar nextdesign1 avatar nyue avatar pgrit avatar phg1024 avatar rcythr avatar samsymons avatar scylardor avatar srombauts avatar syoyo avatar tdapper avatar tristanpenman avatar tunabrain avatar twinklebear avatar wjakob avatar z-boson avatar zq317157782 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.