2011-06-25 22:49:26 +08:00
|
|
|
\subsection{Surface scattering models}
|
2011-06-26 09:29:50 +08:00
|
|
|
Surface scattering models describe the manner in which light is reflected
|
|
|
|
by surfaces in the scene, which is fundamentally related to the perceptual
|
|
|
|
material appearance of an object. To achieve realistic results, Mitsuba
|
|
|
|
comes with a library of both general-purpose models (smooth or rough glass,
|
|
|
|
metal, plastic, etc.) and specializations to particular materials
|
|
|
|
(woven cloth, masks, etc.).
|
2011-06-25 22:49:26 +08:00
|
|
|
|
|
|
|
Throughout the documentation and within the scene description language,
|
|
|
|
the word \emph{BSDF} is used synonymously with the term ``surface
|
2011-06-26 09:29:50 +08:00
|
|
|
scattering model''. This is an abbreviation for \emph{Bidirectional
|
|
|
|
Scattering Distribution Function}, a more precise technical
|
|
|
|
description of the model's properties. In Mitsuba, BSDFs are
|
|
|
|
assigned to \emph{shapes}, which describe the visible surfaces in
|
|
|
|
the scene. In the scene description language, this assignment can
|
|
|
|
either be performed by nesting BSDFs within shapes, or they can
|
|
|
|
be named and then later referenced by their name.
|
2011-06-25 22:49:26 +08:00
|
|
|
|
|
|
|
The following fragment shows an example of both kinds of usages:
|
|
|
|
\begin{xml}
|
|
|
|
<scene>
|
|
|
|
<!-- Creating a named BSDF for later use -->
|
|
|
|
<bsdf type=".. BSDF type .." id="myNamedMaterial">
|
|
|
|
<!-- BSDF parameters go here -->
|
|
|
|
</bsdf>
|
|
|
|
|
|
|
|
<shape type="sphere">
|
|
|
|
<!-- Example of referencing a named material -->
|
|
|
|
|
|
|
|
<ref id="myNamedMaterial"/>
|
|
|
|
</shape>
|
|
|
|
|
|
|
|
<shape type="sphere">
|
|
|
|
<!-- Example of using an unnamed material -->
|
|
|
|
|
|
|
|
<bsdf type=".. BSDF type ..">
|
|
|
|
<!-- BSDF parameters go here -->
|
|
|
|
</bsdf>
|
|
|
|
</shape>
|
|
|
|
</scene>
|
|
|
|
\end{xml}
|
|
|
|
It is generally more economical to use named BSDFs when they
|
|
|
|
are used in several places, since this reduces Mitsuba's internal
|
|
|
|
memory usage.
|