<html lang="en">
<head>
<title>Sixth 3D - 3D engine</title>
-<!-- 2019-11-03 Sun 09:29 -->
+<!-- 2020-01-29 K 21:30 -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="Org-mode">
<h2 id="sec-1"><span class="section-number-2">1</span> General</h2>
<div class="outline-text-2" id="text-1">
<ul class="org-ul">
-<li>This is a subproject of <a href="https://www3.svjatoslav.eu/projects/sixth/">Sixth</a>
+<li>This is a subproject of parent project: <a href="https://www3.svjatoslav.eu/projects/sixth/">Sixth</a>.
</li>
<li>This program is free software: you can redistribute it and/or modify
expensive for every frame, it could be used only for last frame
before animations become still and waiting for user input starts.
</li>
-
-<li>Render only visible polygons.
+</ul>
+</div>
+<div id="outline-container-sec-5-1" class="outline-3">
+<h3 id="sec-5-1"><span class="section-number-3">5.1</span> Render only visible polygons</h3>
+<div class="outline-text-3" id="text-5-1">
<ul class="org-ul">
<li>This would significantly reduce RAM <-> CPU traffic.
</li>
</ul>
</li>
</ul>
-</li>
-</ul>
+</div>
</div>
</div>
</div><div class="col-md-3"><nav id="table-of-contents">
</li>
<li><a href="#sec-3">3. API documentation</a></li>
<li><a href="#sec-4">4. Instructions to embed Sixth-3D in your project</a></li>
-<li><a href="#sec-5">5. features to add</a></li>
+<li><a href="#sec-5">5. features to add</a>
+<ul class="nav">
+<li><a href="#sec-5-1">5.1. Render only visible polygons</a></li>
+</ul>
+</li>
</ul>
</div>
</nav>
</div></div></div>
<footer id="postamble" class="">
<div><p class="author">Author: Svjatoslav Agejenko</p>
-<p class="date">Created: 2019-11-03 Sun 09:29</p>
+<p class="date">Created: 2020-01-29 K 21:30</p>
<p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 26.1 (<a href="http://orgmode.org">Org-mode</a> 9.1.9)</p>
</div>
</footer>
#+HTML_HEAD: </style>
* General
-- This is a subproject of [[https://www3.svjatoslav.eu/projects/sixth/][Sixth]]
+- This is a subproject of parent project: [[https://www3.svjatoslav.eu/projects/sixth/][Sixth]].
- This program is free software: you can redistribute it and/or modify
it under the terms of the [[https://www.gnu.org/licenses/lgpl.html][GNU Lesser General Public License]] as
+ Antialiazing. Would improve text readability. If antialiazing is too
expensive for every frame, it could be used only for last frame
before animations become still and waiting for user input starts.
+** Render only visible polygons
++ This would significantly reduce RAM <-> CPU traffic.
-+ Render only visible polygons.
- + This would significantly reduce RAM <-> CPU traffic.
++ General algorithm description:
+ + For each horizontal scanline:
+ + sort polygon edges from left to right
+ + while iterating and drawing pixels over screen X axis (left to
+ right) track next appearing/disappearing polygons.
+ + For each polygon edge update Z sorted active polygons list.
+ + Only draw pixel from the top-most polygon.
+ + Only if polygon area is transparent/half-transparent add
+ colors from the polygons below.
- + General algorithm description:
- + For each horizontal scanline:
- + sort polygon edges from left to right
- + while iterating and drawing pixels over screen X axis (left to
- right) track next appearing/disappearing polygons.
- + For each polygon edge update Z sorted active polygons list.
- + Only draw pixel from the top-most polygon.
- + Only if polygon area is transparent/half-transparent add
- colors from the polygons below.
++ As a bonus, this would allow to track which polygons are really
+ visible in the final scene for each frame.
- + As a bonus, this would allow to track which polygons are really
- visible in the final scene for each frame.
+ + Such information allows further optimizations:
- + Such information allows further optimizations:
+ + Dynamic geometry simplification:
+ + Dynamically detect and replace invisible objects from the
+ scene with simplified bounding box.
- + Dynamic geometry simplification:
- + Dynamically detect and replace invisible objects from the
- scene with simplified bounding box.
+ + Dynamically replace boudnig box with actual object once it
+ becomes visible.
- + Dynamically replace boudnig box with actual object once it
- becomes visible.
-
- + Dynamically unload unused textures from RAM.
+ + Dynamically unload unused textures from RAM.