Conference Guide

Optimism in Design
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next timestamp
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)

Menu toggling

q Quotes r References f Filter y Link c Credits

In-Menu and Index Controls

a
w
s
d
h j k l


Esc Close menu / unfocus timestamp

Quotes and References Menus and Index

Enter Jump to timestamp

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Filter and Link Menus

z Toggle filter / linking mode

Credits Menu

Enter Open URL (in new tab)
0:00Abner Coimbre: Welcome Davis
0:00Abner Coimbre: Welcome Davis
0:00Abner Coimbre: Welcome Davis
0:36Davis Morley: Clarification: Covering a rasterised version of voxel engines
0:36Davis Morley: Clarification: Covering a rasterised version of voxel engines
0:36Davis Morley: Clarification: Covering a rasterised version of voxel engines
0:50DM: Optimism in Design: A Talk About Voxels
0:50DM: Optimism in Design: A Talk About Voxels
0:50DM: Optimism in Design: A Talk About Voxels
0:54DM: Let's create a voxel engine
0:54DM: Let's create a voxel engine
0:54DM: Let's create a voxel engine
1:01DM: Well, what even is a voxel?
1:01DM: Well, what even is a voxel?
1:01DM: Well, what even is a voxel?
1:14DM: A Point in a 3D Grid
1:14DM: A Point in a 3D Grid
1:14DM: A Point in a 3D Grid
1:25DM: What space does our grid exist in?
1:25DM: What space does our grid exist in?
1:25DM: What space does our grid exist in?
1:37DM: What data should our voxel have?
1:37DM: What data should our voxel have?
1:37DM: What data should our voxel have?
1:47DM: What kinds of voxels do we want to start with?
1:47DM: What kinds of voxels do we want to start with?
1:47DM: What kinds of voxels do we want to start with?
2:01DM: Next, let's assign IDs
2:01DM: Next, let's assign IDs
2:01DM: Next, let's assign IDs
2:14DM: What does our voxel look like in memory?
2:14DM: What does our voxel look like in memory?
2:14DM: What does our voxel look like in memory?
2:21DM: A voxel with its type in a 3D grid
2:21DM: A voxel with its type in a 3D grid
2:21DM: A voxel with its type in a 3D grid
2:27DM: What is our volume? What kind of world do we want to have?
2:27DM: What is our volume? What kind of world do we want to have?
2:27DM: What is our volume? What kind of world do we want to have?
2:35DM: Instead of having one massive world…
2:35DM: Instead of having one massive world…
2:35DM: Instead of having one massive world…
2:50DM: …we can break it up into smaller chunks
2:50DM: …we can break it up into smaller chunks
2:50DM: …we can break it up into smaller chunks
3:01DM: Now we can be focused in how we update things
3:01DM: Now we can be focused in how we update things
3:01DM: Now we can be focused in how we update things
3:10DM: But what size should these smaller chunks be? It's a balancing act
3:10DM: But what size should these smaller chunks be? It's a balancing act
3:10DM: But what size should these smaller chunks be? It's a balancing act
3:24DM: For convenience later, let's go with a size of 64
3:24DM: For convenience later, let's go with a size of 64
3:24DM: For convenience later, let's go with a size of 64
3:43DM: Now our world is made up of 64³ chunks
3:43DM: Now our world is made up of 64³ chunks
3:43DM: Now our world is made up of 64³ chunks
3:49DM: What does our chunk look like in memory?
3:49DM: What does our chunk look like in memory?
3:49DM: What does our chunk look like in memory?
4:14DM: How to compose a 3D position into a single digit?
4:14DM: How to compose a 3D position into a single digit?
4:14DM: How to compose a 3D position into a single digit?
4:17DM: 3D Position to a Single Index: x
4:17DM: 3D Position to a Single Index: x
4:17DM: 3D Position to a Single Index: x
4:44DM: 3D Position to a Single Index: x, z
4:44DM: 3D Position to a Single Index: x, z
4:44DM: 3D Position to a Single Index: x, z
5:30DM: 3D Position to a Single Index: x, y, z
5:30DM: 3D Position to a Single Index: x, y, z
5:30DM: 3D Position to a Single Index: x, y, z
5:45DM: 3D Position to a Single Index: Completed Formula
5:45DM: 3D Position to a Single Index: Completed Formula
5:45DM: 3D Position to a Single Index: Completed Formula
5:59DM: Index Back to 3D Position
5:59DM: Index Back to 3D Position
5:59DM: Index Back to 3D Position
6:40DM: Now we can define what our chunk looks like in memory
6:40DM: Now we can define what our chunk looks like in memory
6:40DM: Now we can define what our chunk looks like in memory
6:53DM: What about our world?
6:53DM: What about our world?
6:53DM: What about our world?
7:21DM: Now that we have everything in memory, how do we get it all on the screen?
7:21DM: Now that we have everything in memory, how do we get it all on the screen?
7:21DM: Now that we have everything in memory, how do we get it all on the screen?
7:30DM: Let's start with a single voxel
7:30DM: Let's start with a single voxel
7:30DM: Let's start with a single voxel
7:37DM: How is a voxel going to be represented in our world?
7:37DM: How is a voxel going to be represented in our world?
7:37DM: How is a voxel going to be represented in our world?
7:45DM: Let's say our voxel is geometrically a cube. How can we draw it?
7:45DM: Let's say our voxel is geometrically a cube. How can we draw it?
7:45DM: Let's say our voxel is geometrically a cube. How can we draw it?
7:51DM: How can we draw a voxel?
7:51DM: How can we draw a voxel?
7:51DM: How can we draw a voxel?
8:13DM: What is our vertex made of?
8:13DM: What is our vertex made of?
8:13DM: What is our vertex made of?
8:48DM: Now, we can draw our cube
8:48DM: Now, we can draw our cube
8:48DM: Now, we can draw our cube
8:54DM: How do we do this for the entire world?
8:54DM: How do we do this for the entire world?
8:54DM: How do we do this for the entire world?
8:57DM: Wait, that's overkill
8:57DM: Wait, that's overkill
8:57DM: Wait, that's overkill
9:16DM: Naively extracting a mesh, or Naive Meshing
9:16DM: Naively extracting a mesh, or Naive Meshing
9:16DM: Naively extracting a mesh, or Naive Meshing
9:39DM: Next, let's do this for every voxel in our chunk
9:39DM: Next, let's do this for every voxel in our chunk
9:39DM: Next, let's do this for every voxel in our chunk
9:59DM: Great, so now we're done, right?
9:59DM: Great, so now we're done, right?
9:59DM: Great, so now we're done, right?
10:08DM: It's kind of slow
10:08DM: It's kind of slow
10:08DM: It's kind of slow
10:37DM: We can do better, with Greedy Meshing
10:37DM: We can do better, with Greedy Meshing
10:37DM: We can do better, with Greedy Meshing
10:41DM: What is Greedy Meshing?
10:41DM: What is Greedy Meshing?
10:41DM: What is Greedy Meshing?
10:50DM: How are we able to join faces?
10:50DM: How are we able to join faces?
10:50DM: How are we able to join faces?
11:17DM: That's great, but how does it actually work?
11:17DM: That's great, but how does it actually work?
11:17DM: That's great, but how does it actually work?
11:21DM: Let's take a 2D slice of our world
11:21DM: Let's take a 2D slice of our world
11:21DM: Let's take a 2D slice of our world
11:28DM: To start, we can focus on those sand blocks
11:28DM: To start, we can focus on those sand blocks
11:28DM: To start, we can focus on those sand blocks
11:32DM: Then, we'll start at the bottom left voxel
11:32DM: Then, we'll start at the bottom left voxel
11:32DM: Then, we'll start at the bottom left voxel
11:38DM: At first, we try to grow vertically
11:38DM: At first, we try to grow vertically
11:38DM: At first, we try to grow vertically
12:05DM: Since we can't grow vertically anymore, let's grow horizontally
12:05DM: Since we can't grow vertically anymore, let's grow horizontally
12:05DM: Since we can't grow vertically anymore, let's grow horizontally
12:30DM: Let's apply this algorithm to the rest of our scene
12:30DM: Let's apply this algorithm to the rest of our scene
12:30DM: Let's apply this algorithm to the rest of our scene
12:34DM: Nice! That's a significant reduction in faces
12:34DM: Nice! That's a significant reduction in faces
12:34DM: Nice! That's a significant reduction in faces
12:57DM: Can we do better?
12:57DM: Can we do better?
12:57DM: Can we do better?
13:19DM: What are we currently limited by?
13:19DM: What are we currently limited by?
13:19DM: What are we currently limited by?
13:37DM: What makes up our Vertex?
13:37DM: What makes up our Vertex?
13:37DM: What makes up our Vertex?
13:59DM: Instead, we can upload the type buffer directly to the GPU
13:59DM: Instead, we can upload the type buffer directly to the GPU
13:59DM: Instead, we can upload the type buffer directly to the GPU
14:29DM: We aren't getting rid of any data, we're just moving it around
14:29DM: We aren't getting rid of any data, we're just moving it around
14:29DM: We aren't getting rid of any data, we're just moving it around
14:40DM: Where does this leave us?
14:40DM: Where does this leave us?
14:40DM: Where does this leave us?
14:43DM: Now instead of having to only mesh similar types…
14:43DM: Now instead of having to only mesh similar types…
14:43DM: Now instead of having to only mesh similar types…
14:48DM: …it's become a binary problem!
14:48DM: …it's become a binary problem!
14:48DM: …it's become a binary problem!
14:58DM: We can now mesh all faces without discrimination
14:58DM: We can now mesh all faces without discrimination
14:58DM: We can now mesh all faces without discrimination
15:29DM: Okay, do we still have to work with IDs?
15:29DM: Okay, do we still have to work with IDs?
15:29DM: Okay, do we still have to work with IDs?
15:33DM: It's a binary problem, so we only need a binary representation of our scene
15:33DM: It's a binary problem, so we only need a binary representation of our scene
15:33DM: It's a binary problem, so we only need a binary representation of our scene
15:48DM: Right now, our chunk is a 3D grid of voxel structs stored in an array
15:48DM: Right now, our chunk is a 3D grid of voxel structs stored in an array
15:48DM: Right now, our chunk is a 3D grid of voxel structs stored in an array
16:01DM: What we can use as a binary representation of our voxel data is an array of bits
16:01DM: What we can use as a binary representation of our voxel data is an array of bits
16:01DM: What we can use as a binary representation of our voxel data is an array of bits
16:14DM: Let's make a bit array
16:14DM: Let's make a bit array
16:14DM: Let's make a bit array
16:17DM: Let's make a bit array: First, we take our current index formula and chop off the Y
16:17DM: Let's make a bit array: First, we take our current index formula and chop off the Y
16:17DM: Let's make a bit array: First, we take our current index formula and chop off the Y
16:22DM: Let's make a bit array: That index can then access a column in an array of unsigned 64-bit integers
16:22DM: Let's make a bit array: That index can then access a column in an array of unsigned 64-bit integers
16:22DM: Let's make a bit array: That index can then access a column in an array of unsigned 64-bit integers
16:26DM: Let's make a bit array: And then Y can be used to index into a voxel at a specific height in this column
16:26DM: Let's make a bit array: And then Y can be used to index into a voxel at a specific height in this column
16:26DM: Let's make a bit array: And then Y can be used to index into a voxel at a specific height in this column
16:49DM: So now that we can, let's turn our scene into binary
16:49DM: So now that we can, let's turn our scene into binary
16:49DM: So now that we can, let's turn our scene into binary
16:57DM: All set voxels become ones, and all air voxels become zeros
16:57DM: All set voxels become ones, and all air voxels become zeros
16:57DM: All set voxels become ones, and all air voxels become zeros
17:10DM: Before we combine our faces, what are 64-bit integers perfect for?
17:10DM: Before we combine our faces, what are 64-bit integers perfect for?
17:10DM: Before we combine our faces, what are 64-bit integers perfect for?
17:15DM: Bitwise Operations!
17:15DM: Bitwise Operations!
17:15DM: Bitwise Operations!
17:20DM: Bitwise ANDs
17:20DM: Bitwise ANDs
17:20DM: Bitwise ANDs
17:37DM: Considering 64 voxels at once with bitwise AND Meshing
17:37DM: Considering 64 voxels at once with bitwise AND Meshing
17:37DM: Considering 64 voxels at once with bitwise AND Meshing
18:26DM: We've significantly reduced the amount of operations too!
18:26DM: We've significantly reduced the amount of operations too!
18:26DM: We've significantly reduced the amount of operations too!
18:58DM: Alright, but there is a property of voxel worlds that we're ignoring
18:58DM: Alright, but there is a property of voxel worlds that we're ignoring
18:58DM: Alright, but there is a property of voxel worlds that we're ignoring
19:02DM: They often have a more complicated 3D scene
19:02DM: They often have a more complicated 3D scene
19:02DM: They often have a more complicated 3D scene
19:17DM: If we take that scene and turn it into bits…
19:17DM: If we take that scene and turn it into bits…
19:17DM: If we take that scene and turn it into bits…
19:20DM: …we see we need to take that bitwise AND idea and make it work with "3D" columns
19:20DM: …we see we need to take that bitwise AND idea and make it work with "3D" columns
19:20DM: …we see we need to take that bitwise AND idea and make it work with "3D" columns
19:34DM: We can do that by breaking down the problem into smaller parts
19:34DM: We can do that by breaking down the problem into smaller parts
19:34DM: We can do that by breaking down the problem into smaller parts
19:43DM: How can we extract the first two set bits here?
19:43DM: How can we extract the first two set bits here?
19:43DM: How can we extract the first two set bits here?
19:51DM: We can use something that 64-bit integers are also great for: intrinsics, specifically one called Trailing Zero Count
19:51DM: We can use something that 64-bit integers are also great for: intrinsics, specifically one called Trailing Zero Count
19:51DM: We can use something that 64-bit integers are also great for: intrinsics, specifically one called Trailing Zero Count
20:01DM: To start, we take the first column and invert it
20:01DM: To start, we take the first column and invert it
20:01DM: To start, we take the first column and invert it
20:06DM: Then we count the first series of zeros, which is our first set bits inverted
20:06DM: Then we count the first series of zeros, which is our first set bits inverted
20:06DM: Then we count the first series of zeros, which is our first set bits inverted
20:13DM: Now we can create a new mask
20:13DM: Now we can create a new mask
20:13DM: Now we can create a new mask
20:17DM: We can then use this mask to compare the rest of our columns
20:17DM: We can then use this mask to compare the rest of our columns
20:17DM: We can then use this mask to compare the rest of our columns
20:31DM: We then skip the zeros to get to the next column, and repeat the extraction process
20:31DM: We then skip the zeros to get to the next column, and repeat the extraction process
20:31DM: We then skip the zeros to get to the next column, and repeat the extraction process
20:55DM: Then, we mesh again using this new mask
20:55DM: Then, we mesh again using this new mask
20:55DM: Then, we mesh again using this new mask
21:02DM: We repeat this process for our entire chunk
21:02DM: We repeat this process for our entire chunk
21:02DM: We repeat this process for our entire chunk
21:10DM: We now have our more complicated scene, meshed binarily, using bitwise operations and intrinsics
21:10DM: We now have our more complicated scene, meshed binarily, using bitwise operations and intrinsics
21:10DM: We now have our more complicated scene, meshed binarily, using bitwise operations and intrinsics
21:20DM: Let's Talk About Speed
21:20DM: Let's Talk About Speed
21:20DM: Let's Talk About Speed
21:23DM: Old Greedy Meshing times (3–5ms) vs Now (0.12ms) for 64³ area
21:23DM: Old Greedy Meshing times (3–5ms) vs Now (0.12ms) for 64³ area
21:23DM: Old Greedy Meshing times (3–5ms) vs Now (0.12ms) for 64³ area
22:25DM: But we could be faster
22:25DM: But we could be faster
22:25DM: But we could be faster
22:28DM: Simple Thread Queue: on i7 8700k 0.01ms per 64³ chunk on average
22:28DM: Simple Thread Queue: on i7 8700k 0.01ms per 64³ chunk on average
22:28DM: Simple Thread Queue: on i7 8700k 0.01ms per 64³ chunk on average
24:02DM: Old Greedy Meshing times (3–5ms) vs Now (0.01ms) for 64³ area
24:02DM: Old Greedy Meshing times (3–5ms) vs Now (0.01ms) for 64³ area
24:02DM: Old Greedy Meshing times (3–5ms) vs Now (0.01ms) for 64³ area
24:12DM: But we could be even faster
24:12DM: But we could be even faster
24:12DM: But we could be even faster
24:16DM: If we think about it, what are we really doing with our meshing?
24:16DM: If we think about it, what are we really doing with our meshing?
24:16DM: If we think about it, what are we really doing with our meshing?
24:35DM: We could just use one face to represent all possible faces for any slice of voxels
24:35DM: We could just use one face to represent all possible faces for any slice of voxels
24:35DM: We could just use one face to represent all possible faces for any slice of voxels
25:12DM: Let's do this for an entire chunk
25:12DM: Let's do this for an entire chunk
25:12DM: Let's do this for an entire chunk
25:38DM: Let's use this for the entire world!
25:38DM: Let's use this for the entire world!
25:38DM: Let's use this for the entire world!
25:46DM: Global Lattice Stats
25:46DM: Global Lattice Stats
25:46DM: Global Lattice Stats
27:16DM: What does not having to mesh mean?
27:16DM: What does not having to mesh mean?
27:16DM: What does not having to mesh mean?
28:35DM: Statistics
28:35DM: Statistics
28:35DM: Statistics
28:58DM: Let's solve some problems with the Global Lattice
28:58DM: Let's solve some problems with the Global Lattice
28:58DM: Let's solve some problems with the Global Lattice
29:04DM: Global Lattice examples: 1) A Solution for Floating Point Precision, "The Treadmill"
29:04DM: Global Lattice examples: 1) A Solution for Floating Point Precision, "The Treadmill"
29:04DM: Global Lattice examples: 1) A Solution for Floating Point Precision, "The Treadmill"
30:14DM: Global Lattice examples: 1) A Solution for Floating Point Precision, "The Treadmill" illustration
30:14DM: Global Lattice examples: 1) A Solution for Floating Point Precision, "The Treadmill" illustration
30:14DM: Global Lattice examples: 1) A Solution for Floating Point Precision, "The Treadmill" illustration
30:48DM: Global Lattice examples: 2) Maximizing What's in View With Frustum Rotation
30:48DM: Global Lattice examples: 2) Maximizing What's in View With Frustum Rotation
30:48DM: Global Lattice examples: 2) Maximizing What's in View With Frustum Rotation
30:53DM: Global Lattice examples: 2) Frustum Rotation
30:53DM: Global Lattice examples: 2) Frustum Rotation
30:53DM: Global Lattice examples: 2) Frustum Rotation
31:39DM: Global Lattice examples: 2) Frustum Rotation with a lower FOV
31:39DM: Global Lattice examples: 2) Frustum Rotation with a lower FOV
31:39DM: Global Lattice examples: 2) Frustum Rotation with a lower FOV
32:03DM: In Conclusion
32:03DM: In Conclusion
32:03DM: In Conclusion
33:46DM: Thanks1
33:46DM: Thanks1
33:46DM: Thanks1