Author: Baptiste Nicolet.
This Add-on allows to export a Blender scene to Mitsuba 2's file format.
There are two independent ways of installing the addon, depending on your needs:
- Download the latest release or clone this repository as a
zip
archive. - In Blender, go to Edit -> Preferences -> Add-ons -> Install
- Select the downloaded archive
- Enable the Add-on:
- Point
Path
to Mitsuba 2's build directory. If the environment variableMITSUBA_DIR
was set (cf. Mitsuba 2 install instructions), this field will automatically be filled with the path it contains.
- Point
- Save the preferences. The Save Preferences button is in a menu in the bottom left corner of the preferences window.
There are a couple ways to keep up to date with the repository without doing the method described above every time. You can do either of the following:
- Clone the add-on wherever you want in your system, and create a symbolic link to the cloned repository location in the addons folder of Blender. This directory is stored:
- Linux:
$HOME/.config/blender/2.82/scripts/addons/
- MacOS:
/Users/$USER/Library/Application Support/Blender/2.82/scripts/addons/
- Windows:
%USERPROFILE%\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons
- Linux:
- Alternatively, create a directory called
addons
in the location of your work and clone this repository there. Then specify the path to the parent folder of theaddons
directory in the preferences in Blender ( Edit -> Preferences -> File Paths -> Scripts). For more detailed information, see here.
After that, follow the same procedure as option #1
Make sure you restart Blender to update the Add-on.
The current scene can be exported as a Mitsuba 2 scene under File -> Export -> Mitsuba 2
Some log messages are printed the console. To see them under Windows, enable the console window under Window -> Toggle System Console. Under MacOS and Linux, run blender from the command line.
Currently, this add-on only allows you to save a Blender scene as a Mitsuba 2-compatible scene. Future versions may support more fancy features, such as custom nodes for materials or in-blender rendering.
Export of the following is supported:
- Objects:
- Meshes
- Metaballs
- Text
- Nurbs surfaces
- Material Nodes:
- Diffuse BSDF
⚠️ Mitsuba 2 does not handle rough diffuse BSDFs currently - Glossy BSDF
- Emission BSDF
- Glass BSDF
- Image Texture
- Vertex Colors
- Mix Shader
- Add Shader
⚠️ Adding two BSDFs is not supported
- Diffuse BSDF
- Light Sources:
- Point Light
- Spot Light
- Sun Light
- Area Lights
⚠️ Ellipse area lights are not supported - Environment Maps