1 #+TITLE: Sixth 3D engine demos
3 * (document settings) :noexport:
4 ** use dark style for TWBS-HTML exporter
5 #+HTML_HEAD: <link href="https://bootswatch.com/3/darkly/bootstrap.min.css" rel="stylesheet">
6 #+HTML_HEAD: <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
7 #+HTML_HEAD: <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
8 #+HTML_HEAD: <style type="text/css">
9 #+HTML_HEAD: footer {background-color: #111 !important;}
10 #+HTML_HEAD: pre {background-color: #111; color: #ccc;}
14 - This program is free software: released under Creative Commons Zero
19 - Homepage: https://svjatoslav.eu
20 - Email: mailto://svjatoslav@svjatoslav.eu
22 - [[https://www.svjatoslav.eu/projects/][Other software projects hosted at svjatoslav.eu]]
25 - [[https://www2.svjatoslav.eu/gitweb/?p=sixth-3d-demos.git;a=snapshot;h=HEAD;sf=tgz][Download latest snapshot in TAR GZ format]]
27 - [[https://www2.svjatoslav.eu/gitweb/?p=sixth-3d-demos.git;a=summary][Browse Git repository online]]
29 - Clone Git repository using command:
30 : git clone https://www2.svjatoslav.eu/git/sixth-3d-demos.git
33 Goal of this project is to show off capabilities and API usage of
34 [[https://www3.svjatoslav.eu/projects/sixth-3d/][Sixth 3D]] engine.
36 All [[id:5f88b493-6ab3-4659-8280-803f75dbd5e0][example scenes in this repository]] render at interactive
39 Download runnable JAR file: [[file:sixth-3d-demos.jar]]
41 To start demo application, use command:
42 : java -jar sixth-3d-demos.jar
46 |--------------------------------+--------------------------------------|
47 | cursor keys | move: left, right, forward, backward |
48 | mouse scroll wheel | move: up, down |
49 | dragging with mouse | look around |
51 * Example scenes in this repository
53 :ID: 5f88b493-6ab3-4659-8280-803f75dbd5e0
55 ** Raytracing through voxels
56 [[file:screenshots/raytracing fractal in voxel polygon hybrid scene.png]]
58 Test scene that is generated simultaneously using:
59 + conventional polygons
60 + for realtime navigation, and
62 + for on-demand raytracing
64 Instead of storing voxels in dumb [X * Y * Z] array, dynamically
65 partitioned [[https://en.wikipedia.org/wiki/Octree][octree]] is used to compress data. Press "r" key anywhere in
66 the scene to raytrace current view through compressed voxel
69 ** Conway's Game of Life
70 The Game of Life, also known simply as Life, is a cellular automaton
71 devised by the British mathematician John Horton Conway in 1970.
73 + https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
75 + 2 cell states: alive / dead
76 + Each cell sees 8 neighboring cells.
77 + If alive cell neighbors count is 2 or 3, then cell survives,
79 + Dead cell becomes alive if neighbors count is exactly 3.
81 [[file:screenshots/life.png]]
83 Current application projects 2D game grid/matrix onto three
84 dimensional space. Extra dimension (height) is used to visualize
85 history (previous iterations) using glowing dots suspended in space.
89 |--------------------------------+--------------------------------------|
90 | mouse click on the cell (cell) | toggles cell state |
91 | <space> | next iteration |
92 | ENTER | next iteeration with the history |
93 | "c" | clear the matrix |
96 [[file:screenshots/text editors.png]]
98 Initial test for creating user interfaces in 3D and:
99 + window focus handling
100 + picking objecs using mouse
101 + redirecting keyboard input to focused window
104 Window focus acts like a stack.
106 When window is clicked with the mouse, previously focused window (if
107 any) is pushed to the focus stack and new window receives focus. Red
108 frame appears around the window to indicate this.
110 When ESC key is pressed, window focus is returned to previous window
113 When any window is focused, all keyboard input is redirected to that
114 window, including cursor keys. To be able to navigate around the world
115 again, window must be unfocused first using ESC key.
119 + Improve focus handling:
120 + Perhaps add shortcut to navigate world without exiting entire
122 + Possibility to retain and reuse recently focused elements.
123 + Store user location in the world and view direction with the
124 focused window. So that when returning focus to far away object,
125 user is redirected also to proper location in the world.
126 + Possibility to store recently visited locations in the world and
128 ** Mathematical formulas
129 [[file:screenshots/mathematical formulas.png]]
131 + TODO: instead of projecting 2D visualizations onto 3D space,
132 visualize some formula using all 3 dimensions avaliable.
133 ** Sinus heightmaps and sphere
134 [[file:screenshots/sinus heightmaps and sphere.png]]
136 Simple test scene. Easy to implement and looks nice.