Skip to main content

mitransient

Transient light transport in Mitsuba 3

Documentation Status PyPI version arXiv Paper



Overview

mitransient is a library adds support to Mitsuba 3 for doing transient simulations, with amazing support for non-line-of-sight (NLOS) data capture simulations, polarization tracking and differentiable transient rendering.


Main features

  • Foundation ready to use: easy interface to convert your algorithms to the transient domain.
  • Python-only library for doing transient rendering in both CPU and GPU.
  • Several integrators already implemented: transient pathtracing (also adapted for NLOS scenes) and transient volumetric pathtracing.
  • Cross-platform: Mitsuba 3 has been tested on Linux (x86_64), macOS (aarch64, x86_64), and Windows (x86_64).
  • Polarization tracking
  • Differentiable transient rendering

License and citation

This project was started by Diego Royo, Miguel Crespo and Jorge Garcia-Pueyo. See below for the full list of mitransient contributors. Also see the original Mitsuba 3 license and contributors.

If you use our code in your project, please consider citing us using the following:

@misc{royo2025mitransient,
      title={mitransient: Transient light transport in Mitsuba 3}, 
      author={Diego Royo and Jorge Garcia-Pueyo and Miguel Crespo and Guillermo Enguita and Óscar Pueyo-Ciutad and Diego Bielsa},
      year={2025},
      eprint={2510.25660},
      archivePrefix={arXiv},
      primaryClass={cs.GR},
      url={https://arxiv.org/abs/2510.25660}, 
}

Additionally, the NLOS features were implemented from our publication Non-line-of-sight transient rendering. Please also consider citing us if you use them:

@article{royo2022non,
	title        = {Non-line-of-sight transient rendering},
	author       = {Diego Royo and Jorge García and Adolfo Muñoz and Adrian Jarabo},
	year         = 2022,
	journal      = {Computers & Graphics},
	doi          = {https://doi.org/10.1016/j.cag.2022.07.003},
	issn         = {0097-8493},
	url          = {https://www.sciencedirect.com/science/article/pii/S0097849322001200}
}

What is transient rendering?

Conventional rendering is referred to as steady state, where the light propagation speed is assumed to be infinite. In contrast, transient rendering breaks this assumption allowing us to simulate light in motion (see the teaser image for a visual example).

For example, path tracing algorithms integrate over multiple paths that connect a light source with the camera. For a known path, transient path tracing uses the very complex formula of time = distance / speed (see [Two New Sciences by Galileo]) to compute the time when each photon arrives at the camera from the path's distance and light's speed. This adds a new time dimension to the captured images (i.e. it's a video now). The simulations now take new parameters as input: when to start recording the video, how long is each time step (framerate), and how many frames to record.

Note: note that the time values we need to compute are very small (e.g. light takes only ~3.33 * 10^-9 seconds to travel 1 meter), time is usually measured in optical path distance. See Wikipedia for more information. TL;DR opl = distance * refractive_index

Installation

We provide the package via PyPI. To install mitransient you need to run:

pip install mitransient

which will also install the mitsuba Python package as a dependency.

Requirements

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

After installation

At this point, you should be able to import mitsuba and import mitransient in your Python code (careful about setting the correct PATH environment variable if you have compiled Mitsuba 3 yourself, see the section below).

For NLOS data capture simulations, see https://github.com/diegoroyo/tal. tal is a toolkit that allows you to create and simulate NLOS scenes with an easier shell interface instead of directly from Python.

If you use your own Mitsuba 3

First, you will want to install mitransient without the mitsuba dependency:

pip install mitransient --no-dependencies

Then you will need to import mitsuba in your Python scripts. Concretely, the PYTHONPATH variable should point to the Mitsuba module that is built upon compilation. There are different ways to do so:

  • One solution is to directly execute setpath.sh provided after the compilation of the Mitsuba 3 repo (More info). This shell script will modify the PATH and PYTHONPATH variables to load first this version of Mitsuba.
  • Another solution following the previous one is to directly set yourself the PYTHONPATH environment variable as you wish.
  • Another solution for having a custom version globally available is by using pip install . --editable. This will create a symlink copy of the package files inside the corresponding site-packages folder and will be listed as a package installed of pip and will be available as other packages installed. If you recompile them, you will still have the newest version directly to use. Please follow these instructions:
    • Go to <mitsuba-path>/mitsuba3/build/python/drjit and execute pip install . --editable.
    • Go to <mitsuba-path>/mitsuba3/build/python/mitsuba and execute pip install . --editable.
  • If you are a user of Jupyter Notebooks, the easiest solution will be to add the following snippet of code to modify the notebook's PYTHONPATH:
import sys
sys.path.insert(0, '<mitsuba-path>/mitsuba3/build/python')
import mitsuba as mi

Usage

You are now prepared to render your first transient scene with mitransient. Running the code below will render the famous Cornell Box scene in transient domain and show a video.

import mitsuba as mi
mi.set_variant('llvm_ad_rgb')
import mitransient as mitr

scene = mi.load_dict(mitr.cornell_box())
img_steady, img_transient = mi.render(scene, spp=1024)

img_transient = mitr.vis.tonemap_transient(img_transient)
mitr.vis.show_video(img_transient)

Plugins implemented

mitransient implements the following plugins which can be used in scene XML files and dictionaries. To view a description of their parameters, click on the name of your desired plugin.

  • film:
    • transient_hdr_film: Transient equivalent of Mitsuba 3's hdrfilm plugin.
    • phasor_hdr_film: Similar to transient_hdr_film, but stores the result in the frequency domain instead of the time domain.
  • integrators:
  • emitters:
    • angulararea: Similar to an area emitter, but emits within a restricted angular range.
  • sensors:
    • nlos_capture_meter: Can be attached to one of the scene's geometries, and measures uniformly-spaced points on such geometry (e.g. relay wall).

Other useful functions

See the full list on this website

Testing

Our test suite can be run using pytest on the root folder of the repo.

Contributors

Diego Royo
Diego Royo

🎨 💻 📣 📖
Miguel Crespo
Miguel Crespo

🎨 💻 📣
Jorge Garcia Pueyo
Jorge Garcia Pueyo

🎨 💻 📣 📖
DiegoBielsa
DiegoBielsa

🐛 💻 📖
p-luesia
p-luesia

📖
Óscar Pueyo Ciutad
Óscar Pueyo Ciutad

💻 📖
Guillermo Enguita Lahoz
Guillermo Enguita Lahoz

🎨 💻 📖
蕉太狼
蕉太狼

🐛

See emoji key for details.

Metadata

Release files for mitransient 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mitransient 1.3.1
File Size Uploaded
mitransient-1.3.1.tar.gz 57.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mitransient 1.3.1
File Interpreter ABI Platform
mitransient-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 121.3 kB

Release files / mitransient-1.3.1.tar.gz

Download URL mitransient-1.3.1.tar.gz
Size 57.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d8945086e2788701cce55d538db1ab7c6ebe46dbea330cac5852403a09f09207
BLAKE2b-256 checksum
How to use checksums
e0703db7f57a96d0fe0d2ad857dc1d597722e296cd43ffaa5b15b9f117a54a38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / mitransient-1.3.1-py3-none-any.whl

Download URL mitransient-1.3.1-py3-none-any.whl
Size 64.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8b6ec3f06ac50807352b7d2dd17c315951fd5888536b1a85671d798920e3d25
BLAKE2b-256 checksum
How to use checksums
d08cc4a3875c12f007035f9568009a94a2f95dd80049699975a2a066fb175971
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page