-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintro.html
262 lines (243 loc) · 20.8 KB
/
intro.html
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Introduction — Lightmetrica Version 3 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<script src="https://unpkg.com/@jupyter-widgets/html-manager@^0.20.0/dist/embed-amd.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Changelog" href="changelog.html" />
<link rel="prev" title="Lightmetrica – Research-oriented renderer" href="index.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Lightmetrica Version 3
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Introduction</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#about-this-project">About this project</a></li>
<li class="toctree-l2"><a class="reference internal" href="#characteristics">Characteristics</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#extensibility">Extensibility</a></li>
<li class="toctree-l3"><a class="reference internal" href="#verifiability">Verifiability</a></li>
<li class="toctree-l3"><a class="reference internal" href="#orchestration">Orchestration</a></li>
<li class="toctree-l3"><a class="reference internal" href="#renderer-as-a-library">Renderer as a library</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#features">Features</a></li>
<li class="toctree-l2"><a class="reference internal" href="#supported-compilers">Supported compilers</a></li>
<li class="toctree-l2"><a class="reference internal" href="#short-history">Short history</a></li>
<li class="toctree-l2"><a class="reference internal" href="#about-version-3">About Version 3</a></li>
<li class="toctree-l2"><a class="reference internal" href="#citation-of-this-project">Citation of this project</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Guide</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="build.html">Build</a></li>
<li class="toctree-l1"><a class="reference internal" href="managing_experiment.html">Managing experiments</a></li>
<li class="toctree-l1"><a class="reference internal" href="basic_rendering.html">Basic rendering</a></li>
<li class="toctree-l1"><a class="reference internal" href="extending_framework.html">Extending framework</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Advanced Topics</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="build_system.html">Build System</a></li>
<li class="toctree-l1"><a class="reference internal" href="component.html">Component</a></li>
<li class="toctree-l1"><a class="reference internal" href="python_binding.html">Python binding</a></li>
<li class="toctree-l1"><a class="reference internal" href="path_sampling.html">Path sampling</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Examples and tests</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="test.html">Tests in Lightmetrica</a></li>
<li class="toctree-l1"><a class="reference internal" href="example.html">Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="functest.html">Functional tests</a></li>
<li class="toctree-l1"><a class="reference internal" href="perftest.html">Performance tests</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">References</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="component_ref.html">Built-in component reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="api_ref.html">API reference</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Lightmetrica Version 3</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> »</li>
<li>Introduction</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/intro.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<style>
/* CSS overrides for sphinx_rtd_theme */
/* 24px margin */
.nbinput.nblast.container,
.nboutput.nblast.container {
margin-bottom: 19px; /* padding has already 5px */
}
/* ... except between code cells! */
.nblast.container + .nbinput.container {
margin-top: -19px;
}
.admonition > p:before {
margin-right: 4px; /* make room for the exclamation icon */
}
/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
.math {
text-align: unset;
}
</style>
<div class="section" id="introduction">
<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h1>
<div class="section" id="about-this-project">
<h2>About this project<a class="headerlink" href="#about-this-project" title="Permalink to this headline"></a></h2>
<p><strong>Lightmetrica</strong> is a research-oriented renderer. The development of the framework is motivated by the goal to provide a practical environment for rendering research and development, where the researchers and developers need to tackle various challenging requirements through the development process.</p>
<p>Unlike many other renderers, Lightmetrica is <em>not</em> a stand-alone renderer, but an <em>environment</em> to support entire process of renderer development. Stand-alone renderers are typically used by artists and its development focuses on the usability for artists and the performance to fully utilize the limited time or budgets of a production. On the other hand, research-oriented renderer is mainly utilized by researchers and renderer developers, to prototype new approaches where the developer needs to extend the renderer and setup various experiments utilizing the extended renderer. Moreover, research-oriented renderer needs to be verifiable, meaning the features must be correctly implemented and ready to be comparable.</p>
</div>
<div class="section" id="characteristics">
<h2>Characteristics<a class="headerlink" href="#characteristics" title="Permalink to this headline"></a></h2>
<p>In particular, we can characterize the requirements of the research-oriented renderer with three criteria: <em>extensibility</em>, <em>verifiability</em> and <em>orchestration</em>. Lightmetrica provides various features to meet the requirements.</p>
<div class="section" id="extensibility">
<h3>Extensibility<a class="headerlink" href="#extensibility" title="Permalink to this headline"></a></h3>
<p><em>Extensibility</em> allows the developer to extend the renderer and to implement a new feature. This is necessary as a research-oriented render because the developers want to focus on only the modification they really need. For instance, the developer who want to implement new materials doesn’t want to modify the code of the rendering techniques.</p>
<p>Lightmetrica provides decoupled interfaces to extend various features so that the developers are not necessary to know the details on the other part of the renderer. Also, our plugin system enables to extend the feature extremely simple by adding one macro at the end of the C++ code. Moreover, our plugin system does not care about the number of implementations inside a library and the places where the implementation exists.</p>
</div>
<div class="section" id="verifiability">
<h3>Verifiability<a class="headerlink" href="#verifiability" title="Permalink to this headline"></a></h3>
<p><em>Verifiability</em> helps the developers to assure the extended feature to be correct. The process of rendering research is a sequence of trials-and-errors where a developer need to feedback the knowledge from the previous iteration to the next. Verifiability is crucial in renderer development because a developer need to know what is actually happening inside the code to feedback the knowledge. That is, a developer is responsible for giving a rationale to the phenomena they observed. For instance, if a developer found an inconsistency in an experiment, e.g., mismatch of the rendered vs. references, they need to identify where the cause of inconsistency comes from. It is crucially important to identify the phenomena is due to a bug or not, because otherwise a developer cannot have a clue to improve the approach.</p>
<p>Our framework provides tools to help developers to find the cause behind the observation as soon and as easy as they can, such as a visual debugger, tools to find statistical inconsistencies or to analyze performance of the code. Also, we provide various implementation with least possibility of bugs inside. Developers can utilize the code as a reference to find inconsistency in their codes.</p>
</div>
<div class="section" id="orchestration">
<h3>Orchestration<a class="headerlink" href="#orchestration" title="Permalink to this headline"></a></h3>
<p><em>Orchestration</em> allows the developers to design and organize various experiments related to rendering research. Implementing a new technique is just one step in the research process. In addition to the implementation, a developer needs to design and implement various experiments to find characteristics of the technique.</p>
<p>Our framework provides a comprehensible solution to design various experiments in Python, where we provide a complete Python API of every features including the extension of framework. As a result, we could successfully facilitate a richness of Python ecosystem. Internal types are automatically converted to Python types that compatible with Python’s standard datatypes or Numpy’s array type so that we can easily integrate inputs or outputs into the pipeline using other useful Python libraries. Also, we provide a IPython extension which supports us to implement various experiments interactively inside the Jupyter notebook.</p>
<p>Although it is still possible to use stand-alone renderers in the experiments, it requires another layer of API to manage input/output of the renderer where we usually needs constant maintenance as the renderer specification change (and it happens a lot for research purpose, by design). On the other hand, our framework exposes internal features directly to the developers, which enables broader applicability to the experiments. For instance, we can design an experiment where the data is shared among renderings with different parameters. This is obviously not possible with stand-alone renderers because we need to dispatch another process to execute the renderer where additional data transfer is unavoidable.</p>
</div>
<div class="section" id="renderer-as-a-library">
<h3>Renderer as a library<a class="headerlink" href="#renderer-as-a-library" title="Permalink to this headline"></a></h3>
<p>In the previous version of the framework, all features of the renderer must be accessed through an executable. The parameters to the renderer must be passed by a scene definition file written in YAML format, and the outputs from the renderer must be written onto the disk. This execution model works great if the renderer used as an independent renderer. In a research project, however, a renderer is usually integrated into the workflow of experiments typically written in a scripting language, for instance to organize various input parameters and to analyze the outputs from the renderer.</p>
<p>After the experience of various research projects, we found a renderer as an independent executable is rather suboptimal in this workflow. First, due to the separated layers of renderer IO, the experimental code needs to generate the configuration on the fly. This requires the user to maintain a layer to serialize input parameters to the renderer as a specific scene configuration format, which needs to be managed throughout the experiments. In the previous versions, we have used a parameterized scene definition file and generated the scene definition file on the fly where the scene definition can contain arbitrary parameters to the extended features. A problem is managing this intermediate layer is error prone and it becomes hard to manage as the research progresses. Once we modify the parameters, we need to modify both of the scene file generation and experimental codes. In the early stage of the development, it is not a problem, but later it becomes a dept since the size of the parameters being managed becomes larger and larger.</p>
<p>Second, with an independent process, it is hard to conduct a series of experiments that utilizes persistent data among the experiments. For instance, let us consider an experiment to conduct a series of rendering jobs with several different parameters against the same scene. Naturally, we want to use the scene data as a persistent date among the executions to save scene loading time. Unfortunately, in the previous versions, it is not possible because we always need to restart the renderer process on every executions.</p>
<p>To resolve the aforementioned problem, we decided to redesign the renderer as as a library. In Lightmetrica Version 3, all operations to the internal state of the renderer, such as modifying the scene or organizing rendering jobs, must be conducted by a script with provided API, not by a scene definition file. As a matter of course, the scene definition file is deprecated in Version 3. This decision is based on the observation of the requirements in the actual research environment where the renderer is mostly used with experimental codes. This modification could remove the necessity of the intermediate IO layers to communicate with a renderer process, which eventually contributed to the simpleness of the experimental code.</p>
</div>
</div>
<div class="section" id="features">
<h2>Features<a class="headerlink" href="#features" title="Permalink to this headline"></a></h2>
<p>Current major version is <strong>3</strong>. Upon the major update, we have redesigned most of the features from the previous version, and rewrote the entire framework from scratch.</p>
<ul class="simple">
<li><dl class="simple">
<dt>Extension support</dt><dd><ul>
<li><p>Component object model that allows to extend any interfaces as plugins</p></li>
<li><p>Serialization of component objects</p></li>
<li><p>Position-agnostic plugins</p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Verification support</dt><dd><ul>
<li><p>Visual debugger</p></li>
<li><p>Performance measurements</p></li>
<li><p>Statistical verification</p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Orchestration support</dt><dd><ul>
<li><p>Complete set of Python API</p></li>
<li><p>Jupyter notebook integration</p></li>
</ul>
</dd>
</dl>
</li>
</ul>
</div>
<div class="section" id="supported-compilers">
<h2>Supported compilers<a class="headerlink" href="#supported-compilers" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><p>Microsoft Visual Studio 2017 or newer</p></li>
<li><p>GCC 7 or newer</p></li>
</ul>
</div>
<div class="section" id="short-history">
<h2>Short history<a class="headerlink" href="#short-history" title="Permalink to this headline"></a></h2>
<p>We started the development of Lightmetrica in 2014. The initial version was rather an experimental prototype. In 2015, we extended this prototype to <a class="reference external" href="https://github.com/hi2p-perim/lightmetrica-v2">Lightmetrica Version 2</a>. Fortunately, the development of Version 2 could be affiliated by <a class="reference external" href="https://www.ipa.go.jp/english/humandev/third.html">MITOU Program</a>, a goverment-funded program by Ministry of Economy, Trade and Industry, Japan. The basic design of the renderer is fixed in this version. Successfully, we could use Version 2 in various research projects including several SIGGRAPH/SIGGRAPH Asia paper projects. In 2019, we decided to reimplement the whole renderer and we call this version as Version 3.</p>
</div>
<div class="section" id="about-version-3">
<h2>About Version 3<a class="headerlink" href="#about-version-3" title="Permalink to this headline"></a></h2>
<p>Given the experiences and the accumulation of knowledge through various research projects, we have identified possible improvements and missing requirements or over-/under-specification of the design of Version 2. Some of them are identified and patched in the course of the projects on the top of the existing design, with suboptimal design choices that sacrifice the usability and performance of the framework. These codes are now becoming a technical debt through an accumulation of repetitive patches from each of research projects. Furthermore, some of the requirements are completely incompatible to the existing design of Version 2. In order to conduct a refactoring, at best, we could expect massive change to the existing design and implementation.</p>
<p>Therefore, we decided to overhaul the framework based on a completely new codebase rather than refactoring. We can safely say although the renderer still preserves the name and continuing version number, the internal design is completely different. Some of the design are inherited from Version 2 and some are not.</p>
</div>
<div class="section" id="citation-of-this-project">
<h2>Citation of this project<a class="headerlink" href="#citation-of-this-project" title="Permalink to this headline"></a></h2>
<p>You can use the following BibTex entry:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>@misc<span class="o">{</span>lightmetrica-v3,
<span class="nv">author</span> <span class="o">=</span> <span class="o">{</span>Hisanari Otsu<span class="o">}</span>,
<span class="nv">title</span> <span class="o">=</span> <span class="o">{</span>Lightmetrica -- Research-oriented renderer <span class="o">(</span>Version <span class="m">3</span><span class="o">)}</span>,
<span class="nv">note</span> <span class="o">=</span> <span class="o">{</span>http://lightmetrica.org<span class="o">}</span>,
<span class="nv">year</span> <span class="o">=</span> <span class="o">{</span><span class="m">2019</span><span class="o">}</span>,
<span class="o">}</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="index.html" class="btn btn-neutral float-left" title="Lightmetrica – Research-oriented renderer" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="changelog.html" class="btn btn-neutral float-right" title="Changelog" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>© Copyright 2019, Hisanari Otsu.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>