Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus...
-
Upload
darren-flowers -
Category
Documents
-
view
221 -
download
0
Transcript of Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus...
![Page 1: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/1.jpg)
Random Terrain Generation
By Cliff DeKoker
![Page 2: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/2.jpg)
About my project
● Incremental development● Focus on creating height maps that mimic
real terrain● Allow for expansion in terms of file
formatting, methods of generation● Allow for separation of UI and underlying
machinery
![Page 3: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/3.jpg)
My project should be able to
● Generate 2D elevation maps with a somewhat realistic appearance
● Use 3 different kinds of generation.● Use modules that specify different file
formats for saving and loading● Display what has been created
![Page 4: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/4.jpg)
Data structures
● Height maps: 2-dimensional arrays. Each location in the array hold the height for the current position.
![Page 5: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/5.jpg)
Interface mockup
![Page 6: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/6.jpg)
System architecture
![Page 7: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/7.jpg)
Milestones
● Complete simple generation● Complete file IO● Complete UI● -------------Extras● Complete texture generator● Work on more methods of generation
![Page 8: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/8.jpg)
Intro to terrain generation
● Games (SimCity, Civilization, etc)● Simulations (Simulate erosion, changes to
terrain over time, meteor impacts)● Computer aided art programs (Bryce)● Movies ● Dozens of algorithms for doing this
depending on criteria
![Page 9: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/9.jpg)
![Page 10: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/10.jpg)
![Page 11: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/11.jpg)
![Page 12: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/12.jpg)
Existing Solutions
● Overwhelming number of algorithms and examples of terrain generation.
![Page 13: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/13.jpg)
Generation by subdivision
● Start at the four corners of a rectangular map● Pick random heights for each corner● Find midpoints for each pair of neighbouring
points, and then assign a height value to each midpoint. Also known as tessellation
● A version of this is called the Diamond-Square algorithm
● Results: very nice looking terrain that is rough, but not too random.
![Page 14: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/14.jpg)
![Page 15: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/15.jpg)
Generation by averaging
● Start with a 2-dimensional array● Assign a random height value to each point● Set the value at each point to the average of
the original value and surrounding values● Determine some key values to determine
what kind of terrain you have generated● Results: Can be rather noisy looking without
running through a lot of averaging. Too much averaging makes very flat terrain. At least the algorithm is simple.
![Page 16: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/16.jpg)
Generation by simulation
● This method is typically memory and computationally expensive.
● Earth is shaped by (but not exclusively): water, plate tectonics, wind, meteors.
● For a simplified version, you could focus mainly on water.
● Results: can be difficult to simulate all the effects that alter terrain at the same time. Works fine for a small scale area. IE: water carving through a valley.
![Page 17: Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.](https://reader035.fdocuments.us/reader035/viewer/2022062517/56649ed05503460f94bddbeb/html5/thumbnails/17.jpg)
Conclusion
● Ultimately, you should strive to find a balance between the amount of time you want to take to generate and the quality of the results you are looking for.