-
-
Notifications
You must be signed in to change notification settings - Fork 20
Custom terrain dataset guide
DavixDevelop edited this page Jan 21, 2021
·
32 revisions
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 |
- 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 forQMetaTiles
- Click on the result and install it
- Close the window
Note: This assumes, your dataset is already in the
GeoTIFF (.tif)
format. If not, go 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 theloadraster_folder.py
file in QGIS Python Console - Double click on
OpenStreetMap
in the left panel (Under 'XYZ Tiles' in theBrowser
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
- 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
- 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 theOpenStreetMap
layer is deleted) - Set the
Minimum
andMaximum
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
Note: For now It's recommended to build the mod yourself, to get the latest changes
- Open Minecraft
- Click on
Mods
, scroll toTerra 1 - 1
and click onConfig
- Here click on
data
and make sureoverrideDefaultElevation
is set totrue
- Save the options and exit the game
- Copy
heights.json5
, which can be found under.minecraft\terraplusplus\config\heights
(ex. C:\Users\david\AppData\Roaming.minecraft\terraplusplus\config\heights), and paste it in the same folder - Rename the copy to
heights.json
and open it in a text editor - To make your life easier, select and copy the default configuration (As shown in the picture, in step 1)
- Make sure to put a comma after the closing curly bracket and press
Enter
to enter a new line, like show in the picture, in step 2 - Paste in the previous selection
- As shown in the picture, in step 3, replace
https://s3.amazonaws.com/elevation-tiles-prod/terrarium/
withfile://{dataset}/
, where{dataset}
is the path to your dataset (ex. C:/Users/david/Documents/Minecraft/CustomTerrain/Flats). The url would then be for examplefile://C:/Users/david/Documents/Minecraft/CustomTerrain/Flats/${zoom}/${x}/${z}.png
- Replace the
10
byzoom
, with the level of zoom, you rendered your dataset under - Under
priority
remove
"condition": {
"lessThan": 1.0
}
- Save the file and create a new world using the usual Build The Earth settings
- Once your world is created, navigate to your desired location using the /tpll command and it should load your custom terrain
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.