mitsuba-renderer / mitsuba3

Mitsuba 3: A Retargetable Forward and Inverse Renderer
https://www.mitsuba-renderer.org/
Other
2k stars 227 forks source link

<img src="https://raw.githubusercontent.com/mitsuba-renderer/mitsuba-data/master/docs/images/banners/banner_01.jpg" alt="Mitsuba banner">

Mitsuba Renderer 3

Documentation Tutorial videos Linux MacOS Windows PyPI
docs vids rgl-ci rgl-ci rgl-ci pypi

Warning

There currently is a large amount of undocumented and unstable work going on in the master branch. We'd highly recommend you use our latest release until further notice.

Introduction

Mitsuba 3 is a research-oriented rendering system for forward and inverse light transport simulation developed at EPFL in Switzerland. It consists of a core library and a set of plugins that implement functionality ranging from materials and light sources to complete rendering algorithms.

Mitsuba 3 is retargetable: this means that the underlying implementations and data structures can transform to accomplish various different tasks. For example, the same code can simulate both scalar (classic one-ray-at-a-time) RGB transport or differential spectral transport on the GPU. This all builds on Dr.Jit, a specialized just-in-time (JIT) compiler developed specifically for this project.

Main Features

Tutorial videos, documentation

We've recorded several YouTube videos that provide a gentle introduction Mitsuba 3 and Dr.Jit. Beyond this you can find complete Juypter notebooks covering a variety of applications, how-to guides, and reference documentation on readthedocs.

Installation

We provide pre-compiled binary wheels via PyPI. Installing Mitsuba this way is as simple as running

pip install mitsuba

on the command line. The Python package includes four variants by default:

The first two perform classic one-ray-at-a-time simulation using either a RGB or spectral color representation, while the latter two can be used for inverse rendering on the CPU or GPU. To access additional variants, you will need to compile a custom version of Dr.Jit using CMake. Please see the documentation for details on this.

Requirements

Usage

Here is a simple "Hello World" example that shows how simple it is to render a scene using Mitsuba 3 from Python:

# Import the library using the alias "mi"
import mitsuba as mi
# Set the variant of the renderer
mi.set_variant('scalar_rgb')
# Load a scene
scene = mi.load_dict(mi.cornell_box())
# Render the scene
img = mi.render(scene)
# Write the rendered image to an EXR file
mi.Bitmap(img).write('cbox.exr')

Tutorials and example notebooks covering a variety of applications can be found in the documentation.

About

This project was created by Wenzel Jakob. Significant features and/or improvements to the code were contributed by Sébastien Speierer, Nicolas Roussel, Merlin Nimier-David, Delio Vicini, Tizian Zeltner, Baptiste Nicolet, Miguel Crespo, Vincent Leroy, and Ziyi Zhang.

When using Mitsuba 3 in academic projects, please cite:

@software{Mitsuba3,
    title = {Mitsuba 3 renderer},
    author = {Wenzel Jakob and Sébastien Speierer and Nicolas Roussel and Merlin Nimier-David and Delio Vicini and Tizian Zeltner and Baptiste Nicolet and Miguel Crespo and Vincent Leroy and Ziyi Zhang},
    note = {https://mitsuba-renderer.org},
    version = {3.1.1},
    year = 2022
}