November, 2013

Nov 13

Mitsuba 0.4.5 released

Hello all,

I’m happy to release a new version of Mitsuba containing many bugfixes and a couple of new features. They are as follows:

  • Height field intersection shape:


    The heightfield primitive represents a quad that is vertically displaced by an arbitrary texture. All storage and ray intersection computations are done in image space (i.e. without creating explicit dense triangle geometry), which leads to significantly better performance. This new plugin was contributed by Miloš Hašan and adapted by Wenzel Jakob. Internally, it relies on the Min-Max MIP Map acceleration data structure.

  • Perspective camera model with radial distortion:

    When rendering images that are supposed to look just like an image taken by a real-world camera, it is important to take lens distortions into account. Mitsuba now has a new perspective_rdist plugin that accepts fitted radial distortion parameters from standard camera calibration packages like the MATLAB Camera Calibration toolbox by Jean-Yves Bouguet.

  • Fast image convolution & bloom filter:

    Mitsuba now supports fast convolutions of large 2D images in frequency space using a convolution theorem approach (Fourier Transform implemented via the FFTW library). This is a pretty standard technique, though it sometimes seems like magic.

    This fast convolution method used to implement Spencer et al’s physically-based bloom filter in the mtsutil tonemap utility. This can be useful when rendering images where pixels are clipped because they are so bright. Take for instance the rendering below: there are many reflections of the sun, but they are quite hard to perceive due to the limited dynamic range. After convolving the image with an empirical point spread function of the human eye, their brightness is much more apparent.


  • Initial Retina display support, support for OSX 10.8:

    The latest iteration of OSX and Apple’s new devices with HiDPI monitors brought countless changes that caused problems with the last version of Mitsuba. This release addresses many of them, though full HiDPI support will still have to wait until Digia fixes several critical OSX-related bugs in Qt5.

  • Texture channel filter:

    The bitmap texture has a new feature to create a grayscale texture from a specified bitmap channel (e.g. alpha). This is useful in conjunction with the mask plugin.

  • Python bindings:

    Considerably expanded Python binding coverage and better support for recent Python releases. The Windows package now comes with bindings for versions 2.7, 3.2, and 3.3; all Linux packages come with bindings for the Python 2.x and 3.x releases of the respective distributions.

    This release also adds convenience functions for quickly converting between Mitsuba bitmaps and Python bytearray data structures. This can be useful when shuffling data between Python binding libraries, such as Mitsuba and PyQt/PySide.

  • Multithreading:

    By default, Mitsuba collects lots of statistics while rendering a scene. A key requirement for this process is that it should not impact rendering time in any significant way, and the implementation tries to ensure that this is indeed the case. For instance, to prevent resource contention involving performance counters, Mitsuba replicates them many times so that each thread has access to a unique uncontended memory region.

    As it turns out, this replication was not quite working as expected, causing slowdowns on machines with many cores (e.g. >4). This problem has been fixed.

    Another threading-related change that has brought small but measurable performance improvements is that worker threads now request CPU affinity on platforms where this is supported (Windows and Linux).

  • Visual Studio 2013 support:

    As of about a month ago, the new version of Visual Studio is available. Those who develop on Windows will be pleased to hear that it’s now possible to work on Mitsuba using this compiler—also, all pesky compilation of dependencies has been done for you. The older visual Studio 2010 will continue to be supported in the future.

    To get the most recent version of SCons to work with Visual Studio 2013, a small modification to the SCons code is necessary: change lines 132+ in the file scons-2.3.0\SCons\Tool\MSCommon\ so that they read

    _VCVER = ["12.0", "11.0", "11.0Exp", "10.0", ...
        '12.0': [
        '11.0': [

    and so on.

  • New dependency binaries:

    For consistency, all dependency binaries have been brought up to date on Windows and Mac OS X.

  • KD-tree improvements when rendering in double precision:

    Due to roundoff errors when converting between single and double precision, faces that were aligned with the top-level bounding box of a kd-tree could get clipped. This caused problems when rendering in double precision, particularly when using the instance plugin.

  • Many smaller robustness fixes and bugfixes in various parts of the renderer—see the repository for details.

I’ll close with a link to an interesting paper which tackles an extremely difficult measurement problem, to be presented at SIGGRAPH Asia next week. The paper’s teaser image was rendered using the volumetric path tracer in Mitsuba.

  • Inverse Volume Rendering with Material Dictionaries (by Ioannis Gkioulekas, Shuang Zhao, Kavita Bala, Todd Zickler, and Anat Levin)


    Abstract: Translucent materials are ubiquitous, and simulating their appearance requires accurate physical parameters. However, physically-accurate parameters for scattering materials are difficult to acquire. We introduce an optimization framework for measuring bulk scattering properties of homogeneous materials (phase function, scattering coefficient, and absorption coefficient) that is more accurate, and more applicable to a broad range of materials. The optimization combines stochastic gradient descent with Monte Carlo rendering and a material dictionary to invert the radiative transfer equation. It offers several advantages: (1) it does not require isolating single-scattering events; (2) it allows measuring solids and liquids that are hard to dilute; (3) it returns parameters in physically-meaningful units; and (4) it does not restrict the shape of the phase function using Henyey-Greenstein or any other low-parameter model. We evaluate our approach by creating an acquisition setup that collects images of a material slab under narrow-beam RGB illumination. We validate results by measuring prescribed nano-dispersions and showing that recovered parameters match those predicted by Lorenz-Mie theory. We also provide a table of RGB scattering parameters for some common liquids and solids, which are validated by simulating color images in novel geometric configurations that match the corresponding photographs with less than 5% error.