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 [[http://www3.svjatoslav.eu/projects/sixth-3d/][Sixth 3D]] which in turn is a subproject of
15 [[http://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: http://svjatoslav.eu
25 - Email: mailto://svjatoslav@svjatoslav.eu
27 - [[http://www.svjatoslav.eu/projects/][Other software projects hosted at svjatoslav.eu]]
30 - [[http://www2.svjatoslav.eu/gitweb/?p=sixth-3d-demos.git;a=snapshot;h=HEAD;sf=tgz][Download latest snapshot in TAR GZ format]]
32 - [[http://www2.svjatoslav.eu/gitweb/?p=sixth-3d-demos.git;a=summary][Browse Git repository online]]
34 - Clone Git repository using command:
35 : git clone http://www2.svjatoslav.eu/git/sixth-3d-demos.git
38 Goal of this project is to show off capabilities and API usage of
39 [[http://www3.svjatoslav.eu/projects/sixth-3d/][Sixth 3D]] engine.
41 All sample scenes below are rendered at interactive framerates.
44 |--------------------------------+--------------------------------------|
45 | cursor keys | move: left, right, forward, backward |
46 | mouse scroll wheel | move: up, down |
47 | dragging with mouse | look around |
50 ** Raytracing through voxels
51 [[file:screenshots/raytracing fractal in voxel polygon hybrid scene.png]]
53 Test scene that is generated simultaneously using:
54 + conventional polygons
55 + for realtime navigation, and
57 + for on-demand raytracing
59 Instead of storing voxels in dumb [X * Y * Z] array, dynamically
60 partitioned [[https://en.wikipedia.org/wiki/Octree][octree]] is used to compress data. Press "r" key anywhere in
61 the scene to raytrace current view through compressed voxel
64 ** Conway's Game of Life
65 The Game of Life, also known simply as Life, is a cellular automaton
66 devised by the British mathematician John Horton Conway in 1970.
68 + https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
70 + 2 cell states: alive / dead
71 + Each cell sees 8 neighboring cells.
72 + If alive cell neighbors count is 2 or 3, then cell survives,
74 + Dead cell becomes alive if neighbors count is exactly 3.
76 [[file:screenshots/life.png]]
78 Current application projects 2D game grid/matrix onto three
79 dimensional space. Extra dimension (height) is used to visualize
80 history (previous iterations) using glowing dots suspended in space.
84 |--------------------------------+--------------------------------------|
85 | mouse click on the cell (cell) | toggles cell state |
86 | <space> | next iteration |
87 | ENTER | next iteeration with the history |
88 | "c" | clear the matrix |
91 [[file:screenshots/text editors.png]]
93 Initial test for creating user interfaces in 3D and:
94 + window focus handling
95 + picking objecs using mouse
96 + redirecting keyboard input to focused window
99 Window focus acts like a stack.
101 When window is clicked with the mouse, previously focused window (if
102 any) is pushed to the focus stack and new window receives focus. Red
103 frame appears around the window to indicate this.
105 When ESC key is pressed, window focus is returned to previous window
108 When any window is focused, all keyboard input is redirected to that
109 window, including cursor keys. To be able to navigate around the world
110 again, window must be unfocused first using ESC key.
114 + Improve focus handling:
115 + Perhaps add shortcut to navigate world without exiting entire
117 + Possibility to retain and reuse recently focused elements.
118 + Store user location in the world and view direction with the
119 focused window. So that when returning focus to far away object,
120 user is redirected also to proper location in the world.
121 + Possibility to store recently visited locations in the world and
123 ** Mathematical formulas
124 [[file:screenshots/mathematical formulas.png]]
126 + TODO: instead of projecting 2D visualizations onto 3D space,
127 visualize some formula using all 3 dimensions avaliable.
128 ** Sinus heightmaps and sphere
129 [[file:screenshots/sinus heightmaps and sphere.png]]
131 Simple test scene. Easy to implement and looks nice.