2012-09-28 00:43:51 +08:00
|
|
|
\newpage
|
|
|
|
\subsection{Sensors}
|
|
|
|
\label{sec:sensors}
|
|
|
|
In Mitsuba, \emph{sensors}, along with a \emph{film}, are responsible for recording radiance
|
|
|
|
measurements in some usable format. This includes default choices such as perspective
|
|
|
|
or orthographic cameras, as well as more specialized sensors that measure the radiance
|
2014-02-06 23:16:26 +08:00
|
|
|
into a given direction or the irradiance received by a certain surface. This subsection
|
|
|
|
lists the available choices.
|
|
|
|
|
|
|
|
\subsubsection*{Syntax}
|
|
|
|
In the XML scene description language, a sensor declaration looks as follows
|
|
|
|
\begin{xml}
|
|
|
|
<scene version=$\MtsVer$>
|
|
|
|
<!-- ... scene contents ... -->
|
|
|
|
|
|
|
|
<sensor type="... sensor type ...">
|
|
|
|
<!-- ... sensor parameters ... -->
|
|
|
|
|
|
|
|
<sampler type=" ... sampler type ... ">
|
|
|
|
<!-- ... sampler parameters ... -->
|
|
|
|
</sampler>
|
|
|
|
|
|
|
|
<film type=" ... film type ... ">
|
|
|
|
<!-- ... film parameters ... -->
|
|
|
|
</film>
|
|
|
|
</sensor>
|
|
|
|
</scene>
|
|
|
|
\end{xml}
|
|
|
|
In other words, the \code{<sensor>} declaration is a child element of the \code{<scene>} (the particular
|
|
|
|
position in the scene file does not play a role). Nested within the sensor declaration is a
|
2014-02-14 01:38:21 +08:00
|
|
|
sampler instance (described in \secref{samplers}) and a film instance (described in
|
|
|
|
\secref{films}).
|
2012-09-28 00:43:51 +08:00
|
|
|
|
|
|
|
\subsubsection*{Handedness convention}
|
2012-10-25 02:44:26 +08:00
|
|
|
Sensors in Mitsuba are \emph{right-handed}.
|
2012-09-28 00:43:51 +08:00
|
|
|
Any number of rotations and translations can be applied to them
|
|
|
|
without changing this property. By default they are located at the
|
|
|
|
origin and oriented in such a way that in the rendered image, $+X$ points left,
|
|
|
|
$+Y$ points upwards, and $+Z$ points along the viewing direction.
|
|
|
|
|
|
|
|
Left-handed sensors are also supported. To switch the handedness,
|
2012-10-25 02:44:26 +08:00
|
|
|
flip any one of the axes, e.g. by passing a scale transformation like
|
2012-09-28 00:43:51 +08:00
|
|
|
\code{<scale x="-1"/>} to the sensor's \code{toWorld} parameter.
|