4 <title>3D Synthezier</title>
5 <!-- 2018-06-20 Wed 16:08 -->
7 <meta name="viewport" content="width=device-width, initial-scale=1">
8 <meta name="generator" content="Org-mode">
9 <meta name="author" content="Svjatoslav Agejenko">
10 <link href="https://bootswatch.com/4/darkly/bootstrap.min.css" rel="stylesheet">
11 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
12 <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js"></script>"
13 <style type="text/css">
14 footer {background-color: #111 !important;}
15 pre {background-color: #111; color: #ccc;}
17 <style type="text/css">
18 /* org mode styles on top of twbs */
35 background-color: #f5f5f5;
62 display: inline-block;
74 .bs-docs-sidebar.affix {
77 @media (min-width: 768px) {
83 /* All levels of nav */
84 .bs-docs-sidebar .nav > li > a {
91 .bs-docs-sidebar .nav > li > a:hover,
92 .bs-docs-sidebar .nav > li > a:focus {
95 text-decoration: none;
96 background-color: transparent;
97 border-left: 1px solid #A1283B;
99 .bs-docs-sidebar .nav > .active > a,
100 .bs-docs-sidebar .nav > .active:hover > a,
101 .bs-docs-sidebar .nav > .active:focus > a {
105 background-color: transparent;
106 border-left: 2px solid #A1283B;
109 /* Nav: second level (shown on .active) */
110 .bs-docs-sidebar .nav .nav {
111 display: none; /* Hide by default, but at >768px, show it */
112 padding-bottom: 10px;
114 .bs-docs-sidebar .nav .nav > li > a {
121 .bs-docs-sidebar .nav .nav > li > a:hover,
122 .bs-docs-sidebar .nav .nav > li > a:focus {
125 .bs-docs-sidebar .nav .nav > .active > a,
126 .bs-docs-sidebar .nav .nav > .active:hover > a,
127 .bs-docs-sidebar .nav .nav > .active:focus > a {
132 /* Nav: third level (shown on .active) */
133 .bs-docs-sidebar .nav .nav .nav {
134 padding-bottom: 10px;
136 .bs-docs-sidebar .nav .nav .nav > li > a {
143 .bs-docs-sidebar .nav .nav .nav > li > a:hover,
144 .bs-docs-sidebar .nav .nav .nav > li > a:focus {
147 .bs-docs-sidebar .nav .nav .nav > .active > a,
148 .bs-docs-sidebar .nav .nav .nav > .active:hover > a,
149 .bs-docs-sidebar .nav .nav .nav > .active:focus > a {
154 /* Show and affix the side nav when space allows it */
155 @media (min-width: 992px) {
156 .bs-docs-sidebar .nav > .active > ul {
159 /* Widen the fixed sidebar */
160 .bs-docs-sidebar.affix,
161 .bs-docs-sidebar.affix-bottom {
164 .bs-docs-sidebar.affix {
165 position: fixed; /* Undo the static from mobile first approach */
168 .bs-docs-sidebar.affix-bottom {
169 position: absolute; /* Undo the static from mobile first approach */
171 .bs-docs-sidebar.affix .bs-docs-sidenav,.bs-docs-sidebar.affix-bottom .bs-docs-sidenav {
176 @media (min-width: 1200px) {
177 /* Widen the fixed sidebar again */
178 .bs-docs-sidebar.affix-bottom,
179 .bs-docs-sidebar.affix {
184 <script type="text/javascript">
188 $('.bs-docs-sidebar li').first().addClass('active');
190 $(document.body).scrollspy({target: '.bs-docs-sidebar'});
192 $('.bs-docs-sidebar').affix();
197 <div id="content" class="container">
198 <div class="row"><div class="col-md-9"><h1 class="title">3D Synthezier</h1>
201 <li>This software is part of <a href="../../../../index.html">QBasic apps package</a>.
206 Parses scene definition language and creates 3D world based on
207 it. Result will be in a <a href="https://en.wikipedia.org/wiki/Wavefront_.obj_file">wavefront obj file</a>, witch can be then
208 visualized using external renderer.
212 Basic concept of defining scene is:
215 <li>Simple and primitive objects are created on point and polygon level.
217 <li>More complex ones can be created my combinig already existing ones,
218 while applying various transformations on them.
223 Objects with all its subobjects can be rotated, mirrored or resized
224 omong any axis. Generator has built in cache for data input and output
225 to minimize file access.
228 <div id="outline-container-sec-1" class="outline-2">
229 <h2 id="sec-1"><span class="section-number-2">1</span> System requirements</h2>
230 <div class="outline-text-2" id="text-1">
231 <table class="table table-striped table-bordered table-hover table-condensed">
241 <th scope="col" class="text-left">software</th>
242 <th scope="col" class="text-right">preferred version</th>
247 <td class="text-left">DOS</td>
248 <td class="text-right">6.22</td>
252 <td class="text-left">QBasic</td>
253 <td class="text-right">4.5</td>
259 <div id="outline-container-sec-2" class="outline-2">
260 <h2 id="sec-2"><span class="section-number-2">2</span> Installation</h2>
261 <div class="outline-text-2" id="text-2">
263 <li>Unpack ZIP file in any folder.
265 <li>update include path inside bin/3dparse.bas
269 <div id="outline-container-sec-2-0-1" class="outline-4">
270 <h4 id="sec-2-0-1"><span class="section-number-4">2.0.1</span> Directory layout</h4>
271 <div class="outline-text-4" id="text-2-0-1">
275 <li>3dparse.bas - 3D generator main executable
277 <li>city1.3d - city with square-like buildings
279 <li>city2.3d - city with hexangular buildings
281 <li>result.mtl - shared material library
283 <li>*.bat - quick launch scripts
288 <li>include - 3D objects used to compose the scene
294 <div id="outline-container-sec-3" class="outline-2">
295 <h2 id="sec-3"><span class="section-number-2">3</span> Scene description language</h2>
296 <div class="outline-text-2" id="text-3">
298 (read examples…)
302 <pre class="example">
309 <pre class="example">
316 <pre class="example">
320 defines new polygon, p4 may be unused
324 <pre class="example">
328 displays warning message, and wait for key
331 <pre class="example">
338 <pre class="example">
345 <pre class="example">
349 selects random material from list
352 <pre class="example">
353 obj object xz45 xy20 x+3 y*2
356 includes sub object, can be rotated moved or resized, across X Y Z. If
357 object name begin vith ~ then it will be loaded from current
358 directory. if object name ends with ~ then object will be parsed
359 directly from file, and not chached, to allow loading of greater than
365 <p><img src="rotation.png" class="img-responsive" alt="rotation.png">
370 <pre class="example">
374 select random command to execute, ^ will be converted to spaces.
377 <pre class="example">
384 <pre class="example">
388 specify output file name, must be first command
391 <pre class="example">
392 set variable contents
395 set variable contents, variable must be number, contents can be
396 string. max variables is 100. first is 0.
399 <pre class="example">
400 anycommand %1 anything
403 inserts variable 1 contents info line
406 <pre class="example">
407 cmp flag string1 string2
410 compares strings, and inserts TRUE to flag, if they are equal, else inserts FALSE. max 9 falgs, 0 first. Each subobject has its own flags.
413 <pre class="example">
417 executes command if flag is true.
421 exapmle: ?3 obj car z*2 xy45
424 <pre class="example">
428 dummy function, does notheing
433 <div id="outline-container-sec-4" class="outline-2">
434 <h2 id="sec-4"><span class="section-number-2">4</span> Usage</h2>
435 <div class="outline-text-2" id="text-4">
437 Make sure you have QB binaries in your PATH. Execute
439 <pre class="example">
445 <pre class="example">
449 to generate example cities. After parsing is finished, appropriate
450 *.obj files will appear in the bin directory holding generated scene.
451 Visualize scene with your favourite renderer.
455 <div id="outline-container-sec-5" class="outline-2">
456 <h2 id="sec-5"><span class="section-number-2">5</span> Examples</h2>
457 <div class="outline-text-2" id="text-5">
459 Download Blender files:
461 <table class="table table-striped table-bordered table-hover table-condensed">
471 <th scope="col" class="text-left">file</th>
472 <th scope="col" class="text-left">size</th>
477 <td class="text-left"><a href="rectangular city.blend">rectangular city.blend</a></td>
478 <td class="text-left">3.6 MB</td>
482 <td class="text-left"><a href="hexagonal city.blend">hexagonal city.blend</a></td>
483 <td class="text-left">21 MB</td>
489 They were produced by importing generated <a href="https://en.wikipedia.org/wiki/Wavefront_.obj_file">wavefront obj files</a> into
490 <a href="https://www.blender.org/">Blender</a>.
494 <div id="outline-container-sec-5-1" class="outline-3">
495 <h3 id="sec-5-1"><span class="section-number-3">5.1</span> Rectangular city</h3>
496 <div class="outline-text-3" id="text-5-1">
499 <p><img src="rectangular city, 1.jpeg" class="img-responsive" alt="rectangular city, 1.jpeg">
505 <p><img src="rectangular city, 2.jpeg" class="img-responsive" alt="rectangular city, 2.jpeg">
511 <p><img src="rectangular city, 3.jpeg" class="img-responsive" alt="rectangular city, 3.jpeg">
516 <div id="outline-container-sec-5-2" class="outline-3">
517 <h3 id="sec-5-2"><span class="section-number-3">5.2</span> Hexagonal city</h3>
518 <div class="outline-text-3" id="text-5-2">
521 <p><img src="hexagonal city, 1.jpeg" class="img-responsive" alt="hexagonal city, 1.jpeg">
527 <p><img src="hexagonal city, 2.jpeg" class="img-responsive" alt="hexagonal city, 2.jpeg">
533 <p><img src="hexagonal city, 3.jpeg" class="img-responsive" alt="hexagonal city, 3.jpeg">
539 </div><div class="col-md-3"><nav id="table-of-contents">
540 <div id="text-table-of-contents" class="bs-docs-sidebar">
542 <li><a href="#sec-1">1. System requirements</a></li>
543 <li><a href="#sec-2">2. Installation</a></li>
544 <li><a href="#sec-3">3. Scene description language</a></li>
545 <li><a href="#sec-4">4. Usage</a></li>
546 <li><a href="#sec-5">5. Examples</a>
548 <li><a href="#sec-5-1">5.1. Rectangular city</a></li>
549 <li><a href="#sec-5-2">5.2. Hexagonal city</a></li>
556 <footer id="postamble" class="">
557 <div><p class="author">Author: Svjatoslav Agejenko</p>
558 <p class="date">Created: 2018-06-20 Wed 16:08</p>
559 <p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 25.1.1 (<a href="http://orgmode.org">Org-mode</a> 8.2.10)</p>