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 is a subproject of [[https://www3.svjatoslav.eu/projects/sixth-3d/][Sixth 3D]]:
15 - which in turn is a subproject of parent project [[https://www3.svjatoslav.eu/projects/sixth/][Sixth]].
17 - This program is free software: you can redistribute it and/or modify
18 it under the terms of the [[https://www.gnu.org/licenses/lgpl.html][GNU Lesser General Public License]] as
19 published by the Free Software Foundation, either version 3 of the
20 License, or (at your option) any later version.
24 - Homepage: https://svjatoslav.eu
25 - Email: mailto://svjatoslav@svjatoslav.eu
27 - [[https://www.svjatoslav.eu/projects/][Other software projects hosted at svjatoslav.eu]]
30 - [[https://www2.svjatoslav.eu/gitweb/?p=sixth-3d-demos.git;a=snapshot;h=HEAD;sf=tgz][Download latest snapshot in TAR GZ format]]
32 - [[https://www2.svjatoslav.eu/gitweb/?p=sixth-3d-demos.git;a=summary][Browse Git repository online]]
34 - Clone Git repository using command:
35 : git clone https://www2.svjatoslav.eu/git/sixth-3d-demos.git
38 Goal of this project is to show off capabilities and API usage of
39 [[https://www3.svjatoslav.eu/projects/sixth-3d/][Sixth 3D]] engine.
41 All [[id:5f88b493-6ab3-4659-8280-803f75dbd5e0][example scenes in this repository]] render at interactive
44 Download runnable JAR file: [[file:sixth-3d-demos.jar]]
46 To start demo application, use command:
47 : java -jar sixth-3d-demos.jar
51 |--------------------------------+--------------------------------------|
52 | cursor keys | move: left, right, forward, backward |
53 | mouse scroll wheel | move: up, down |
54 | dragging with mouse | look around |
56 * Example scenes in this repository
58 :ID: 5f88b493-6ab3-4659-8280-803f75dbd5e0
60 ** Raytracing through voxels
61 [[file:screenshots/raytracing fractal in voxel polygon hybrid scene.png]]
63 Test scene that is generated simultaneously using:
64 + conventional polygons
65 + for realtime navigation, and
67 + for on-demand raytracing
69 Instead of storing voxels in dumb [X * Y * Z] array, dynamically
70 partitioned [[https://en.wikipedia.org/wiki/Octree][octree]] is used to compress data. Press "r" key anywhere in
71 the scene to raytrace current view through compressed voxel
74 ** Conway's Game of Life
75 The Game of Life, also known simply as Life, is a cellular automaton
76 devised by the British mathematician John Horton Conway in 1970.
78 + https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
80 + 2 cell states: alive / dead
81 + Each cell sees 8 neighboring cells.
82 + If alive cell neighbors count is 2 or 3, then cell survives,
84 + Dead cell becomes alive if neighbors count is exactly 3.
86 [[file:screenshots/life.png]]
88 Current application projects 2D game grid/matrix onto three
89 dimensional space. Extra dimension (height) is used to visualize
90 history (previous iterations) using glowing dots suspended in space.
94 |--------------------------------+--------------------------------------|
95 | mouse click on the cell (cell) | toggles cell state |
96 | <space> | next iteration |
97 | ENTER | next iteeration with the history |
98 | "c" | clear the matrix |
101 [[file:screenshots/text editors.png]]
103 Initial test for creating user interfaces in 3D and:
104 + window focus handling
105 + picking objecs using mouse
106 + redirecting keyboard input to focused window
109 Window focus acts like a stack.
111 When window is clicked with the mouse, previously focused window (if
112 any) is pushed to the focus stack and new window receives focus. Red
113 frame appears around the window to indicate this.
115 When ESC key is pressed, window focus is returned to previous window
118 When any window is focused, all keyboard input is redirected to that
119 window, including cursor keys. To be able to navigate around the world
120 again, window must be unfocused first using ESC key.
124 + Improve focus handling:
125 + Perhaps add shortcut to navigate world without exiting entire
127 + Possibility to retain and reuse recently focused elements.
128 + Store user location in the world and view direction with the
129 focused window. So that when returning focus to far away object,
130 user is redirected also to proper location in the world.
131 + Possibility to store recently visited locations in the world and
133 ** Mathematical formulas
134 [[file:screenshots/mathematical formulas.png]]
136 + TODO: instead of projecting 2D visualizations onto 3D space,
137 visualize some formula using all 3 dimensions avaliable.
138 ** Sinus heightmaps and sphere
139 [[file:screenshots/sinus heightmaps and sphere.png]]
141 Simple test scene. Easy to implement and looks nice.