X-Git-Url: http://www2.svjatoslav.eu/gitweb/?p=sixth-3d.git;a=blobdiff_plain;f=doc%2Findex.html;h=21d631df414d63930622650246fbe64b21ef1a33;hp=bc0b77d239a4ff6d1689201d88290917a4060b84;hb=a8f54d698199d45920ad60e40629e52fd8c30340;hpb=a65ed3cb6ef4b898af31326d86d8a2f799e8ee6f diff --git a/doc/index.html b/doc/index.html index bc0b77d..21d631d 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,267 +1,512 @@ - - - + + - - - Sixth 3D - 3D engine - - + + + + + + + + + - -
-

Sixth 3D - 3D engine

-
-

Table of Contents

- -
-
- +
+
+

1.1 Source code

+
+
+
+

2 Project description

+
+

-System is implemented in Java because: +In software, pure Java realtime 3D rendering engine. With the final +goal of becoming a platform for buildng 3D user interfaces and +interactive data visualization for project Sixth.

-
    -
  • It scales well to handle great complexity.
  • -
  • It is easy to refactor and experiment with.
  • -
  • It is fast enough thanks to Java virtual machine just-in-time compiler.
  • -
  • Easy to run on various hardware platforms and operating systems.
  • -

-3D rendering is done in software, 100% pure Java on CPU. At least for now. -Modern CPU cores count keeps growing and therefore rendering by CPU is not as -expensive as it used to be for the old single core systems. +Sixth 3D can be also used as standalone 3D engine in your project.

+
+
+

2.1 Justification for software rendering

+

-CPU rendering performance is already good enough to implement usable 3D UI at -sufficient detail level, resolution and frame rate. +3D rendering is done in software, 100% pure Java on CPU. At least for +now. Modern CPU cores count keeps growing and therefore rendering by +CPU is not as expensive as it used to be for the old single core +systems.

-Pure Java also means easy portability and installation. No need to deal with -platform specific dependencies. +CPU rendering performance is already good enough to implement usable +3D UI at sufficient detail level, resolution and frame rate.

-Also CPU rendering allows to easily test different rendering algorithms and -retains complete control of every rendered pixel. +Also CPU rendering allows to freely test different rendering and +optimization algorithms and retains complete control of every rendered +pixel.

+
+

2.2 Justification for Java

+
+
    +
  • It is easy to refactor and experiment with. +
  • + +
  • Easy portability and installation. No need to deal with platform +specific dependencies. +
  • + +
  • It scales well to handle great complexity. +
      +
    • Allows to implement clever performance optimizations (instead of +going for GPU offered brute-force rendering approach). +
    • +
    +
  • + +
  • No limitations imposed by: +
      +
    • requirement for decent GPU +
    • +
    • GPU missing features +
    • +
    • GPU missing/incomplete/buggy drivers +
    • +
    • OpenGL specification +
    • +
    +
  • + +
  • It is fast enough thanks to: +
      +
    • Java virtual machine just-in-time compiler. +
    • +
    • Growing CPU cores count. +
    • +
    +
  • + +
  • As a result it is easy to run on various hardware platforms and +operating systems. +
  • +
+
+
+
+ +
+

3 API documentation

+
+ -
-

2 Software development

-

-Instructions to embed Sixth-3D in your project as a library. Maven *pom.xml* -file snippet: +Note: due to a lack of time, there is still big room for improvement +on documentation. +

+ +

+So far best resource is to download and explore source code for: +

+ +
+
+
+

4 Instructions to embed Sixth-3D in your project

+
+

+Maven *pom.xml* file snippet:

-
<dependencies>
+
<dependencies>
     ...
-    <dependency>
-        <groupId>eu.svjatoslav</groupId>
-        <artifactId>sixth-3d</artifactId>
-        <version>1.0</version>
-    </dependency>
+    <dependency>
+        <groupId>eu.svjatoslav</groupId>
+        <artifactId>sixth-3d</artifactId>
+        <version>1.1</version>
+    </dependency>
     ...
-</dependencies>
+</dependencies>
 
-<repositories>
+<repositories>
     ...
-    <repository>
-        <id>svjatoslav.eu</id>
-        <name>Svjatoslav repository</name>
-        <url>http://www2.svjatoslav.eu/maven/</url>
-    </repository>
+    <repository>
+        <id>svjatoslav.eu</id>
+        <name>Svjatoslav repository</name>
+        <url>http://www2.svjatoslav.eu/maven/</url>
+    </repository>
     ...
-</repositories>
+</repositories>
 

-Auto-generated graphs for parts of Sixth-3D code/architecture using this tool +For API usage examples, see demos.

+
+

5 TODO features to add

+
+
    +
  • read this as example, and apply improvements/fixes where applicable: +http://blog.rogach.org/2015/08/how-to-create-your-own-simple-3d-render.html +
  • + +
  • Partial region/frame repaint: when only one small object changed on +the scene, it would be faster to re-render that specific area. +
  • + +
  • Once partial rendering works, in would be easy to add multi-core +rendering support. So that each core renders it's own region of the +screen. +
  • + +
  • 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. +
    • + +
    • 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. + +
        +
      • Such information allows further optimizations: + +
          +
        • 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 unload unused textures from RAM. +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
+
+