X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=doc%2Findex.html;h=0a04257c17f80a2fe195ad6d20f216fd39de2be3;hb=28aff57371061764b5c01fcc535f621824a62c2d;hp=68eafc00ad2bde46f11259e172050ccfe42f7f64;hpb=439e676d68b70ed18dc2ca83c1581d635228a49f;p=sixth-3d.git diff --git a/doc/index.html b/doc/index.html index 68eafc0..0a04257 100644 --- a/doc/index.html +++ b/doc/index.html @@ -2,7 +2,7 @@ Sixth 3D - 3D engine - + @@ -220,67 +220,123 @@ published by the Free Software Foundation. -
  • other applications hosted at svjatoslav.eu +
  • other applications hosted at svjatoslav.eu
  • 1 Project description

    -

    -In software, pure Java realtime 3D rendering engine. With the final goal of -becoming a platform for buildng 3D user interfaces. -

    - +

    +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. +

    +
    + +
    +

    1.1 Justification for software rendering

    +
    +

    +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. +

    + +

    +CPU rendering performance is already good enough to implement usable +3D UI at sufficient detail level, resolution and frame rate. +

    -System is implemented in Java because: +Also CPU rendering allows to freely test different rendering and +optimization algorithms and retains complete control of every rendered +pixel.

    +
    +
    +
    +

    1.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).
      • -
      • It is easy to refactor and experiment with. +
      +
    • + +
    • No limitations imposed by: +
        +
      • requirement for decent GPU
      • -
      • It is fast enough thanks to Java virtual machine just-in-time compiler. +
      • GPU missing features
      • -
      • Easy to run on various hardware platforms and operating systems. +
      • GPU missing/incomplete/buggy drivers +
      • +
      • OpenGL specification
      +
    • -

      -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. -

      +
    • It is fast enough thanks to: +
        +
      • Java virtual machine just-in-time compiler. +
      • +
      • Growing CPU cores count. +
      • +
      +
    • -

      -CPU rendering performance is already good enough to implement usable 3D UI at -sufficient detail level, resolution and frame rate. -

      +
    • As a result it is easy to run on various hardware platforms and +operating systems. +
    • +
    +
    +
    +
    +
    +

    2 TODO API documentation

    +

    -Pure Java also means easy portability and installation. No need to deal with -platform specific dependencies. +Documentation currently missing for the lack of time.

    -Also CPU rendering allows to easily test different rendering algorithms and -retains complete control of every rendered pixel. +So far best resource is to download and explore source code for:

    +
    - -
    -

    2 Software development

    -
    +
    +

    3 Instructions to embed Sixth-3D in your project

    +

    -Instructions to embed Sixth-3D in your project as a library. Maven *pom.xml* -file snippet: +Maven *pom.xml* file snippet:

    @@ -289,7 +345,7 @@ file snippet: <dependency> <groupId>eu.svjatoslav</groupId> <artifactId>sixth-3d</artifactId> - <version>1.0</version> + <version>1.1</version> </dependency> ... </dependencies> @@ -307,23 +363,108 @@ file snippet:

    -See generated code graph using this tool. +For API usage examples, see demos.

    +
    +

    4 TODO features to add

    +
    +
      +
    • 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. +
          • +
          +
        • +
        +
      • +
      +
    • +
    +
    +