Arnis, an innovative open-source tool, has made significant strides in transforming real-world locations into immersive Minecraft experiences by leveraging geospatial data hosted on Amazon Web Services (AWS). The recent migration to Terrain Tiles, a global elevation dataset available on the Registry of Open Data on AWS, has not only eliminated data retrieval costs but also enhanced accessibility for nearly 300,000 users.
Arnis: The real world in Minecraft
Available across all desktop platforms, Arnis allows users to select a geographic region on a map and customize generation parameters before diving into their chosen location within a playable Minecraft world. Popularly generated sites include bustling cities, personal hometowns, amusement parks, and stunning natural landscapes. The conversion from geospatial data to the game’s world data is executed locally on the user’s machine, typically completing within minutes, depending on the area size.
Implementing elevation data into an existing codebase
One of the most sought-after features for Arnis was the integration of elevation data to complement the geospatial map data, which includes elements such as buildings, roads, rivers, and trees sourced from open mapping providers. After extensive discussions with geographic information system (GIS) specialists, contributors to Arnis successfully designed and implemented an elevation processing pipeline. This development ensures that accurate terrain rendering is possible on a global scale, even in regions with significant elevation variations.
Saving costs by migrating to Open Data on AWS
During the search for an alternative elevation data provider, Arnis contributors prioritized high resolution and worldwide coverage. After months of reliance on a commercial provider, they transitioned to Terrain Tiles, an open dataset on Amazon S3 that offers Terrarium elevation tiles in a standardized image format. This format aggregates multiple sources and aligns seamlessly with the existing decoding path, facilitating a smooth transition. With the availability of datasets on the Registry of Open Data on AWS at no cost, Arnis can now provide a stable elevation feature to its growing user base.
The migration simplified the Arnis codebase, eliminating the need for account-bound authentication for data access. Previously, users made around 2,000,000 elevation tile requests over three months, resulting in substantial costs. With access to the Terrain Tiles public dataset, Arnis users are no longer limited by per-request charges, allowing for broader access to the elevation feature while benefiting from the reliability and comprehensive data offered by Amazon S3.
How it works
The Arnis processing pipeline operates entirely on the client’s machine, requiring no backend services or API keys. Once a user selects a bounding box and generation parameters, the elevation processing begins and concludes with the integration of a validated, smoothed, and scaled height grid into the world generation process. This pipeline consists of eight methodical steps:
- Calculate tile zoom and coordinates based on the selected area
- Check tile cache and fetch missing terrain tiles from Amazon S3
- Decode terrain tiles to meters (per pixel) and assemble the height grid
- Apply Gaussian smoothing to remove artifacts
- Fill NaN values by neighbor interpolation
- Guard against outliers using percentile-based clamping
- Compute min/max for adaptive vertical scaling and clamp to height limits
- Voxelize the map data on the heightmap and save the world
Before initiating any network calls, Arnis checks a local cache directory after determining an appropriate map detail level. Terrain tiles that have not been previously downloaded are fetched using anonymous HTTPS reads from AWS Terrain Tiles and stored in the cache. Any corrupt tiles are discarded and re-fetched to maintain data integrity. In the event of temporary unavailability of the endpoint, Arnis defaults to flat terrain to ensure the generation process completes smoothly. Each pixel is then converted to meters above or below sea level using a specific formula, creating a height grid that corresponds to Minecraft’s block scale.
What Arnis contributors learned and what’s next
The ongoing development of Arnis continues to yield valuable insights, particularly from the integration of the elevation feature into the existing processing pipeline. Key takeaways include:
- Open Data on AWS simplifies operations – Utilizing publicly hosted data on Amazon S3 with anonymous reads alleviates the burden of API key management, allowing contributors to concentrate on enhancing world generation quality and user satisfaction.
- Client-side caching matters – Implementing a lightweight client-side on-disk cache for terrain tiles significantly reduces redundant reads and enhances the user experience.
- Error correction improves realism – Access to raw open data provides maximum control and adaptability for Arnis’s specific needs.
Looking ahead, contributors are working on a public Minecraft server where users can explore procedurally generated worlds without needing to download the Arnis application. Upcoming improvements include:
- Automatic Region selection – This feature will allow the system to determine the nearest AWS Region for elevation tiles, optimizing data retrieval processes.
- Expanded landform detection – Enhancements will enable the analysis of elevation patterns alongside geospatial map data for more accurate representations.
- Terrain-only mode – A new mode that generates realistic elevation landforms while excluding geospatial features, facilitating custom city planning and adventure map creation.
Learn more
For those eager to explore Arnis and unleash their creativity using Open Data on AWS, a wealth of resources is available to get started.