Important
If this is your first time, we strongly recommend that you start with the examples in the transient folder. Going through these in order will give you an idea of the main features of mitransient.
Caution
Most of the tutorials assume that you've read the transient/0-render_cbox_diffuse.ipynb tutorial, which gives the basics on how to create/edit/render/visualize a scene.
transient: First steps withmitransient(+Mitsuba 3): creating a scene, editing the scene and visualizing the transient result. There are more advanced tutorials for transient volumetric rendering, frequency space rendering and advanced visualization.transient-nlos: Example on how to render NLOS simulations from the Python interface. For easier setups you can also check tal, a Python library with a shell interface that simplifies this process.polarization: Most of the tutorials do not simulate the polarization of the light. This folder contains multiple samples for how to simulate time-resolved polarization of light, and how to visualize the result/Stokes vectors.diff-transient: Differentiable transient rendering. We show examples for gradient-based optimization with a transient signal (backward-mode autodiff) and forward inverse rendering (forward-mode autodiff) in the time domain.angulararea-emitter: Examples for ourangularareaplugin, which acts as an area light that emits within a restricted angular range.
To create a scene and simulate a NLOS setup, you will need to set up the following components:
From here you have two alternatives:
- Configure the XML/Python code of the scene youself, using the help below
- Use https://github.com/diegoroyo/tal.
talis a toolkit that allows you to create and simulate NLOS scenes with an easier shell interface instead of directly from XML/Python.
Here's a list of the required plugins and configuration in your scene:
- Relay wall: The relay wall must be defined using a rectangle shape with ID "relay_wall" i.e.
<shape type="rectangle" id="relay_wall">- Camera: Inside this shape, you must place a
nlos_capture_meterplugin, which will focus your camera towards a set of points in the relay wall. In order to configure thenlos_capture_meter, read its documentation.
- Camera: Inside this shape, you must place a
- Laser/light source: You must define an active illumination emitter that has the ID "laser". You can use the existing
projectorplugin with a low enoughfovparameter. In order to point the laser to the relay wall, we recommend using our helper functions instead of using thetransformplugin. In our example, we only define thetranslatepart of thetransform:<emitter type="projector" id="laser"> <transform name="to_world"> <translate x="-0.5" y="0.0" z="0.25"/> </transform> <rgb name="irradiance" value="1.0, 1.0, 1.0"/> <float name="fov" value="0.2"/> </emitter>
- Pointing the laser source to the relay wall: You can use our helper functions for this purpose. We offer three alternatives:
mitransient.nlos.focus_emitter_at_relay_wall_3dpoint(target, relay_wall, emitter): Accepts ami.Point3fwith the XYZ coordinates on the relay wall where the laser should be pointed at.mitransient.nlos.focus_emitter_at_relay_wall_uv(uv, relay_wall, emitter): Accepts ami.Point2fwith the UV coordinates of the shape that you used as relay wall (e.g. if your relay wall is a rectangle, passingmi.Point2f(0.5, 0.5)will point the laser at the center)mitransient.nlos.focus_emitter_at_relay_wall_pixel(pixel, relay_wall, emitter): Accepts ami.Point2fwith the pixel coordinates (e.g. if you capture a grid of 3x3 points with yournlos_capture_meter, passingmi.Point2f(1, 1)will point the laser at the center of the center pixel)- Note that you need to pass the
relay_wallandemitterparameters, which should be the shapes with ID "relay_wall" and "laser". See the examples Jupyter notebook for more information.
- Pointing the laser source to the relay wall: You can use our helper functions for this purpose. We offer three alternatives:
- Hidden object and occluders: You can add other shapes in the locations that you want with no restrictions.
- Integrator: We provide a
transient_nlos_pathplugin which implements a path-tracing algorithm with specific techniques which work better in NLOS setups. We strongly recommend that you read the documentation and our paper for further information.
