July, 2011

Jul 11

Upcoming changes

For the last week, I have been hacking on a new release of Mitsuba (0.3.0), which will be publicly released in another week or two. Its main new feature is a complete redesign of the material system, specifically the surface scattering models (a.k.a. BSDFs). I’ve become increasingly unhappy with the state of this very important part of the renderer and finally decided to redesign it from scratch.

I have just merged most of these developments into the main branch. Since other researches using Mitsuba might be concerned about the many changes, this post is meant to quickly summarize what is going on.

  • Spectral rendering: most of the code pertaining to spectral rendering has seen a significant overhaul. It is now faster and in certain cases more accurate.
  • Flexible material classes: the changes introduce a robust and very general suite of eight physically-based smooth and rough (microfacet-based) material classes. The smooth plugins are called diffuse, dielectric, conductor, and plastic. The equivalent rough microfacet models are called roughdiffuse, roughdielectric, roughconductor, and roughplastic. Please see the documentation link below for an overview of what these do.
  • Material modifiers: I have added a two new “modifier” BSDFs, which change the behavior of a nested scattering model
    • bump: applies a bump map specified as a grayscale displacement texture.
    • coating: coats an arbitrary material with a smooth and optionally absorbing dielectric layer in the style of [Weidlich and Wilkie 07].
  • Material verification: the sampling methods of all material models in Mitsuba are now automatically verified with the help of statistical hypothesis tests (using χ²-tests).
  • Generated documentation: there is now a javadoc-like system, which extracts documentation directly from the plugin source code and stitches it into a LaTeX reference document.
  • lookAt: Mitsuba inherited a bug from PBRT, where the <lookAt> tag changed the handedness of the coordinate system. This is now fixed—also, the syntax of this tag has changed to make it easier to read.
  • Scene portability: the above changes clearly introduce severe incompatibilities in the file format. Even the old lambertian plugin now has a different name (it was renamed to diffuse to better fit into the new scheme), so one would ordinarily expect that no old scene will directly work with this release. To adress this problem, Mitsuba 0.3.0 introduces a version attribute to the scene. In other words, a scene XML file now looks something like the following:

    <scene version="0.3.0">...</scene>

    When it is detected that there are incompatibilities between the file version and the current release, Mitsuba will apply a set of included XSLTtransformations, which upgrade the file to the most current file format.

    That way, scenes will always work no matter how old they are, while at the same time allowing large-scale changes to be made without the need for an (ugly) deprecation mechanism.

To upgrade to this release, simply pull from the main repository as usual (hg pull -u).

Note: you will need to update your config.py file with an appropriate file from the build directory, since there were some changes to the compilation flags.

For a peek at the upcoming documentation, take a look at the following PDF file:

Mitsuba 0.3.0 Beta Documentation