2011-07-17 21:20:55 +08:00
|
|
|
\newpage
|
|
|
|
\subsection{Participating media}
|
|
|
|
\label{sec:media}
|
2012-09-28 00:43:51 +08:00
|
|
|
\vspace{-1cm}
|
|
|
|
\renderings{
|
2014-02-06 22:11:30 +08:00
|
|
|
\subfloat[A knitted sheep sweater (Ridged Feather pattern)]{
|
|
|
|
\fbox{\includegraphics[width=0.58\textwidth]{images/medium_sheep}}}\hfill
|
|
|
|
\subfloat[A knitted sweater for an alien character (Braid Cables pattern)]{
|
|
|
|
\fbox{\includegraphics[width=0.32\textwidth]{images/medium_alien_cables}}}\hfill
|
|
|
|
\vspace{-2mm}
|
|
|
|
\caption{Participating media are not limited to smoke or fog: they are
|
|
|
|
also great for rendering fuzzy materials such as these knitted sweaters
|
|
|
|
(made using the \pluginref{heterogeneous} and \pluginref{microflake} plugins).
|
|
|
|
Figure courtesy of Yuksel et al. \cite{Yuksel2012Stitch}, models courtesy of
|
|
|
|
Rune Spaans and Christer Sveen.}
|
2012-09-28 00:43:51 +08:00
|
|
|
}
|
|
|
|
In Mitsuba, participating media are used to simulate materials ranging from
|
|
|
|
fog, smoke, and clouds, over translucent materials such as skin or milk,
|
|
|
|
to ``fuzzy'' structured substances such as woven or knitted cloth.
|
|
|
|
|
|
|
|
This section describes the two available types of media
|
|
|
|
(\pluginref{homogeneous} and \pluginref{heterogeneous}). In pratice, these
|
|
|
|
will be combined with a phase function, which are described in \secref{phase}.
|
|
|
|
Participating media are usually also attached to shapes in the scene.
|
|
|
|
How this is done is described at the beginning of \secref{shapes} on page
|
|
|
|
\pageref{sec:shapes}.
|
|
|
|
|
|
|
|
When a medium permeates a volume of space (e.g. fog) that includes sensors or emitters,
|
|
|
|
it is important to assign the medium to them. This can be done using the
|
|
|
|
referencing mechanism:
|
|
|
|
|
|
|
|
\begin{xml}
|
|
|
|
<medium type="homogeneous" id="fog">
|
2014-02-06 22:11:30 +08:00
|
|
|
<!-- .... homogeneous medium parameters .... -->
|
2012-09-28 00:43:51 +08:00
|
|
|
</medium>
|
|
|
|
|
|
|
|
<sensor type="perspective">
|
2014-02-06 22:11:30 +08:00
|
|
|
<!-- .... perspective camera parameters .... -->
|
2012-09-28 00:43:51 +08:00
|
|
|
|
2014-02-06 22:11:30 +08:00
|
|
|
<!-- Reference the fog medium from within the sensor declaration
|
|
|
|
to make it aware that it is embedded inside this medium -->
|
|
|
|
<ref id="fog"/>
|
2012-09-28 00:43:51 +08:00
|
|
|
</sensor>
|
|
|
|
\end{xml}
|