Pictura quaerit causam suam.
— THE PICTURE SEEKS ITS OWN CAUSE —
Every renderer in this stack runs forward: scene goes in, image comes out. Mitsuba 3 is the renderer that runs backward. Given an image, it recovers the scene that produced it — by computing the gradient of the rendered pixels with respect to the scene parameters and stepping toward the answer. The renderer is no longer a function; it is a derivative.
import mitsuba as mi import drjit as dr mi.set_variant("cuda_ad_rgb") # JIT-compiled · differentiable · GPU scene = mi.load_file("./scene.xml") target = mi.Bitmap("./target.exr") θ = mi.traverse(scene) # the parameter graph for key in ["sphere.bsdf.albedo", "light.intensity", "sphere.position"]: dr.enable_grad(θ[key]) # mark as differentiable
opt = mi.ad.Adam(lr=0.025) opt.load(θ) for i in range(512): img = mi.render(scene, params=θ, spp=8) # forward render loss = dr.mean(dr.sqr(img - target)) # L2 image loss dr.backward(loss) # reverse-mode AD opt.step() # θ ← θ - η · ∇θ ℒ opt.update(θ) log(i, float(loss))
| parameter | target | current | ∇ θ ℒ | Δ |
|---|
Where R is the path-tracing operator, ℒ is the loss between rendered and reference image, and η is the step size. The renderer R is differentiable by construction. No finite differences. No black-box optimization. The gradient flows through every refraction, every BSDF, every Monte Carlo sample, all the way back to the parameter that created it.
Mitsuba 3: a retargetable forward and inverse renderer. SIGGRAPH. 2022.PBR-Book v3: Physically-Based Rendering, MIT Press. 2018. Mitsuba is the working code for the textbook.| 2010 | 0.1 | Wenzel Jakob's PhD work at Cornell. Forward only. |
| 2014 | 0.6 | Definitive forward-rendering reference. Used for SIGGRAPH ground truth for a decade. |
| 2019 | 2.0 | Retargetable variants. Compile once for spectral, polarized, RGB, scalar, GPU. |
| 2022 | 3.0 | Built on Dr.Jit. Differentiable rendering becomes a first-class operation. |
| 2023 | 3.4 | Path replay backpropagation. Constant-memory reverse-mode AD. |
| 2024 | 3.5 | Reparameterized discontinuous integrands. Edge gradients become tractable. |
The renderer figures out the scene by failing slightly less, every frame.