All Projects → superboubek → Bcd

superboubek / Bcd

Licence: other
Bayesian Collaborative Denoiser for Monte Carlo Rendering

Projects that are alternatives of or similar to Bcd

Usd Resources
A curated list of USD projects and resources
Stars: ✭ 250 (+49.7%)
Mutual labels:  rendering, vfx
cadise
A developing physically-based hobby renderer written in C++.
Stars: ✭ 30 (-82.04%)
Mutual labels:  rendering, physically-based-rendering
Photon-v2
A program that takes photographs of a virtual world.
Stars: ✭ 75 (-55.09%)
Mutual labels:  rendering, physically-based-rendering
Flux
A real-time physically based rendering engine written in C++ and OpenGL
Stars: ✭ 171 (+2.4%)
Mutual labels:  rendering, physically-based-rendering
Opencue
A render management system you can deploy for visual effects and animation productions.
Stars: ✭ 578 (+246.11%)
Mutual labels:  rendering, vfx
Cgru
CGRU - AFANASY
Stars: ✭ 197 (+17.96%)
Mutual labels:  rendering, vfx
Unity3DShaders
Simple shaders for Unity3D that I created for games, for a challenge or following tutorials.
Stars: ✭ 17 (-89.82%)
Mutual labels:  rendering, vfx
Vxr
General purpose engine written in C++ with emphasis on materials rendering (PBR, clear coat, anisotropy, iridescence)
Stars: ✭ 181 (+8.38%)
Mutual labels:  rendering, physically-based-rendering
Rpt
A physically-based path tracer
Stars: ✭ 296 (+77.25%)
Mutual labels:  rendering, physically-based-rendering
ElkEngine
Simple graphics engine used as submodule in many of my projects
Stars: ✭ 54 (-67.66%)
Mutual labels:  rendering, physically-based-rendering
f3d
Fast and minimalist 3D viewer.
Stars: ✭ 791 (+373.65%)
Mutual labels:  rendering, physically-based-rendering
Yocto Gl
Yocto/GL: Tiny C++ Libraries for Data-Driven Physically-based Graphics
Stars: ✭ 1,391 (+732.93%)
Mutual labels:  rendering, physically-based-rendering
pbrtbook
pbrt 中文整合翻译 基于物理的渲染:从理论到实现 Physically Based Rendering: From Theory To Implementation
Stars: ✭ 221 (+32.34%)
Mutual labels:  rendering, physically-based-rendering
Rs pbrt
Rust crate to implement a counterpart to the PBRT book's (3rd edition) C++ code. See also https://www.rs-pbrt.org/about ...
Stars: ✭ 619 (+270.66%)
Mutual labels:  rendering, physically-based-rendering
Appleseed
A modern open source rendering engine for animation and visual effects
Stars: ✭ 1,824 (+992.22%)
Mutual labels:  rendering, vfx
Immersiveportalsmod
Non-Euclidean in Minecraft
Stars: ✭ 138 (-17.37%)
Mutual labels:  rendering
Practical Path Guiding
Implementation of the research paper "Practical Path Guiding for Efficient Light-Transport Simulation" + improvements
Stars: ✭ 157 (-5.99%)
Mutual labels:  rendering
Delir
Web Technology driven VFX Application
Stars: ✭ 142 (-14.97%)
Mutual labels:  vfx
Svglib
Read SVG files and convert them to other formats.
Stars: ✭ 139 (-16.77%)
Mutual labels:  rendering
Dkvfx
An example that shows how to use recorded Depthkit footage with Unity VFX Graph
Stars: ✭ 162 (-2.99%)
Mutual labels:  vfx

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:

  • dumping all samples in a raw file, using the raw2bcd tool to generate the rendering statistics from this file and then running the BCD using the CLI tool;
  • exporting the mandatory statistics from the rendering loop in EXR format and running the BCD CLI tool to obtain a denoised image;
  • directly integrating the BCD library into the renderer, using the sample accumulator to post samples to BCD during the path tracing and denoising the accumulated values after rendering using the library.

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

  • New architecture:
    • BCD is now a library, for easy integration in host renders,
    • a new sample accumulator object helps easily dumping samples during rendering for later extracting BCD inputs and denoising the final image,
    • dependency are now managed through git submodules,
    • the command line tool is still here.
  • Denoising presets can now be saved/loaded in a JSON file.
  • New GUI to load raw images (color and stats), configure the BCD denoiser, run and configure it interactively, load and save presets which can be reused by the core library (batch denoising, engine-integrated denoising).
  • Various bug fixes.
  • Now properly compiles and runs on Linux and Windows 10, in CPU and GPU mode.
  • Improved build system (CMake).

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:

  • OpenEXR
  • Eigen
  • JSON
  • zlib

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

  • OpenMP
  • CUDA

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:

  • -o <output> The file path to the output image
  • -i <input> The file path to the input image
  • -h <hist> The file path to the input histograms buffer
  • -c <cov> The file path to the input covariance matrices buffer

Optional arguments list:

  • -d <float> Histogram patch distance threshold (default: 1)
  • -b <int> Radius of search windows (default: 6)
  • -w <int> Radius of patches (default: 1)
  • -r <0/1> 1 for random pixel order (in case of grid artifacts) (default: 0)
  • -p <0/1> 1 for a spike removal prefiltering (default: 0)
  • --p-factor <float> Factor that is multiplied by standard deviation to get the threshold for classifying spikes during prefiltering. Put lower value to remove more spikes (default: 2)
  • -m <float in [0,1]> Probability of skipping marked centers of denoised patches. 1 accelerates a lot the computations. 0 helps removing potential grid artifacts (default: 1)
  • -s <int> Number of Scales for Multi-Scaling (default: 3)
  • --ncores <nbOfCores> Number of cores used by OpenMP (default: environment variable OMP_NUM_THREADS)
  • --use-cuda <0/1> 1 to use cuda, 0 not to use it (default: 1)
  • -e <float> Minimum eigen value for matrix inversion (default: 1e-08)

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-input-file, the file path to the input binary raw sample set file,
  • output-prefix, the file path to the output image, without .exr extension.

RAW sample images follow the following header structure:

typedef struct {
   int version;
   int xres;
   int yres;
   int num_samples;
   int num_channels;
   float data[1];
} Header;

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].