Skip to content

Custom terrain dataset guide

DavixDevelop edited this page Feb 13, 2021 · 32 revisions

Custom Terrain from Lidar data/Raster data

This guide is intended for those who wish to use the custom terrain feature for Terra++ and wish to use lidar/raster data as the data source. Before you continue, check if your country already has a guide here.

This guide is split into two parts.

Preparing your dataset Generating/using your dataset
This guide teaches you how to prepare your dataset, if your dataset is in any other format then GeoTIFF (.tif), for example, if you wish to use LiDAR data. The second part teaches you, how to generate/use the optimized dataset
Link to Part one Read bellow

Part two: Generating/using your dataset

A. QGIS preparation & QMetaTiles plugin

  • First, download and install the latest version of QGIS in OSGeo4W
  • After installing, open it
  • Navigate to Plugins/Manage And Install Plugins... in the toolbar
  • In the opened window click on All and search for QMetaTiles
  • Click on the result and install it
  • Close the window

B. Importing your dataset

Note: This assumes, your dataset is already in the GeoTIFF (.tif) format. If not, go here. You can also find a version of the import script that imports all files in a folder, including subfolders here.

  • Next, navigate to Plugins/Python Console in the toolbar
  • In the opened bottom panel click on the Show Editor button (Script icon)
  • Using the Open Script... button open the loadraster_folder.py file (or loadraster_folder_recursive.py if you want to also import files from subdirectories) in QGIS Python Console
  • Double click on OpenStreetMap in the left panel (Under 'XYZ Tiles' in the Browser panel [View/Panels/Browser])
  • Navigate to the file_directory line (line: 65)
  • Here replace the path with your path to the folder where your .tif files are located
  • Save the changes using the Save button (Floppy disk icon)
  • Navigate to View/Panels/Log Messages in the toolbar
  • Now, run the script by clicking on the Run Script button (green play button)
  • It may lag a bit at the start and the end but let it run. Again, this can take a while
  • The script outputs the progress into the Log Messages panel
  • Once It's done QGIS will send you a notification

C. Setting up the project

  • Select all your imported layers in the left and right-click on them
  • Navigate to Set CRS/Set Layer CRS...
  • In the opened window choose the same coordinate reference system your lidar/source dataset uses (ex. Slovenia 1996 / Slovene National Grid). If you have problems with this step, select the layer, go to Layers/Save as, set the CRS, save the file/files and repeat the C section.
  • Click OK
  • In the bottom right corner click the current project coordinate reference system (ex EPSG...)
  • In the opened windows search for EPSG:4326 (WGS 84)
  • Click on WGS 84 and click OK
  • Make sure the layers are in the right location over the map

D. Generating tiles

  • Delete the OpenStreetMap layer
  • Navigate to Plugins/QMetaTiles/QMetaTiles
  • Set the Tileset name and choose the Output Directory (ex. Documents\Minecraft\CustomTerrain)
  • Select Full extent (Make sure the OpenStreetMap layer is deleted)
  • Set the Minimum and Maximum zoom to 17, or lower depending on the resolution of your data, or if you want the dataset to use less space
  • Disable Metatiling
  • Set the Quality under Parameters to 100
  • Select Make lines appear less jagged at the expense of some drawing performance
  • Make sure that the format is set to PNG
  • Click OK
  • This will take quite a while depending on how large an area you have
  • Once It's finished you can close QGIS

E. Using your generated dataset

  • Download and install Terra++ from here or build it yourself from here

Note: Recently the mod went through a large improvement, so if you have problems with loading previous saves, contact me on Discord (Scroll down for contact).

Note: As the new heights config is different from the old one, it is very important that you recreate your heights config, using the provided heights.json file

It is also very essential that your heights folder doesn't contain the old default.json5 or any file with the json5 extension. If it does, you must also delete the .json file and set it up again, by following the steps below

Note: If your .minecraft folder doesn't contain the terraplusplus folder, you must first create the world using the World Type: Build The Earth

  • Download heights.json, and move it to .minecraft\terraplusplus\config\heights (ex. C:\Users\david\AppData\Roaming.minecraft\terraplusplus\config\heights)
  • Open heights.json in a text editor
  • As shown in the picture, in step 1, replace (path to dataset) with your path to your dataset, for example, C:/Users/david/Documents/Minecraft/CustomTerrain/Flats
  • Next to it, as shown in step 2, replace (zoom level) with the level of zoom, you rendered your dataset under
  • Finally, as shown in step 3, also replace (zoom level) with the level of zoom, you rendered your dataset under
  • Save the file, open Minecraft, and load the save you've created or create a new world using the World Type: Build The Earth
  • Once your world loads, navigate to your desired location using the /tpll command and it should load your custom terrain

Need help or have a question?

You can contact me on Discord, under davixdevelop#3914, or you can join us on our BTE Development Hub on Discord, and ask away under the #terraplusplus-support channel.

Clone this wiki locally