In Green Custard's 13th Friday talk, Terry explores Procedural Land Generation.
Topics covered:
- Perlin Noise
- 2D Perlin Noise
- Uses
- Octaves
- Octaves result
- Midpoint displacement
- Diamond Square
- Voronoi Tessellation
Green Custard is a custom software development consultancy. To discover more about their work and the team visit www.green-custard.com.
11. Midpoint displacement
● Find Corners
● Shove in random values
● Fill the edge with the average
value between the numbers
○ Add a random value to the result
2 5 8
1 5.5
0 1.5 3
12. Midpoint displacement
● Find Corners
● Shove in random values
● Fill the edge with the average
value between the numbers
○ Add a random value to the result
● Fill the center using the same
method
2 5 8
1 3.3 5.5
0 1.5 3
13. Midpoint displacement
● Find Corners
● Shove in random values
● Fill the edge with the average
value between the numbers
○ Add a random value to the result
● Fill the center using the same
method
● Fill the remaining values with
progressively smaller squares
2 3.5 5 8
1.5 2.83 4.15
1 2.15 3.3 5.5
0 1.5 3
14. Midpoint displacement
● Map size: 2n +1
○ So we can set the middle
● Looks great
● http://stevelosh.com/blog/2016/
02/midpoint-displacement/
17. Diamond Square
● Calculate the center by average
the corners
● Then use half the first four
diamonds around the edge
1 3 3
5 5 5
9 8 7
18. Diamond Square
● Calculate the center by average
the corners
● Then use half the first four
diamonds around the edge
1 3 3
5 5 5
9 8 7
19. Diamond Square
● Calculate the center by average
the corners
● Then use half the first four
diamonds around the edge
● Then diagonal again
1 3 3
3 4
5 5 5
7 6
9 8 7
20. Diamond Square
● Calculate the center by average
the corners
● Then use half the first four
diamonds around the edge
● Then diagonal again
● Then diamonds
1 3 3
3 4 4
5 5 5
7 6
9 8 7