added a new shape documentation section
parent
9338b04368
commit
f130fa9e43
|
@ -0,0 +1,94 @@
|
|||
\newpage
|
||||
\subsection{Shapes}
|
||||
\label{sec:shapes}
|
||||
This section presents an overview of the shape plugins that are released along with the renderer.
|
||||
|
||||
In Mitsuba, shapes define surfaces that mark transitions between different types of materials. For instance,
|
||||
a shape could describe a boundary between air and a solid object, such as a piece of rock. Alternatively,
|
||||
a shape can mark the beginning of a region of space that isn't solid at all, but rather contains a participating
|
||||
medium, such as smoke or steam. Finally, a shape can be used to create an object that emits light on its own.
|
||||
|
||||
Shapes are usually declared along with a surface scattering model (named ``BSDF'', see \secref{bsdfs} for details).
|
||||
This BSDF characterizes what happens \emph{at the surface}. In the XML scene description language, this might look like
|
||||
the following:
|
||||
\begin{xml}
|
||||
<scene version=$\MtsVer$>
|
||||
<shape type="... shape type ...">
|
||||
... $\code{shape}$ parameters ...
|
||||
|
||||
<bsdf type="... bsdf type ...">
|
||||
... $\code{bsdf}$ parameters ..
|
||||
</bsdf>
|
||||
|
||||
<!-- Alternatively: reference a named BSDF that
|
||||
has been declared previously
|
||||
|
||||
<ref id="myBSDF"/>
|
||||
-->
|
||||
</shape>
|
||||
</scene>
|
||||
\end{xml}
|
||||
|
||||
When a shape marks the transition to a participating medium (e.g. smoke, fog, ..), it is furthermore
|
||||
necessary to provide information about the two media that lie at the \emph{interior} and \emph{exterior}
|
||||
of the shape. This informs the renderer about what happens in the region of space \emph{surrounding the surface}.
|
||||
|
||||
\begin{xml}
|
||||
<scene version=$\MtsVer$>
|
||||
<shape type="... shape type ...">
|
||||
... $\code{shape}$ parameters ...
|
||||
|
||||
<medium name="interior" type="... medium type ...">
|
||||
... $\code{medium}$ parameters ...
|
||||
</medium>
|
||||
|
||||
<medium name="exterior" type="... medium type ...">
|
||||
... $\code{medium}$ parameters ...
|
||||
</medium>
|
||||
|
||||
<!-- Alternatively: reference named media that
|
||||
have been declared previously
|
||||
|
||||
<ref name="interior" id="myMedium1"/>
|
||||
<ref name="exterior" id="myMedium2"/>
|
||||
-->
|
||||
</shape>
|
||||
</scene>
|
||||
\end{xml}
|
||||
|
||||
You may have noticed that the previous XML example dit not make any mention of surface
|
||||
scattering models (BSDFs). In Mitsuba, such a shape declaration creates an \emph{index-matched} boundary.
|
||||
This means that incident illumination will pass through the surface without undergoing any kind of
|
||||
interaction. However, the renderer will still uses the information available in the shape to correctly
|
||||
account for the medium change.
|
||||
|
||||
It is also possible to create \emph{index-mismatched} boundaries between media, where some of
|
||||
the light is affected by the boundary transition:
|
||||
\begin{xml}
|
||||
<scene version=$\MtsVer$>
|
||||
<shape type="... shape type ...">
|
||||
... $\code{shape}$ parameters ...
|
||||
|
||||
<bsdf type="... bsdf type ...">
|
||||
... $\code{bsdf}$ parameters ..
|
||||
</bsdf>
|
||||
|
||||
<medium name="interior" type="... medium type ...">
|
||||
... $\code{medium}$ parameters ...
|
||||
</medium>
|
||||
|
||||
<medium name="exterior" type="... medium type ...">
|
||||
... $\code{medium}$ parameters ...
|
||||
</medium>
|
||||
|
||||
<!-- Alternatively: reference named media and BSDF
|
||||
instances that have been declared previously
|
||||
|
||||
<ref id="myBSDF"/>
|
||||
<ref name="interior" id="myMedium1"/>
|
||||
<ref name="exterior" id="myMedium2"/>
|
||||
-->
|
||||
</shape>
|
||||
</scene>
|
||||
\end{xml}
|
||||
|
Loading…
Reference in New Issue