ファンタジー地図の生成(2016年)

Generating Fantasy Maps with Uncharted Atlas

Have you ever wondered how those beautifully detailed fantasy maps in your favorite novels are created? How do they manage to capture the essence of a fictional world and make it come alive? Well, wonder no more! In this blog post, we will explore the fascinating process behind generating fantasy maps using the Uncharted Atlas Twitter bot. So grab your imagination and let’s dive in!

Uncharted Atlas is a Twitter bot that generates maps reminiscent of those found in cheap paperback fantasy novels. The creator of the bot, Martin O’Leary, wanted to create maps that not only looked visually appealing but also had a physical basis in terrain generation. He was tired of the typical fractal noise approach used in most terrain generation algorithms, as it often resulted in unrealistic large-scale structures.

To overcome this challenge, O’Leary developed a multi-stage generator that starts by building a height map of the terrain. This height map is created using an irregular set of points, rather than a regular square grid, to give the map a rough, organic feel. The points are initially selected randomly and then improved using Lloyd relaxation, a process that iteratively adjusts the point positions to achieve a more even distribution.

Once the height map is established, the generator simulates the evolution of the landscape over time. Instead of trying to simulate billions of years of natural processes, O’Leary takes a cheat approach by starting with a simple ‘proto-landscape’ built with geometric primitives. These primitives, such as mountains, hills, and valleys, are combined and modified to create the desired terrain features.

Next, the generator focuses on simulating water-based erosion, which is the primary force shaping real-world landscapes. By routing water flow over the height map, the generator carves out valleys, river basins, and other landforms. The Planchon-Darboux algorithm is used to fill in sinks or depressions in the terrain, ensuring that water always flows downhill.

The erosion process also takes into account the slope of the terrain and the amount of water flowing through each point. This information is used to calculate the erosion rate, which determines how much the surface is lowered. To prevent unrealistic deep gorges, a cap is applied to the erosion rate. Additionally, the coastline is smoothed out to create a cleaner and more visually appealing result.

With the physical portion of the map complete, the generator moves on to the political aspect. Cities and towns are placed on the map in feasible-looking locations, taking into account factors such as proximity to water sources and suitable terrain. Each point on the map is assigned a score based on its desirability for city placement, and the highest-scoring points are chosen as city locations.

The regions surrounding the cities are then determined by expanding outwards from each city and including the points that are closest to it. Natural borders like rivers and mountain ranges are taken into account to create realistic and visually pleasing region boundaries. Finally, the map is labeled with names for cities, towns, and regions, using a consistent language style for the entire map.

The last step of the process involves placing labels on the map, taking into consideration factors such as overlap, obscured cities, and map edges. This step can be quite challenging, as it requires finding the best positions for labels while avoiding clutter and maintaining readability. O’Leary’s approach involves a complex algorithm that prioritizes different types of labels and uses various strategies to minimize overlaps.

While the current version of Uncharted Atlas does not include features like fluvial deposition, glacial processes, or volcanic activity, O’Leary acknowledges that there is room for improvement and expansion. The generator could be enhanced to include more realistic mountains, forests, fields, and even mythical creatures in the oceans. The possibilities are endless!

If you’re interested in exploring the code and trying your hand at generating your own fantasy maps, you can find the JavaScript code for Uncharted Atlas on GitHub. O’Leary also provides the original messy Python code that he used during the development process.

In conclusion, Uncharted Atlas offers a fascinating glimpse into the world of fantasy map generation. By combining artistic vision with a physical basis in terrain generation, Martin O’Leary has created a tool that can bring fictional worlds to life. So next time you dive into a fantasy novel and marvel at the intricately detailed map, remember the behind-the-scenes work that went into creating it!

If you’re interested in purchasing a print

注意

  • この記事はAI(gpt-3.5-turbo)によって自動生成されたものです。
  • この記事はHackerNewsに掲載された下記の記事を元に作成されています。
    Generating Fantasy Maps (2016)
  • 自動生成された記事の内容に問題があると思われる場合にはコメント欄にてご連絡ください。

コメントする