For some of my research, I needed the ability to use materials defined in the format specified in the MERL database of measured materials.
This format is a tabular BRDF format, captured from photographs. Examples of the format can be found by downloading the database at http://people.csail.mit.edu/wojciech/BRDFDatabase/
However, the code and materials there are non-free, and are only available for research use. Nonetheless, the format used to be supported by PBRT, and is used by many researchers in Computer Graphics for their materials in internal tools.
This patch (merl.h and merl.cpp) is a new material class that allows a user to specify a MERL .binary material file as a parameter to LuxRender.
This file is a from-scratch implementation of the binary file format, and does not use any code from the MERL database.
This first version is not as fast as it could be, because it simply globally samples the entire material, when MERL materials are guaranteed to be isotropic. Furthermore, importance sampling could be used.
However, the results are convincing.
To use the material, specify the material type as
"merl" or "measured" in the lxs file, and provide the path to the .binary file as a string "file" parameter.
These files need to be added to the source tree under materials/ and added to the appropriate CMakeLists.txt
For authorship+copyright purposes, my name is Steven Braeger, I claim authorship of this code and assert that to the best of my knowledge it is an original work. I hereby release it under the GNU GPL V3.