Page 1 of 5 12345 LastLast
Results 1 to 10 of 57

Thread: [WIP] Atlas Maps of Valmere | From Real-World Height Data to Vector Map

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Wip [WIP] Atlas Maps of Valmere | From Real-World Height Data to Vector Map

    Hi All,

    I am starting work on a new continent from scratch, so this thread is going to be a sort WIP/guide/rundown of my process, starting with a continent landmask, already projected to equidistant conic.

    Here is the landmass I will be working with:

    Click image for larger version. 

Name:	valmere_mask.png 
Views:	329 
Size:	190.9 KB 
ID:	124026

    I'll need to finish up the coastline detail before I can continue with it. In the meantime, the next few posts will detail how and where I source my DEM data, and working with projections in GDAL from the command line.

    Bonus: How I create the coastline in Adobe Illustrator:

    Click image for larger version. 

Name:	PessimisticAmpleGeese-size_restricted.gif 
Views:	219 
Size:	770.6 KB 
ID:	124027

    (Fair warning, my coastlines are not the best. I'm still studying real-world coastlines to get better at it)

    Tutorial Links

    * Downloading real-world DEM data
    * Managing a Fantasy World Map with GDAL
    Last edited by morne; 07-25-2020 at 04:27 PM.

  2. #2
    Guild Artisan Adfor's Avatar
    Join Date
    May 2018
    Location
    Western Pennsylvania
    Posts
    981

    Default

    It looks really good so far! The land mass looks natural. A lot of the jagged edges are indicative of rivers exiting to the sea, while the gulf/bays are smooth from erosion of circular water patterns.

    Looking forward to seeing what you do with elevations!

    IR

  3. #3

    Tutorial Downloading DEM maps for use in Photoshop

    This guide will show where to obtain high resolution DEM data and convert it using QGIS and command-line GDAL to a usable format for use in Photoshop. The data we will be downloading is best used for continental to global scale maps. The resolution is something like 40-230 meters per pixel, depending on the latitude. This data is what I use the create the heightmaps of my landmasses.

    For this tutorial, we will assemble a full heightmap of Australia.

    Downloading the Data from USGS

    First, create an account at https://earthexplorer.usgs.gov/. It is also very useful to download and install the Bulk Downloader application https://lta.cr.usgs.gov/EEHelp/DownloadBulkApplication. At the time of writing this, USGS seems to be having issues with providing a download link to the bda application, but hopefully that will be fixed in the near future.

    After logging in, return to the main page.

    Begin a search by specifying the search limits. I like to navigate to where I want to search in the map view, then click the "Use Map" feature to define the search area.

    Next, navigate to the Data sets tab. Select Digital Elevation -> GMTED2010.

    At this point, you can skip to the results tab to initiate the search and show results. The results controls drop down is useful for showing the footprints of each data set in the map view.

    Click image for larger version. 

Name:	PinkGloriousHydatidtapeworm-size_restricted.gif 
Views:	109 
Size:	3.32 MB 
ID:	124037

    Note: This gif turned out really bad, oops. This link is a little better.

    Select the data sets you want, and either download them individually, or use the bulk downloader to download multiple sets at once. You'll want the 7.5-arcsecond data, as that is the highest resolution.

    Merging the Data in QGIS

    If you have not already done so, install QGIS: https://qgis.org/en/site/forusers/download.html

    Unzip all the data sets, then open QGIS.

    Go to Layer -> Add Layer -> Add Raster Layer (or use Ctrl + Shift + R)

    Click the ellipses to browse and navigate to the data sets. Select and add each *__gmted_mea075.tif file.

    At this point, you should have something that looks like:

    Click image for larger version. 

Name:	qgis-bin_Aearr2dZk8.png 
Views:	99 
Size:	1.01 MB 
ID:	124034

    (Hey look, New Zealand is in our map!)

    The first problem we need to solve is that each data set tile is not properly level set to its neighbors. Fortunately there is a QGIS tool for that!

    Run Raster -> Miscellaneous -> Merge. Use the ellipses to select all layers in the project, then click run. It may take a few minutes, but the end result should look like this:

    Click image for larger version. 

Name:	qgis-bin_1xexaEkcsn.png 
Views:	91 
Size:	595.1 KB 
ID:	124033

    OPTIONAL STEP: As an optional step, you can reproject the data before saving and exiting QGIS. The original data, I believe, is in equirectangular format.

    To do this, run Raster -> Projections -> Warp (Reproject). Under the Target CRS option, select the icon to the right to choose from pre-defined CRS's (If checked, uncheck the "No CRS" option). I searched in the Filter box for "Australia" and found GDA94 / Australian Albers---works for me! (disclaimer: I am *not* a GIS/mapping expert). Select run to process the reprojection command. This will almost certainly take a long time.

    To export from QGIS, right-click on the layer that you want to export (this layer will probably be called "merged" or "Reproject"), go to Export -> Save As. Enter the file name you want to save it as and click okay. I called mine "australia_merged.tif"

    Converting the data using GDAL

    At this point, you may be tempted to open up the tif in Photoshop and be off to the races. More likely than not, photoshop will greet you with an entirely black image if you do this. That is because the data in the tif is scaled differently than what photoshop expects.

    For this last step, I use GDAL from the command line: https://gdal.org/. You can install GDAL using Conda forge: https://anaconda.org/conda-forge/gdal, or if you are a masochist like me you can build and install it from source

    I'm sure there are ways to do these same things in QGIS (which is just using GDAL commands behind the scenes anyways), but I find it easier to use the command line.

    Open a command line prompt where you saved the tif export from QGIS.

    Run the command:

    Code:
    gdalinfo -mm australia_merged.tif
    You should see output that looks something like:

    Code:
    Driver: GTiff/GeoTIFF
    Files: australia_merged.tif
    Size is 43200, 19200
    Coordinate System is:
    GEOGCRS["WGS 84",
        DATUM["World Geodetic System 1984",
            ELLIPSOID["WGS 84",6378137,298.257223563,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        CS[ellipsoidal,2],
            AXIS["geodetic latitude (Lat)",north,
                ORDER[1],
                ANGLEUNIT["degree",0.0174532925199433]],
            AXIS["geodetic longitude (Lon)",east,
                ORDER[2],
                ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4326]]
    Data axis to CRS axis mapping: 2,1
    Origin = (89.999861111000001,-10.000138889000000)
    Pixel Size = (0.002083333333333,-0.002083333333333)
    Metadata:
      AREA_OR_POINT=Area
    Image Structure Metadata:
      INTERLEAVE=BAND
    Corner Coordinates:
    Upper Left  (  89.9998611, -10.0001389) ( 89d59'59.50"E, 10d 0' 0.50"S)
    Lower Left  (  89.9998611, -50.0001389) ( 89d59'59.50"E, 50d 0' 0.50"S)
    Upper Right ( 179.9998611, -10.0001389) (179d59'59.50"E, 10d 0' 0.50"S)
    Lower Right ( 179.9998611, -50.0001389) (179d59'59.50"E, 50d 0' 0.50"S)
    Center      ( 134.9998611, -30.0001389) (134d59'59.50"E, 30d 0' 0.50"S)
    Band 1 Block=43200x1 Type=Float32, ColorInterp=Gray
    
        Computed Min/Max=-61.000,3159.000
    The computed Min/Max is what we are after.

    For a 16-bit grayscale image, the min/max values should be 0 (black) and 65535 (white). To change the min/max values of our tif, we can run:

    Code:
    gdal_translate -ot UInt16 -scale -61.000 3159.000 0 65535 australia_merged.tif australia_merged.tif
    Congratulations! You now have a tif that you can open in Photoshop (along with Gimp, or Affinity Photo, I presume). You can repeat this process for other continents. I have North and South America, Eurasia, and Africa also completed using this process to give me lots of resources to pull from when creating custom heightmaps.

    Click image for larger version. 

Name:	photoshop_knC5EntXYg.png 
Views:	335 
Size:	793.2 KB 
ID:	124035

    Let me know if any steps need further clarifying.

  4. #4
    Guild Member Michi il Disperso's Avatar
    Join Date
    Jul 2020
    Location
    Parma (Italy)
    Posts
    65

    Default

    Quote Originally Posted by morne View Post
    Computed Min/Max=-61.000,3159.000[/CODE]

    The computed Min/Max is what we are after.

    For a 16-bit grayscale image, the min/max values should be 0 (black) and 65535 (white). To change the min/max values of our tif, we can run:
    Wait, what did you do there?
    The original -61,3159 was altitude in meters, right?
    With that passage didn't you off-setted that?
    I try to explain: if you do that passage did the image show "max white" at 3159m and black at -61m?

    If i'm too forward just stop me ^^

  5. #5

    Default

    Quote Originally Posted by Michi il Disperso View Post
    Wait, what did you do there?
    The original -61,3159 was altitude in meters, right?
    With that passage didn't you off-setted that?
    I try to explain: if you do that passage did the image show "max white" at 3159m and black at -61m?

    If i'm too forward just stop me ^^
    Yes I believe -61.000/3159.000 is the minimum/maximum value in meters of the original tif. Photoshop does not know how to interpret that data as meters, so we are remapping the values to be the full range of 16-bit grayscale, which is 0 to 65535. This does mean that the finalized tif will show full black as being -61 meters, and full white as being 3159m, which changes the image from what you originally see in QGIS. But when I am using this data to create heightmaps, I end up adding adjustment layers and other things so much that I don't care about retaining any sort of accurate scale, I'd rather have as much fidelity as possible.

    If you wanted it to be closer to the original, instead of mapping to the full range of values, you would just map it to something less than 65535 instead. Hope this makes sense.

  6. #6
    Guild Apprentice Rwhyte's Avatar
    Join Date
    Apr 2018
    Location
    Central Coast, California
    Posts
    39

    Default

    This is great! Thanks for documenting. And the Q&A along the way is great too

    If it's ok to interject one more option...

    Quote Originally Posted by morne View Post
    ...
    At this point, you may be tempted to open up the tif in Photoshop and be off to the races. More likely than not, Photoshop will greet you with an entirely black image if you do this. That is because the data in the tif is scaled differently than what photoshop expects.
    Yes, as you open these Tifs from QGIS (32-bit images) in Photoshop, you are greeted by a black or white image, but, there are some options... (At least, with Photoshop CS5? and later).
    Under Image --> Mode --> You can convert from 32 to 16 bit:
    Click image for larger version. 

Name:	PS_Tiff_32-bit.JPG 
Views:	36 
Size:	61.3 KB 
ID:	124080

    And in that process, you're presented with options on how to re-map the 32-bit values to the 16-bit scale, defaulting to Local Adaption.
    Click image for larger version. 

Name:	PS_Tiff_32-bit_HDR.JPG 
Views:	41 
Size:	65.8 KB 
ID:	124081

    There are other options as well, Exposure adjustment would be like a linear offset. Or, Histogram Equalize stretches the image contrast to the 16-bit scale.
    If it's just the elevation gradient as an image that's important, this is great. This is less ideal if the original elevation gradients need to be maintained, since this can shift in non-linear ways
    Click image for larger version. 

Name:	PS_Tiff_32-bit_HDR_eq.JPG 
Views:	44 
Size:	59.7 KB 
ID:	124082

    One more caveat. While this is convenient, Photoshop is not equipped to handle signed (negative) values. I believe these are essentially truncated to 0 in the process. So, if the tif elevations contain negative values, and those are important, re-scaling like you've done in GDAL would be best. Here's a tif example with negative, below sea level elevations, truncated to zero in Photoshop, and lost forever, below the waves.
    However, there may be many cases where negative values can safely be treated as zero, without loosing real information. But it does depend on the source data and location (eg Death Valley, bathymetric data, etc)
    Click image for larger version. 

Name:	PS_Tiff_32-bit_HDR_signed.JPG 
Views:	53 
Size:	37.7 KB 
ID:	124083
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	PS_Tiff_32-bit_HDR_eq_16.JPG 
Views:	30 
Size:	57.6 KB 
ID:	124084  

  7. #7

    Default

    Quote Originally Posted by Rwhyte View Post
    This is great! Thanks for documenting. And the Q&A along the way is great too

    If it's ok to interject one more option...
    It is always okay to interject more opinions! There is always another way to do things. Doing the conversion in Photoshop is something I had not thought of, and could definitely be a more convenient way, especially if you don't want to work with the command line. Good note about the negative values, I think with the GMTED2010 data you wouldn't be truncating anything important, save for land depressions.

  8. #8
    Guild Member Michi il Disperso's Avatar
    Join Date
    Jul 2020
    Location
    Parma (Italy)
    Posts
    65

    Default

    Yes! Understood! Thank you!

  9. #9

    Default

    Quote Originally Posted by morne View Post
    Hi All,

    I am starting work on a new continent from scratch, so this thread is going to be a sort WIP/guide/rundown of my process, starting with a continent landmask, already projected to equidistant conic.

    Here is the landmass I will be working with:

    Click image for larger version. 

Name:	valmere_mask.png 
Views:	329 
Size:	190.9 KB 
ID:	124026

    I'll need to finish up the coastline detail before I can continue with it. In the meantime, the next few posts will detail how and where I source my DEM data, and working with projections in GDAL from the command line.

    Bonus: How I create the coastline in Adobe Illustrator:

    Click image for larger version. 

Name:	PessimisticAmpleGeese-size_restricted.gif 
Views:	219 
Size:	770.6 KB 
ID:	124027

    (Fair warning, my coastlines are not the best. I'm still studying real-world coastlines to get better at it)
    I did not really understand what happened in the video. But thank you for this insight! Do you plan to continue in this tutorial?

  10. #10

    Default

    Quote Originally Posted by Impesio View Post
    I did not really understand what happened in the video. But thank you for this insight! Do you plan to continue in this tutorial?
    Yes, today I'm going to post about how I use GDAL to manage projections of my maps. I'll likely not touch on working out the coastlines in illustrator again, but I mostly just follow the technique that Artifexian uses in this tutorial: https://youtu.be/glt_aMlqFsc

Page 1 of 5 12345 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •