-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
116 lines (103 loc) · 7.24 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html><html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Irregular Grid</title>
<style>
*{ font-family: monospace; font-size:16px; }
body{ display:flex; flex-direction:column; align-items:center; }
div{ width:75vw; }
hr{ border-top:2px dotted gray; height:0px; }
</style>
</head>
<body>
<div>
<p>
Irregular grids was first introduced by Oskar Stålberg. It's the basis for an indy game of his own
creation nammed Townscaper. The main idea was to use algorithms like wave function collapse & marching cubes to create a simple
game that allows users to procedurally generate little towns by selecting where on a grid to place 3d tiles. Instead of using
voxel grids, irregular grids was used to create shapes and paths that are more organize and varied then normal grids.
</p>
<p>
The main goal of this repo is purely for education for anyone with an interest in procedural generation. The hopes is to create
a good collection of examples & information to implement and use irregular grids in the way Oskar does. In these examples a custom
"Half Edge" data structure was created as the backbone in generating the grid and a 3D mesh with easy access to various linkages
between vertices, edges, triangles and faces.
</p>
<p>
<b>Source Code</b> : <a href="https://github.com/sketchpunklabs/irregular_grid">https://github.com/sketchpunklabs/irregular_grid</a>
</p>
<hr>
<!---<img src="img/head2.png" width="200px" align="right">--->
<b>Misc</b>
<ul>
<li><a href="demo.html">All Three Animated Demo</a></li>
<li><a href="bvh.html">Boundary Volume Hierarchy (BVH) Demo</a></li>
<li><a href="trilinear_lerp.html">Trilinear Interpolation ( Cube Tiles )</a></li>
<li><a href="barycentric_lerp.html">Barycentric Interpolation ( Triangle Tiles )</a></li>
<li><a href="marchingcubes.html">Marching Cubes ( Mesh Generator )</a></li>
<li><a href="marchingcubes_3dtiles.html">Marching Cubes ( 3D Tiles )</a></li>
<li><a href="tile_view.html">Tile View</a></li>
<li><a href="hex_tile_lerp.html">Fit cube tile on irregular grid with trilinear interpolation</a></li>
<li>Hex Grid UI Playground [PLANNED]</li>
<li>Wave Function Collapse Auto Generator [PLANNED]</li>
</ul>
<b>Hex Plane</b>
<ul>
<li><a href="hex_basic.html">Basic Example</a></li>
<li><a href="hex_basic_anim.html">Relax Animated</a></li>
<li><a href="hex_raycast.html">Ray Cast Selecting</a></li>
<li><a href="hex_marchingcubes.html">Basic Marching Cubes</a></li>
</ul>
<b>3D Sphere</b>
<ul>
<li><a href="sphere_basic.html">Basic Example</a></li>
<li><a href="sphere_basic_anim.html">Relax Animated</a></li>
<li>Ray Cast Selecting [PLANNED]</li>
<li>Basic Marching Cubes [PLANNED]</li>
</ul>
<b>Circle Plane</b>
<ul>
<li><a href="circle_basic.html">Basic Example</a></li>
<li><a href="circle_basic_anim.html">Relax Animated</a></li>
<li>Ray Cast Selecting [PLANNED]</li>
<li>Basic Marching Cubes [PLANNED]</li>
</ul>
<hr><br>
<b>References</b>
<ul>
<li><a href="https://twitter.com/OskSta/status/1147881669350891521">https://twitter.com/OskSta/status/1147881669350891521</a></li>
<li><a href="https://twitter.com/OskSta/status/1169940644669861888">https://twitter.com/OskSta/status/1169940644669861888</a></li>
<li><a href="https://github.com/samuelbigos/globescaper/">https://github.com/samuelbigos/globescaper/</a></li>
<li><a href="https://codepen.io/sketchpunk/pen/ZEboQpp">https://codepen.io/sketchpunk/pen/ZEboQpp</a></li>
<li><a href="https://www.youtube.com/watch?v=1hqt8JkYRdI&t=1s">https://www.youtube.com/watch?v=1hqt8JkYRdI&t=1s</a></li>
<li><a href="https://twitter.com/redblobgames/status/1181437664303562752">https://twitter.com/redblobgames/status/1181437664303562752</a></li>
<li><a href="https://twitter.com/OskSta/status/1458921394855718917">https://twitter.com/OskSta/status/1458921394855718917</a></li>
<li><a href="https://twitter.com/OskSta/status/1448265809269338117">https://twitter.com/OskSta/status/1448265809269338117</a></li>
<li><a href="https://twitter.com/OskSta/status/1448261818435182601">https://twitter.com/OskSta/status/1448261818435182601</a></li>
<li><a href="https://twitter.com/OskSta/status/1448248658865049605">https://twitter.com/OskSta/status/1448248658865049605</a></li>
<li><a href="https://twitter.com/OskSta/status/1338825080844021760">https://twitter.com/OskSta/status/1338825080844021760</a></li>
<li><a href="https://twitter.com/OskSta/status/1332410042784641026">https://twitter.com/OskSta/status/1332410042784641026</a></li>
<li><a href="https://twitter.com/OskSta/status/1246729301434798080">https://twitter.com/OskSta/status/1246729301434798080</a></li>
<li><a href="https://twitter.com/SketchpunkLabs/status/1459214183321509897">https://twitter.com/SketchpunkLabs/status/1459214183321509897</a></li>
<li><a href="https://twitter.com/OskSta/status/1462524158873583622?s=20&t=5yTB1qaEtM4O_K_5--JPYQ">https://twitter.com/OskSta/status/1462524158873583622?s=20&t=5yTB1qaEtM4O_K_5--JPYQ</a></li>
<li><a href="https://andersource.dev/2020/11/06/organic-grid.html">https://andersource.dev/2020/11/06/organic-grid.html</a></li>
<li><a href="https://github.com/andersource/andersource.github.io/blob/master/assets/organic-grid/index.js">https://github.com/andersource/andersource.github.io/blob/master/assets/organic-grid/index.js</a></li>
<li><a href="https://www.youtube.com/watch?v=GWmvHPbG0zY">https://www.youtube.com/watch?v=GWmvHPbG0zY</a></li>
<li><a href="https://github.com/omarvision/marching-cubes-with-linear-interpolation/blob/main/MarchingCube.cs">https://github.com/omarvision/marching-cubes-with-linear-interpolation/blob/main/MarchingCube.cs/a></li>
<li><a href="https://john-wigg.dev/SphereScaper/">https://john-wigg.dev/SphereScaper/</a></li>
<li><a href="https://github.com/mwalczyk/marching-cubes">https://github.com/mwalczyk/marching-cubes</a></li>
<!--<li><a href=""></a></li>-->
</ul>
<b>Further Reading</b>
<ul>
<li><a href="https://catlikecoding.com/unity/tutorials/marching-squares-series/">https://catlikecoding.com/unity/tutorials/marching-squares-series/</a></li>
<li><a href="https://catlikecoding.com/unity/tutorials/marching-squares/">https://catlikecoding.com/unity/tutorials/marching-squares/</a></li>
<li><a href="https://catlikecoding.com/unity/tutorials/marching-squares-2/">https://catlikecoding.com/unity/tutorials/marching-squares-2/</a></li>
<li><a href="https://catlikecoding.com/unity/tutorials/marching-squares-3/">https://catlikecoding.com/unity/tutorials/marching-squares-3/</a></li>
<li><a href="https://catlikecoding.com/unity/tutorials/marching-squares-4/">https://catlikecoding.com/unity/tutorials/marching-squares-4/</a></li>
https://www.boristhebrave.com/2022/04/25/editable-wfc/
</ul>
</div>
</body>
</html>