The layer laboratory: a calculus for additive and subtractive composition of anisotropic surface reflectance

SIGGRAPH 2018


Reviews

Information

  • Paper topic: Rendering
  • Software type: Code
  • Able to run a replicability test: False
  • Replicability score: 5
  • Software language: C/C++, Python
  • License: unspecified
  • Build mechanism: CMakeLists, Not applicable (python, Matlab..)
  • Dependencies: umfpack / sparseqr/ libvips / jupyter
  • Documentation score {0,1,2}: 1
  • Reviewer: Julie Digne <julie.digne@liris.cnrs.fr>
  • Time spent for the test (build->first run, timeout at 100min): 100min

Source code information

Comments

Linux : compiled successfully after several major changes:

** File mitsuba-layers/src/liblayer/microfacet.cpp: because of a delete use of = for a std::bind, I changed lines 602 forward to: 
    auto const &integ1 = std::bind(µfacet_fresnel, mu_o, mu_i, 0.0, std::placeholders::_1, alpha_u, alpha_v, eta_);
    auto const &integ2 = std::bind(µfacet_fresnel_no_additional_factors, mu_o, mu_i, 0.0, std::placeholders::_1, alpha_u, alpha_v, eta_);
    auto integrand = &integ1;
    if (fresnel_only) { integrand = &integ2;  }

** File mitsuba-layers/include/mitsuba/layer/sparse.h add #include<memory>
** File mitsuba-layers/ext/enoki/include/enoki/alloc.h add #include<cstring>
** File mitsuba-layers/CMakeLists.txt : add  -fpermissive to CMAKE_CXX_FLAGS

** Files mitsuba-layers/ext/openexr/CMakeLists.txt an nori/ext/openexr/CMakeLists.txt
add_custom_target(CopyIlmBaseLibs
  COMMAND ${CMAKE_COMMAND} -E copy_directory
  ${CMAKE_CURRENT_BINARY_DIR}/IlmBase/Half/
  ${CMAKE_CURRENT_BINARY_DIR}/OpenEXR/IlmImf/
  COMMAND ${CMAKE_COMMAND} -E copy_directory
  ${CMAKE_CURRENT_BINARY_DIR}/IlmBase/IlmThread/
  ${CMAKE_CURRENT_BINARY_DIR}/OpenEXR/IlmImf/
  COMMAND ${CMAKE_COMMAND} -E copy_directory
  ${CMAKE_CURRENT_BINARY_DIR}/IlmBase/Iex/
  ${CMAKE_CURRENT_BINARY_DIR}/OpenEXR/IlmImf/
  COMMAND ${CMAKE_COMMAND} -E copy_directory
  ${CMAKE_CURRENT_BINARY_DIR}/IlmBase/Imath/
  ${CMAKE_CURRENT_BINARY_DIR}/OpenEXR/IlmImf/
)
instead of 
add_custom_target(CopyIlmBaseLibs
COMMAND ${CMAKE_COMMAND} -E copy_directory
  ${CMAKE_CURRENT_BINARY_DIR}/IlmBase/Half/$<CONFIGURATION>
  ${CMAKE_CURRENT_BINARY_DIR}/OpenEXR/IlmImf/$<CONFIGURATION>
  COMMAND ${CMAKE_COMMAND} -E copy_directory
  ${CMAKE_CURRENT_BINARY_DIR}/IlmBase/IlmThread/$<CONFIGURATION>
  ${CMAKE_CURRENT_BINARY_DIR}/OpenEXR/IlmImf/$<CONFIGURATION>
  COMMAND ${CMAKE_COMMAND} -E copy_directory
  ${CMAKE_CURRENT_BINARY_DIR}/IlmBase/Iex/$<CONFIGURATION>
  ${CMAKE_CURRENT_BINARY_DIR}/OpenEXR/IlmImf/$<CONFIGURATION>
  COMMAND ${CMAKE_COMMAND} -E copy_directory
  ${CMAKE_CURRENT_BINARY_DIR}/IlmBase/Imath/$<CONFIGURATION>
  ${CMAKE_CURRENT_BINARY_DIR}/OpenEXR/IlmImf/$<CONFIGURATION>
)

** file nori-layers/ext/tbb/include/tbb/pipeline.h
Replace line 328:
template<typename T> struct tbb_trivially_copyable { enum { value = std::has_trivial_copy_constructor<T>::value }; };
by:
 template<typename T> struct tbb_trivially_copyable { enum { value = std::is_trivially_copy_constructible<T>::value }; };



However none of the jupyter notebooks worked due to a problem with the version of prompt_toolkit. jupyter notebooks to replicate the results are provided. I could turn some of them into python scripts, but there were a lot of compatibility issues with matplotlib. Also don't forget to source setpath.sh to be able to import the compiled mitsuba in python.

MacOS Attempt: The paper provides the code and data to reproduce the paper results (C++ code and jupyter notebooks to reproduce the figures). Unfortunately, the mitsuba-layers and nori renderer fail to compile on linux and macOS. E.g.:
  - mitsuba-layers (on macOS): issue with tbb
     [  1%] Built target mitsuba-layer-obj
     [  1%] Built target tbb_def_files
     [  1%] Linking CXX shared library libtbb.dylib
     clang: error: no such file or directory: 'and'
     clang: error: no such file or directory: 'data/mitsuba-layers/b1/ext_build/tbb/tbb.def'
  - nori : Thread issue at cmake level.

If you want to contribute with another review, please follow these instructions.

Please consider to cut/paste/edit the raw JSON data attached to this paper.