forked from mitsuba-renderer/mitsuba
-
Notifications
You must be signed in to change notification settings - Fork 1
/
plugins.tex
64 lines (60 loc) · 2.48 KB
/
plugins.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
\section{Plugin reference}
\vspace{-2mm}
The following subsections describe the available Mitsuba plugins, usually along
with example renderings and a description of what each parameter does.
They are separated into subsections covering textures, surface scattering
models, etc.
Each subsection begins with a brief general description.
The documentation of a plugin always starts on a new page and is preceded
by a table similar to the one below:
\parameters{
\parameter{softRays}{\Boolean}{
Try not to damage objects in the scene by shooting softer rays
\default{\code{false}}
}
\parameter{darkMatter}{\Float}{
Controls the proportionate amount of dark matter present in the scene.
\default{0.83}
}
}
Suppose this hypothetical plugin is an \emph{integrator} named \code{amazing}. Then, based on
this description, it can be instantiated from an XML scene file using a custom configuration such as:
\begin{xml}
<integrator type="amazing">
<boolean name="softerRays" value="true"/>
<float name="darkMatter" value="0.4"/>
</integrator>
\end{xml}
In some cases\footnote{Note that obvious parameters are generally omitted.
For instance, all shape plugins accept a surface scattering plugin, but this
is left out from the documentation for brevity.}, plugins also indicate that they accept nested plugins
as input arguments. These can either be \emph{named} or \emph{unnamed}. If
the \code{amazing} integrator also accepted the following two parameters\vspace{-2mm}
\parameters{
\parameter{\Unnamed}{\Integrator}{A nested integrator which does the actual hard work}
\parameter{puppies}{\Texture}{This must be used to supply a \mbox{cute picture of puppies}}
}
\vspace{-1mm}
then it can be instantiated e.g. as follows
\begin{xml}
<integrator type="amazing">
<boolean name="softerRays" value="true"/>
<float name="darkMatter" value="0.4"/>
<integrator type="path"/>
<texture name="puppies" type="bitmap">
<string name="filename" value="cute.jpg"/>
</texture>
</integrator>
\end{xml}
or, if these were already instantiated previously and are now
bound to the \emph{identifiers} (\secref{format}) \code{myPathTracer} and
\code{myTexture}, the following also works:
\begin{xml}
<integrator type="amazing">
<boolean name="softerRays" value="true"/>
<float name="darkMatter" value="0.4"/>
<ref id="myPathTracer"/>
<ref name="puppies" id="myTexture"/>
</integrator>
\end{xml}
\IfFileExists{plugins_generated.tex}{\input{plugins_generated}}{}