From 0b35ade185c6cdb34db3b58566748f5ebdc86aa2 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Wed, 13 Jul 2022 03:47:19 +0300 Subject: [PATCH 1/1] Added triangulation idea. --- doc/index.html | 624 +++++++++++++++++++++++-------------------------- doc/index.org | 2 + 2 files changed, 297 insertions(+), 329 deletions(-) diff --git a/doc/index.html b/doc/index.html index 70f3f5c..e02cfb9 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,12 +1,198 @@ - - + + + + + + Sixth 3D - 3D engine - - - - - + + + @@ -14,258 +200,96 @@ footer {background-color: #111 !important;} pre {background-color: #111; color: #ccc;} - - + -
-

Sixth 3D - 3D engine

+
+

Sixth 3D - 3D engine

+ -
-

1 General

+
+

1. General

-
  • Other software projects hosted at svjatoslav.eu -
  • +
  • Other software projects hosted at svjatoslav.eu
  • -
    -

    1.1 Source code

    +
    +

    1.1. Source code

    -
    -

    2 Project description

    +
    +

    2. Project description

    -In software, pure Java realtime 3D rendering engine. With the final +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.

    -Sixth 3D can be also used as standalone 3D engine in your project. +Sixth 3D can be also used as standalone 3D engine in your project.

    -
    -

    2.1 Justification for software rendering

    +
    +

    2.1. Justification for software rendering

    3D rendering is done in software, 100% pure Java on CPU. At least for @@ -286,61 +310,47 @@ pixel.

    -
    -

    2.2 Justification for Java

    +
    +

    2.2. Justification for Java

      -
    • It is easy to refactor and experiment with. -
    • +
    • It is easy to refactor and experiment with.
    • Easy portability and installation. No need to deal with platform -specific dependencies. -
    • +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). -
      • -
      -
    • +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 -
    • -
    -
  • +
  • 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. -
    • -
    -
  • +
  • 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. -
  • +operating systems.
    -
    -

    3 API documentation

    +
    +

    3. API documentation

    @@ -352,21 +362,18 @@ on documentation. So far best resource is to download and explore source code for:

    -
    -

    4 Instructions to embed Sixth-3D in your project

    +
    +

    4. Instructions to embed Sixth-3D in your project

    Maven pom.xml file snippet:

    -
    <dependencies>
         ...
         <dependency>
    @@ -394,60 +401,50 @@ For API usage examples, see 
    -

    5 TODO features to add

    +
    +

    5. TODO features to add

    -
    -

    5.1 Render only visible polygons

    +
    +

    5.1. Render only visible polygons

      -
    • This would significantly reduce RAM <-> CPU traffic. -
    • +
    • This would significantly reduce RAM <-> CPU traffic.
    • General algorithm description:
      • For each horizontal scanline:
          -
        • sort polygon edges from left to right -
        • +
        • 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. -
          • +
          • 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. -
            • -
            -
          • -
          -
        • -
        -
      • -
      -
    • +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. @@ -459,55 +456,24 @@ visible in the final scene for each frame.
  • Dynamic geometry simplification:
    • Dynamically detect and replace invisible objects from the -scene with simplified bounding box. -
    • +scene with simplified bounding box.
    • Dynamically replace boudnig box with actual object once it -becomes visible. -
    • -
    -
  • +becomes visible. + -
  • Dynamically unload unused textures from RAM. -
  • - - - - +
  • Dynamically unload unused textures from RAM.
  • + +
    -
    - diff --git a/doc/index.org b/doc/index.org index 538063d..e4c413b 100644 --- a/doc/index.org +++ b/doc/index.org @@ -122,6 +122,8 @@ For API usage examples, see [[https://www3.svjatoslav.eu/projects/sixth-3d-demos + 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 ++ Improve triangulation. Read: https://ianthehenry.com/posts/delaunay/ + + Partial region/frame repaint: when only one small object changed on the scene, it would be faster to re-render that specific area. -- 2.20.1