Home

Awesome

BCD - Bayesian Collaborative Denoiser for Monte-Carlo Rendering

Overview

BCD allows to denoise images rendered with Monte Carlo path tracing and provided in the form of their samples statistics (average, distribution and covariance of per-pixel color samples). BCD can run in CPU (e.g., renderfarm) or GPU (e.g., desktop) mode. It can be integrated as a library to any Monte Carlo renderer, using the provided sample accumulator to interface the Monte Carlo simulation with the BCD internals, and comes with a graphics user interface for designing interactively the denoising parameters, which can be saved in JSON format and later reused in batch.

BCD has been designed for easy integration and low invasiveness in the host renderer, in a high spp context (production rendering). There are at least three ways to integrate BCD in a rendering pipeline, by either:

Version 1.0 of BCD is the reference implementation for the paper Bayesian Collaborative Denoising for Monte-Carlo Rendering by Malik Boughida and Tamy Boubekeur.

Copyright(C) 2014-2018 Malik Boughida and Tamy Boubekeur

All rights reserved.

Release Notes

v1.1

v1.0

Initial version.

Building

This program uses CMake. It has been tested on Linux and Windows 10. Building on MacOS has not been tested but should not cause major problem, at least for the CPU version.

This program has several dependencies that are automatically downloaded through GIT submodules:

Required:

Optional (need to be installed on the host system):

To build on Linux, go to the directory containing this README file, then:

$ mkdir build
$ cd build
$ cmake ..
$ make

You can also use the graphical user interface for cmake (cmake-gui). Use the following cmake option to compile without CUDA support (multi-core CPU execution only then):

-DBCD_USE_CUDA=OFF

Running

Usage:

$ cd bin/
$ ./bcd_cli <arguments list>

Required arguments list:

Optional arguments list:

Example:

$ ./bcd_cli -o filtered-rendering.exr -i noisy-rendering.exr -h noisy-rendering_hist.exr -c noisy-rendering_cov.exr

Precompiled MS Windows binaries are provided in the bin/win64 directory.

Only EXR images are supported. A collection of input data files is provided on the project webpage.

Conversion from raw full sampling images to proper inputs

The raw2bcd command line tool allows to convert raw binary many-samples per pixel (i.e. all the samples that get average to the final pixel color, before averaging them) files to the 3 EXR files required by BCD (per-pixel color, distribution/histogram, covariance matrix).

Usage:

$ raw2bcd <raw-input-file> <output-prefix>

Converts a raw file with all samples into the inputs for the Bayesian Collaborative Denoiser (bcd_cli) program.

Required arguments list:

RAW sample images follow the following header structure:

<pre><code>typedef struct { int version; int xres; int yres; int num_samples; int num_channels; float data[1]; } Header; </code></pre>

Depending on num_channels value you might get RGB (3) or RGBA (4) values.

The input file "test.raw" is provided as an example in the data/raw directory.

Example:

$ raw2bcd raw/test.raw inputs/test
$ bcd_cli --use-cuda 1 --ncores 4 -o outputs/test_BCDfiltered.exr -i inputs/test.exr -h inputs/test_hist.exr -c inputs/test_cov.exr

Authors

See also the list of contributors who participated in this project.

Citation

Please cite the following paper in case you are using this code:

Bayesian Collaborative Denoising for Monte-Carlo Rendering. Malik Boughida and Tamy Boubekeur. Computer Graphics Forum (Proc. EGSR 2017), vol. 36, no. 4, p. 137-153, 2017.

License

This project is licensed under a BSD-like license - see the LICENSE.txt file for details.