How mitsuba-renderer/mitsuba3 works
Mitsuba 3 is a retargetable renderer for forward and inverse light-transport simulation, exposed through a Python-first API and a plugin-based C++ runtime. The primary workflow is to select a rendering variant, load a scene description, instantiate its objects, render through an algorithm against the scene, and save the resulting image. The repository also includes differentiable rendering algorithms and spectral/polarization-capable models. The README and tree establish these capabilities; sampled source directly supports scene parsing and object instantiation, but does not expose the full render dispatch implementation.
Main entry points: scene.cpp Scene · integrators Rendering algorithms · __init__.py Python API · parser.cpp Scene parser
Components 21
Python and scenes
- Python API
src/python/__init__.py - Scene parser
src/core/parser.cpp - Python parser bindings
src/core/python/parser.cpp - Native Python bindings
src/python/main.cpp
Scene models
- Scene
src/render/scene.cpp - Geometry and acceleration
src/render/shape.cpp - Materials and textures
src/bsdfs - Emitters
src/emitters - Media and phases
src/media - Sensors
src/sensors
Rendering and output
- Sampling plugins
src/samplers - Rendering algorithms
src/integrators - Differentiable algorithms
src/python/python/ad/integrators - Films and image blocks
src/render/film.cpp - Reconstruction filters
src/rfilters
Core runtime
- Plugin registry
src/core/plugin.cpp - Bitmap and image output
include/mitsuba/core/bitmap.h - Core utilities
src/core
Other components
- Python user
- Dr.Jit runtime
- Image file
Connections 24
- Python user → Python API: calls
- Python API → Scene parser: loads scenes
- Python parser bindings → Scene parser: invokes parsing
- Scene parser → Plugin registry: instantiates plugins
- Scene parser → Scene: builds scene
- Scene → Geometry and acceleration: contains shapes
- Scene → Materials and textures: contains materials
- Scene → Emitters: contains emitters
- Scene → Media and phases: contains media
- Scene → Sensors: contains sensors
- Python API → Rendering algorithms: selects algorithm
- Rendering algorithms → Scene: traces scene
- Rendering algorithms → Sampling plugins: uses samples
- Rendering algorithms → Films and image blocks: produces image blocks
- Films and image blocks → Reconstruction filters: reconstructs samples
- Python API → Bitmap and image output: writes image
- Bitmap and image output → Image file: writes file
- Python API → Differentiable algorithms: selects differentiable algorithm
- Differentiable algorithms → Rendering algorithms: uses rendering models
- Rendering algorithms → Dr.Jit runtime: JIT execution
- Differentiable algorithms → Dr.Jit runtime: automatic differentiation
- Native Python bindings → Core utilities: exports runtime
- Native Python bindings → Python parser bindings: registers parser
- Plugin registry → Core utilities: uses core services