1 #+TITLE: Sixth 3D engine demos
4 - This is a subproject of [[http://www3.svjatoslav.eu/projects/sixth-3d/][Sixth 3D]] which in turn is a subproject of
5 [[http://www3.svjatoslav.eu/projects/sixth/][Sixth]].
7 - Clone GIT repository using command:
8 : git clone http://www2.svjatoslav.eu/git/sixth-3d-demos.git
10 - [[http://www2.svjatoslav.eu/gitweb/?p=sixth-3d-demos.git;a=snapshot;h=HEAD;sf=tgz][Download latest snapshot in TAR GZ format]]
12 + This program is free software: you can redistribute it and/or modify
13 it under the terms of the [[https://www.gnu.org/licenses/lgpl.html][GNU Lesser General Public License]] as
14 published by the Free Software Foundation, either version 3 of the
15 License, or (at your option) any later version.
19 - Homepage: http://svjatoslav.eu
20 - Email: mailto://svjatoslav@svjatoslav.eu
22 - [[http://www.svjatoslav.eu/projects/][Other software projects hosted at svjatoslav.eu]]
24 * (document settings) :noexport:
25 ** use dark style for TWBS-HTML exporter
26 #+HTML_HEAD: <link href="https://bootswatch.com/4/darkly/bootstrap.min.css" rel="stylesheet">
27 #+HTML_HEAD: <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
28 #+HTML_HEAD: <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js"></script>"
29 #+HTML_HEAD: <style type="text/css">
30 #+HTML_HEAD: footer {background-color: #111 !important;}
31 #+HTML_HEAD: pre {background-color: #111; color: #ccc;}
35 Goal of this project is to show off capabilities and API usage of
36 [[http://www3.svjatoslav.eu/projects/sixth-3d/][Sixth 3D]] engine.
38 All sample scenes below are rendered at interactive framerates.
41 |--------------------------------+--------------------------------------|
42 | cursor keys | move: left, right, forward, backward |
43 | mouse scroll wheel | move: up, down |
44 | dragging with mouse | look around |
47 ** Raytracing through voxels
48 [[file:screenshots/raytracing fractal in voxel polygon hybrid scene.png]]
50 Test scene that is generated simultaneously using:
51 + conventional polygons
52 + for realtime navigation, and
54 + for on-demand raytracing
56 Instead of storing voxels in dumb [X * Y * Z] array, dynamically
57 partitioned [[https://en.wikipedia.org/wiki/Octree][octree]] is used to compress data. Press "r" key anywhere in
58 the scene to raytrace current view through compressed voxel
61 ** Conway's Game of Life
62 The Game of Life, also known simply as Life, is a cellular automaton
63 devised by the British mathematician John Horton Conway in 1970.
65 + https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
67 + 2 cell states: alive / dead
68 + Each cell sees 8 neighboring cells.
69 + If alive cell neighbors count is 2 or 3, then cell survives,
71 + Dead cell becomes alive if neighbors count is exactly 3.
73 [[file:screenshots/life.png]]
75 Current application projects 2D game grid/matrix onto three
76 dimensional space. Extra dimension (height) is used to visualize
77 history (previous iterations) using glowing dots suspended in space.
81 |--------------------------------+--------------------------------------|
82 | mouse click on the cell (cell) | toggles cell state |
83 | <space> | next iteration |
84 | ENTER | next iteeration with the history |
85 | "c" | clear the matrix |
88 [[file:screenshots/text editors.png]]
90 Initial test for creating user interfaces in 3D and:
91 + window focus handling
92 + picking objecs using mouse
93 + redirecting keyboard input to focused window
96 Window focus acts like a stack.
98 When window is clicked with the mouse, previously focused window (if
99 any) is pushed to the focus stack and new window receives focus. Red
100 frame appears around the window to indicate this.
102 When ESC key is pressed, window focus is returned to previous window
105 When any window is focused, all keyboard input is redirected to that
106 window, including cursor keys. To be able to navigate around the world
107 again, window must be unfocused first using ESC key.
111 + Improve focus handling:
112 + Perhaps add shortcut to navigate world without exiting entire
114 + Possibility to retain and reuse recently focused elements.
115 + Store user location in the world and view direction with the
116 focused window. So that when returning focus to far away object,
117 user is redirected also to proper location in the world.
118 + Possibility to store recently visited locations in the world and
120 ** Mathematical formulas
121 [[file:screenshots/mathematical formulas.png]]
123 + TODO: instead of projecting 2D visualizations onto 3D space,
124 visualize some formula using all 3 dimensions avaliable.
125 ** Sinus heightmaps and sphere
126 [[file:screenshots/sinus heightmaps and sphere.png]]
128 Simple test scene. Easy to implement and looks nice.