Released Tutorial: Creating maps from satellite data

Miner34

Car destroyer and modder
Joined
Mar 23, 2024
Messages
36
This tutorial will show you how to create a map starting from satellite data.
First of all head your browser to portal.opentopography.org/datasets.
Once there, your screen will look like this:
Screenshot_20240401_122347.png

Zoom in to the area you want to import (if you are having issues finding it, try changing map type).
Once there, click on the "select a region button".
Drag to select the area you want (in this example i selected the Garda lake in Italy).
Screenshot_20240401_122952.png

The site will automatically scroll down to show the datasets you can use for that area.
Choose one with a decent quality and a license that allows this use.
If you are grabbing a piece of USA just use the USGS 10 meters.
In this example i'm going to use Copernicus 30 meters. NOTE: As far as i know, the Copernicus dataset
use license is not good enough to publish the resulting terrain, i will not publish the result and if you
use it you also should not publish it.
Screenshot_20240401_123942.png

Once clicked, it will show you the area you are downloading one more time, this time also telling you how big it is.
Do a screenshot of/write down somewhere all the data related to the coordinates.
EDIT: Not fully needed as the .prj file together with the terrain itself contains this data in text format.
Screenshot_20240401_124656.png

Set the data format to Arc ASCII Grid.
Screenshot_20240401_124305.png

Insert your email (will be needed to notify you once it has finished) and click submit.
You can now close the tab.
Shortly after clicking submit you will receive an email containing the link to the file.
It will look like this:
Code:
OpenTopography.org - A Portal to High-Resolution Topography Data and Tools

Thank you for using the OpenTopography Raster System.

The results of your job (ID: rt1711968518850)


are available at
https://portal.opentopography.org/result?id=rt1711968518850

Metadata about your job are available at
https://portal.opentopography.org/result?id=rt1711968518850&metadata=1

Dataset Citation: European Space Agency, Sinergise (2021).  <i>Copernicus Global Digital Elevation Model</i>.  Distributed by OpenTopography.  https://doi.org/10.5069/G9028PQB. Accessed: 2024-04-01

Use License: © DLR e.V. (2014-2018) and © Airbus Defence and Space GmbH 2022 provided under COPERNICUS by the European Union and ESA; all rights reserved.

If you are a registered user of OpenTopography, you can also access the results of your job via the 'Raster Jobs' link under the myOpenTopo Workbench section of myOpenTopo. Please note that the results will expire after 48 hours.

----- The OpenTopography Team -----
Note that the file will be a tar.gz archive (i think you need 7z under Windows).
Well, for now it's enough, the next time i will show you how to import it in Blender and finally in Rigs of Rods.
 
Last edited:
Once you extract the archive you will need two files: a .asc (the terrain) and a .prj (metadata about the terrain). Both can be opened with a text editor. You will see that the .asc is just a bunch of coordinates, while the .prj can be readed from an human easily.
This is my .prj:
Code:
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
Now, let's import our terrain in blender. You will need Blender, of course (version more recent than 2.83) and the BlenderGIS addon.
Once you start blender, you will have the default scene. Press A and then X to delete every object in the scene.
Click on on the import .asc button and select your file.
Screenshot_20240403_120211.png

It will take some time, especially with high quality/large terrains.
After loading, you will probably end up with... a weird super high object with almost no thickness.
Screenshot_20240403_122715.png

Don't worry, it can be fixed.
Just change the scale in a way that the X and Y axis are 100'000 times the Z axis (the scale, not the dimensions!).
Screenshot_20240403_123452.png

Here we go! Now you have the terrain in Blender!
Well, for now it's enough. Exporting to Rigs of Rods will be for the next time.
 
Last edited:
Time to start exporting!
It would be a good idea to start using material preview (Z+2), switch the view to
top orthogonal (Numpad 7) and channge the timeline to a shader editor (click on that little clock icon at the
bottom left of your screen and choose Shader Editor).
Then, create a new material and recreate this in the shader editor:
Screenshot_20240423_132851.png

As you can see, the bottom of the terrain is black and the mountains are white. This represents the altitude.
Now, there is a problem: The scale is not linear! To solve this, change the color management to the values in the
following screenshot:

Screenshot_20240423_134012.png

Now the color scale is no longer wrong. Next thing to do is change the background color to black (if your terrain is not an
exact square, you will need this to avoid weird vertical walls at the edge of the map):
Screenshot_20240423_134759.png

(Note that you will not see the result unless you switch to rendered mode with Z+8).
Now it's time to setup the camera. Add a camera to the scene and change it's X and Y location to half of the respective
dimensions of the terrain. In my case i had to place the camera at 2634.72 on the X axis and 2431.945 on the Y axis.
Regarding the Z axis, just make sure the camera is higher than the terrain.
Now, set the camera type to orthogonal and set the orthogonal scale to the dimensions of the biggest axis of the terrain
(in my case the X axis):
Screenshot_20240423_160016.png

In my case the biggest side was the X axis so as you can see my camera is already of the right size on that axis.
Now you have to set the render quality. The value should be a 2^n+1 eg. 513x513, 2049x2049...
Screenshot_20240423_161927.png

Remember that doubling the quality quadruples the time it will take to render, and that anyways the terrain itself has it's
quality, so don't exagerate. as an example, 129*129 can be enough to render a 1290*1290 meters terrain with
10 meter precision. Even though, it is not a bad idea to render it at an higher resolution if the terrain size doesn't match the resolution.
Now you have to prepare for render.
Set the end frame to 1, change the output location, set color to BW, color depth 16. The compression value can be changed
with no quality problems since png compression is lossless.
Screenshot_20240424_125257.png

Press CTRL+F12 to start rendering the terrain.
The result should be pretty much the same as the preview:
garda_lake.png

If you want, you can convert it to a .raw (uses more disk space but should load faster i guess)
To do so, this command should do the work:
Code:
convert garda_lake0001.png -depth 16 -size 4097x4097 -endian LSB gray:garda_lake.raw
Edit the command to reflect your file name and size.
Now just add the required files for the terrain to appear in game and you should be able to play on it (ehm... kinda):
Screenshot_20240424_133658.png

It looks absolutely horrible, but the heightmap is there perfectly. Now, i might continue and also add materials
(also from satellite data) but for now it's already a pretty good result.

Sources:
Try this yourself!
 
Last edited:
Back
Top