# Position-Free Monte Carlo Simulation for Arbitrary Layered BSDFs [Yu Guo](https://tflsguoyu.github.io/), [Miloš Hašan](http://miloshasan.net/), [Shuang Zhao](https://shuangz.com/). In ACM Transactions on Graphics (SIGGRAPH Asia 2018). [[Paper](https://github.com/tflsguoyu/layeredbsdf_paper/blob/master/layeredbsdf.pdf)] [[Code](https://github.com/tflsguoyu/layeredbsdf)] [[Supplemental Materials](https://tflsguoyu.github.io/layeredbsdf_suppl/)] [[Poster](https://github.com/tflsguoyu/layeredbsdf_poster/blob/master/layeredbsdf_poster.pdf)] [Fastforward on Siggraph Asia 2018 ([Video](https://youtu.be/v5u6LYCN_PU))([Slides](https://www.dropbox.com/s/zirw16peipdtq70/layeredbsdf_ff.pptx?dl=0))] \ [Presentation on Siggraph Asia 2018 ([Slides](https://www.dropbox.com/s/i8h4h9jph1np3dt/layeredbsdf_main.pptx?dl=0))] [[Two Minute Papers](https://youtu.be/Bv3yat484aQ)] ## Overview This is a branch of the Mitsuba (0.6.0) renderer (official repo: https://github.com/mitsuba-renderer/mitsuba) ## Install ### Linux (Preferred, Tested on Ubuntu 16.04, 18.04) - `$ sudo apt update` - `$ sudo apt upgrade` - `$ sudo apt install git scons libboost-all-dev libpng-dev libjpeg-dev libopenexr-dev libxerces-c-dev libeigen3-dev libfftw3-dev libglewmx-dev freeglut3-dev` - `$ git clone https://github.com/tflsguoyu/layeredbsdf.git` - `$ cd layeredbsdf/` - `$ mv config_linux.py config.py` - `$ scons -j x` (x = # of cpu cores) - `$ source setpath.sh` Now you can render scenes - `$ mitsuba xxx.xml` ### Windows (Tested on Windows 10 x64) - install visual studio 2017 - clone this git to local folder - go to folder ..\layeredbsdf\ - rename config_windows.py to config.py - download [dependencies](https://github.com/tflsguoyu/layeredbsdf_suppl/blob/master/github/dependencies.zip) - ## Examples in paper (click image to download scene files)
## Scene file (.xml) explanation - `` (Here using 0.6.0, but not 0.5.0) - `` (`path_layered` preferred, but can still use `path`, `volpath` or `volpath_simple` instead) - ` ... ` (BSDF type is `multilayered`, both our `uni-dir` and `bi-dir` methods are implemented here) - ## Notes - Default precision in `config.py` is `single`. If you find too many warnings or even it is crashed when rendering scenes, you should try `double` precision instead. (Already provided in `config.py`) - `conductor` and `dielectric` are not supported now, use `roughconductor (a=0.001)` and `roughdielectric (a=0.001)` instead. - Welcome to report bugs and leave comments (Yu Guo: tflsguoyu@gmail.com)