Skip to content
This repository

Building Minecraft worlds from USGS NED and NLCD topographical data

branch: master

Merge branch 'release/1.1'

Conflicts:
	region.py
latest commit c82f80a3e7
Jack Twilley authored March 02, 2014
Octocat-spinner-32 Downloads More cleanup. References #25. March 27, 2013
Octocat-spinner-32 maps Renamed commands and directories to lower case. January 04, 2013
Octocat-spinner-32 pymclevel @ 419a403 Fixes #17, updates pymclevel, very minor cleanup. October 19, 2012
Octocat-spinner-32 regions Renamed commands and directories to lower case. January 04, 2013
Octocat-spinner-32 schematics Renamed commands and directories to lower case. January 04, 2013
Octocat-spinner-32 worlds Renamed commands and directories to lower case. January 04, 2013
Octocat-spinner-32 .gitignore More improvements to OpenCL code. Refs #20. December 29, 2012
Octocat-spinner-32 .gitmodules Added pymclevel as a submodule. March 08, 2012
Octocat-spinner-32 README.md Modified documentation to reflect new command names. March 02, 2014
Octocat-spinner-32 TODO Updated documentation. February 17, 2012
Octocat-spinner-32 bathy.cl More improvements to OpenCL code. Refs #20. December 29, 2012
Octocat-spinner-32 bathy.py Minor changes to comply with PEP8. March 27, 2013
Octocat-spinner-32 buildmaps.py Renamed commands and directories to lower case. January 04, 2013
Octocat-spinner-32 buildregion.py Renamed commands and directories to lower case. January 04, 2013
Octocat-spinner-32 crust.py Even more changes! January 04, 2013
Octocat-spinner-32 elev.cl More improvements to OpenCL code. Refs #20. December 29, 2012
Octocat-spinner-32 elev.py Minor changes to comply with PEP8. March 27, 2013
Octocat-spinner-32 getregion.py Minor changes to comply with PEP8. March 27, 2013
Octocat-spinner-32 idt.cl Replaced clidt.py and invdistree.py with idt.py December 26, 2012
Octocat-spinner-32 idt.py Minor changes to comply with PEP8. March 27, 2013
Octocat-spinner-32 memoize.py Even more changes! January 04, 2013
Octocat-spinner-32 ore.py Even more changes! January 04, 2013
Octocat-spinner-32 prepregion.py Renamed commands and directories to lower case. January 04, 2013
Octocat-spinner-32 region.py Merge branch 'release/1.1' March 02, 2014
Octocat-spinner-32 schematic.py Renamed commands and directories to lower case. January 04, 2013
Octocat-spinner-32 terrain.py Minor changes to comply with PEP8. March 27, 2013
Octocat-spinner-32 tile.py Even more changes! January 04, 2013
Octocat-spinner-32 tree.py Even more changes! January 04, 2013
Octocat-spinner-32 utils.py More PEP8 fixes! January 04, 2013
README.md

Welcome to TopoMC!

The TopoMC project facilitates the construction of superficially realistic Minecraft worlds leveraging USGS, specifically the NED and NLCD datasets.

Major changes:

  • TopoMC downloads tiled data from the USGS. These files can be quite large so they are now cached for reuse.

  • TopoMC generates Anvil worlds with full 256-block heights thanks to @codewarrior0 and his changes to mcedit/pymclevel! Thank you!

  • TopoMC also runs on Windows! Kinda. I think. It works for me, anyway! See this for more details!

  • The array and world code has been replaced with region-based code which improve accuracy while saving CPU and memory. The new commands to download, prepare, and build regions are documented below.

  • GPGPU support has been added. Yes, your video card can help you build Minecraft worlds! This latest feature relies on PyOpenCL and its associated dependencies, and is not supported on all systems.

  • The landcover code has been rewritten to support the usage of MCEdit schematics as templates for certain areas, specifically croplands (farms) and developed areas. More information about this feature can be found here.

  • pymclevel has been included as a submodule. This release of pymclevel includes an accelerated NBT module which must be compiled before use, as seen below. This module can have a significant impact on performance.

  • The test dataset has been removed.

  • The safehouse has been removed, but the default spawn point is still at the highest point in the dataset.

