Skip to main content

3: A Retargetable Forward and Inverse Renderer

Project description

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

  • Cross-platform: Mitsuba 3 has been tested on Linux (x86_64), macOS (aarch64, x86_64), and Windows (x86_64).

  • High performance: The underlying Dr.Jit compiler fuses rendering code into kernels that achieve state-of-the-art performance using an LLVM backend targeting the CPU and a CUDA/OptiX backend targeting NVIDIA GPUs with ray tracing hardware acceleration.

  • Python first: Mitsuba 3 is deeply integrated with Python. Materials, textures, and even full rendering algorithms can be developed in Python, which the system JIT-compiles (and optionally differentiates) on the fly. This enables the experimentation needed for research in computer graphics and other disciplines.

  • Differentiation: Mitsuba 3 is a differentiable renderer, meaning that it can compute derivatives of the entire simulation with respect to input parameters such as camera pose, geometry, BSDFs, textures, and volumes. It implements recent differentiable rendering algorithms developed at EPFL.

  • Spectral & Polarization: Mitsuba 3 can be used as a monochromatic renderer, RGB-based renderer, or spectral renderer. Each variant can optionally account for the effects of polarization if desired.

Tutorial videos, documentation

We've recorded several [YouTube videos][10] 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][2].

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:

  • scalar_spectral
  • scalar_rgb
  • llvm_ad_rgb
  • cuda_ad_rgb

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

  • Python >= 3.8
  • (optional) For computation on the GPU: Nvidia driver >= 495.89
  • (optional) For vectorized / parallel computation on the CPU: LLVM >= 11.1

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][2].

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
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

mitsuba-3.5.0-cp312-cp312-win_amd64.whl (31.8 MB view hashes)

Uploaded CPython 3.12 Windows x86-64

mitsuba-3.5.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (40.3 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

mitsuba-3.5.0-cp312-cp312-macosx_11_0_arm64.whl (27.0 MB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

mitsuba-3.5.0-cp312-cp312-macosx_10_14_x86_64.whl (32.2 MB view hashes)

Uploaded CPython 3.12 macOS 10.14+ x86-64

mitsuba-3.5.0-cp311-cp311-win_amd64.whl (31.8 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

mitsuba-3.5.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (40.3 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

mitsuba-3.5.0-cp311-cp311-macosx_11_0_arm64.whl (26.5 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

mitsuba-3.5.0-cp311-cp311-macosx_10_14_x86_64.whl (31.7 MB view hashes)

Uploaded CPython 3.11 macOS 10.14+ x86-64

mitsuba-3.5.0-cp310-cp310-win_amd64.whl (31.8 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

mitsuba-3.5.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (40.2 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

mitsuba-3.5.0-cp310-cp310-macosx_11_0_arm64.whl (26.5 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

mitsuba-3.5.0-cp310-cp310-macosx_10_14_x86_64.whl (31.7 MB view hashes)

Uploaded CPython 3.10 macOS 10.14+ x86-64

mitsuba-3.5.0-cp39-cp39-win_amd64.whl (31.8 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

mitsuba-3.5.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (40.2 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

mitsuba-3.5.0-cp39-cp39-macosx_11_0_arm64.whl (26.5 MB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

mitsuba-3.5.0-cp39-cp39-macosx_10_14_x86_64.whl (31.7 MB view hashes)

Uploaded CPython 3.9 macOS 10.14+ x86-64

mitsuba-3.5.0-cp38-cp38-win_amd64.whl (31.8 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

mitsuba-3.5.0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (40.2 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

mitsuba-3.5.0-cp38-cp38-macosx_11_0_arm64.whl (26.5 MB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

mitsuba-3.5.0-cp38-cp38-macosx_10_14_x86_64.whl (31.7 MB view hashes)

Uploaded CPython 3.8 macOS 10.14+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page