Before running TopoMC

You will need some additional software installed on your system before TopoMC can run. On Ubuntu (precise pangolin), the following packages need to be installed:

git gdal-bin python-scipy python-gdal python-suds python-yaml python-progressbar

Other operating systems use other packaging systems so you're on your own -- the error messages will tell you what's missing, but it's up to you to find it and install it!

How to use TopoMC

The best way to get latitude and longitude is through Google Maps. Choose your chunk of the planet (still limited to the United States and its possessions, alas) and right-click the upper left corner of the region you wish to model. Select 'What's here', and the tooltip should provide the latitude and longitude in decimal degrees. Do the same for the lower right corner of the region.

Next, here's what to do!

  1. Import the pymclevel submodule. Must be done once before anything else! There are two commands here, init and update:

    jmt@belle:~/git/TopoMC$ git submodule init
    jmt@belle:~/git/TopoMC$ git submodule update
    
  2. (Optional) Compile the accelerated NBT module in pymclevel.

    jmt@belle:~/git/TopoMC$ (cd pymclevel && python setup_nbt.py build)
    
  3. Retrieve the region from the USGS. The upper left latitude is the "ymax" value as seen below, and the lower right latitude is the "ymin". For longitude, the upper left is the "xmin" while the lower right is the "xmax".

    jmt@belle:~/git/TopoMC$ ./getregion.py --name Provincetown --ymax 42.0901 --xmin -70.2611 --ymin 42.0091 --xmax -70.1100
    
  4. Prepare the region for processing.

    jmt@belle:~/git/TopoMC$ ./prepregion.py --name Provincetown
    
  5. Construct the Minecraft world based on the region.

    jmt@belle:~/git/TopoMC$ ./buildregion.py --name Provincetown
    

Geek knobs for GetRegion.py

GetRegion.py has a number of optional arguments not shown above.

  • Tile size can be changed. The default tile size is 256x256, but it can be changed. The only requirement is that it be a multiple of 16. An example would be "--tilesize 64". Decreasing the tile size will increase the number of jobs while correspondingly decreasing the size of those jobs which can help with memory issues. Increasing the tile size will decrease the number of jobs while correspondingly increasing the size of those jobs which can help with speed issues. Only change the tile size if all other changes are not having the desired effect.

  • Horizontal and vertical scaling can be changed. The horizontal and vertical scale, both of which default to 6, can be changed independently. The minimum horizontal scale is 1 with a practical maximum of 30. The minimum vertical scale is more complex, and essentially depends on the elevation change between the highest point in the region and sea level. An example scale would be "--scale 1 --vscale 1". Should the requested scale exceed valid parameters, the software will adjust the scale after informing the user.

  • Sealevel and maximum depth can be changed. Sometimes the minimum vertical scale is too high. One way to improve this situation is to lower the sealevel from its default of 64 to something lower such as 16 or 8. The maximum depth should also be lowered as well. Keep in mind that this may have unexpected effects on ore distribution! An example sealevel and maximum depth would be "--sealevel 16 --maxdepth 8".

  • Elevation can be trimmed! When lowering the sealevel isn't enough to reach your desired vertical scale, excess elevation can be trimmed. Elevation is considered excess if it is between sea level and the lowest point on the region. For example, if a region were selected such that its surface was between 200 and 300 meters above sea level, the 200 meters between sea level and the lowest point on the region could be trimmed. An example trim would be "--trim 200". If the trim value requested exceeds the valid limits, the software will adjust the trim value to the maximum allowed after informing the user.

Something went wrong with that request. Please try again.