Jump to content

WrinkleysRule

DEM's and Borders the Easy Way

Recommended Posts

The aim of this tutorial is to create a 2k x 2k map with a 2k Border based on a 30m SRTM downloaded from opendem.info using a blank map based on the Ravenport (mapUS) .
It requires a working knowledge of Google Earth, Giants Editor, Image Editors and Blender

First a list of things that are required,

Google Earth
Image editor (Photoshop,  Gimp etc) ---  Paint.net not recommended as it doesn't appear to save in 8bit greyscale format only index or rgb.
Giants Editor
Giants DEM Converter (modified version contained in attached Items.zip. If using original you will have to rename the image to D05_DEM.png)
Snipping Tool (Windows, All programs, Accessories)
Blank 2K Starter map of your choice –If using a larger map ensure the files you create are the correct size  i.e. 4k map dem 2048 x 2048 weight files 4096 x 4096
Blender (Only Necessary if creating DEM Border)
MicroDem  (Only necessary if multiple SRTM’s required or max height difference greater than 255m)


Download the Items.zip attached to the end of this tutorial which contains the Area.png and Overlay.i3d
Create a new folder on the desktop and place the Items.zip file in it and unzip.


NOTE:If using Felsbrunn (mapDE) as a base rename the following files upon completion of the tutorial
mapUS_dem.png to mapDE_dem.png, sand04_weight.png to beachSandWet04.png

If you do not want the border just ignore any reference to it in the tutorial.

There are several places you can obtain SRTM’s and they range in accuracy from 90m (3 arc Second) down to 10m (1/3rd arc Second), a list of sites is below


http://earthexplorer.usgs.gov/--- Requires registration to download -- has the latest files and are of a better quality
https://viewer.nationalmap.gov/basic/-- USA only   No log in required
http://www.viewfinderpanoramas.org/Coverage%20map%20viewfinderpanoramas_org1.htm-- No log in required
http://www.viewfinderpanoramas.org/Coverage%20map%20viewfinderpanoramas_org3.htm-- No log in required


DOWNLOADING the SRTM

OpenDem.info uses data from Copernicus and also has a list of other free DEM sites.

https://opendem.info/link_dem.html No log in required
To Download
Select -- OpenDemEurope ---Download 1 arc-second tiles EPSG:4258
Select the OSM-WMS checkbox
Zoom into the proposed area of your Farm click and drag to move the map
Press and hold Control --- right click drag to form rectangle
A download pop up will appear on release of mouse button
Select dataset(s) (in blue text) and download.

 

Pic_1

8uRVz7K.jpg

MARKING OUT the FARM and BORDER AREAS

Open Google Earth ensure that the Terrain exaggeration (Tools-- Options) is set to 0.01.
Zoom to your preferred location and create a 2.1k horizontal and vertical line in the shape of a cross, saving each line (the extra length of .1k is to allow for better placement later).
Select the Add Image Overlay icon and browse to the location of the Area.png (from the items.zip) and open.

You will now see a red square with green markers, adjust the edge markers (T shape) to fit the horizontal and vertical lines previously made this will give you a 2.1k square which you can move over the location to finalise the area by means of the centre cross or rotate using the diamond (if you move any of the corner markers you will distort the square and have to reset the edges).

Once you are happy with the position click OK, rename the Untitled Image Overlay in the Places Panel to 2K Marker. If you wish to move it again right click on the 2k Marker in the Places panel and select Properties.
At this point mark and name the area using the Add Placement tool as when adding the SRTM Google Earth zooms right out so the Markers may not be visible for you to centre the cursor on to crop the SRTM.

Pic_2

X49mUGr.jpg

BORDER

To mark out the border all that is required is a line of 2k in length (using the Ruler Tool) leading away from each of the 2k Marker’s sides (4 in total ).
Right click on the 2k Marker in the Places Panel and select copy then paste rename this to 6k Marker and adjust each side to the ends of the 4 lines as before for the 2.1k area

Pic_3

hYPM3Gu.png

CREATING the DEM’s and OVERLAY IMAGES

 

If more than 1 SRTM is needed to cover your selected area or the min/max height difference of your area is greater than 255m you may need to use Microdem to either merge them together to ensure correct shading between SRTM’s or readjust the max/ min figures to allow proper scaling in GE.

To avoid confusion here I have covered this in a separate section at the end of the tutorial.

Ensure your monitor is at its highest resolution
Select the Save Image Icon in the top toolbar then Map Options and deselect all items in the dropdown box, (this will remove certain text items from the image) and in the Resolution dropdown select  Maximum (4706 x4800 or whatever max your monitor allows)
You will require 3 images for the Border DEM and 3 for the map DEM and overlays
Check that all items in the Layers Panel of Google Earth are deselected
Drag and drop your SRTM directly into Google Earth
At the Google Earth prompt select Crop and centre the yellow cursor over your chosen area and in the New Image Overlay box select OK

Pic_4

SIKJa4H.jpg

Deselect-Reselect the 6k Marker (or just the 2k marker if not doing a border).
Google Earth to Full screen and zoom in till the area marker is as large as possible and the left hand edge is aligned to the X of the Save image box
If you have rotated your selection away from North South to make things easier in the image editor I suggest using the frame edge of Google Earth as guide to align the top of the 2k or 6k marker.

At this stage it is advisable to create a KML file to assist with any further edits in the future, once created it will automatically open Google Earth at your location with both the area markers and SRTM (s) shown.

In the places Panel deselect all the Line Measures then right click on the Temporary Places entry select Save Place As  -  farm name.KML to your desktop
Deselect the Placement marker you created ealier
As Google Earth only saves in jpg format this is fine for  the Border images as jpg artifacts will not cause much of a problem whereas the Snipping Tool is better for the map dem as it can save in png format so does not suffer from any artefacts.

Throughout all the following steps ensure you DO NOT move the Google Earth Image after adjustment otherwise you will have problems with alignment in the image editor

For the three Border images

Google Earth to Full screen and zoom in till the 6k area marker is as large as possible and the left hand edge is aligned to the X of the Save image box.
Make sure the Resolution is set to Maximum (4706 x4800 or whatever max your monitor allows)
With the SRTM and 6k Marker visible select save image – save as 6k_BDEM.jpg to your desktop folder (if the SRTM is visible but the 6k marker isn’t just Deselect/Reselect the 6K Marker check box).
Deselect the SRTM in the Places Panel and ensure that both the 2k and 6k Markers are visible
Save image – 6k¬_BMarker.jpg
Deselect the 2k Marker and Save Image -- 6k_BGE.jpg

Map DEM and GE, Grass, Sand and Asphalt Overlays

Re Select the SRTM and 2k Marker in the Places Panel
Google Earth to Full screen and zoom in till the 2k area marker is as large as possible and the left hand edge is aligned to the X of the Save Image box
Using the Snipping Tool in Mode -Window Snip select new and hover the cursor over the Google Earth window and left click then File – Save as DEM.png to your desktop folder
In the Places panel deselect the SRTM
Using the Snipping Tool as before this time saving as GE.png
In the Layers Panel select Primary Database and Roads, select the Sun icon in the top toolbar and adjust the slider for maximum darkness and again using the Snipping Tool save image as Roads.png


Pic_5

iYMArEc.png

Open the Image Editor (Photoshop in this case) and import all three images into it
Select the DEM.png and copy/paste it into the Roads.png then do the same for the GE.png
So you have an image comprising of three layers with the GE image uppermost
Ensure the rulers are set to Pixels and zoom in to the left hand edge of the Area marker note the reading, do the same for the right hand edge then subtract one from the other and create a new image of that size.
Copy paste this new image into the image consisting of the three layers and adjust it so that it fits inside the red area marker of the GE layer.
Pic_6

3IiABHh.png

Select this new layer with the Magic Wand tool and then Image –Crop
The new layer can now be deleted
With only the DEM layer selected Edit – Copy, File- Create New and paste the DEM image into the new image.
Flatten and Resize this image to 1024 x 1024 and save it as mapUS_dem.png in your desktop folder (the DEM is  resized by GE to 1025 x 1025 after saving in GE)

Overlays


Asphalt


Returning to the original 3 layer image, the DEM layer can now be deleted.
Resize the remaining image to 2048 x 2048
With only the GE layer selected Edit – Copy, File- Create New and paste the GE image into the new image Layer –Flatten Image and save as 2k_GE.png
Do the same for the Roads layer and save as 2k_Roads
Open the new 2k_Roads.png and select Image – Mode –Greyscale,  Image –Adjustments-- Brightness/Contrast –Brightness slider full left Contrast slider full right which should leave just the road layout visible.
Save this as asphalt04_weight.png

Grass and Sand

Open 2k_GE.png in the image editor
Image --- Mode --Greyscale
Filter --- Stylize -- Find Edges
Image – Adjustment Brightness/Contrast adjust Contrast to a higher level (approx +50) to further enhance the edges.
Image --- Adjustments --- Curves --Move both adjustments towards the centre line (Input 27 Output 0 in this case)—detail can be increased/decreased by adjusting the two points accordingly
Save as sand04_weight.png
Image --Adjustments -- Invert
Save as grass04_weight.png

Pic_7

WKTFMoC.png


To get the Roads to stand out more open the asphalt04_weight.png in the image editor

Select Color Range and select the black area
Select --Inverse Selection – and Copy
Paste into grass04_weight,  then (only new layer) -- Image-- Adjustments --Invert
Flatten Image and resave as grass04_weight.png
Do the same for the sand04_weight


Pic_8

Va5lvU4.png

You can now try the files out by copy/pasting them into the mapUS folder and opening the map in GE
then import the Overlay i3d,  adjusting the Y translation of the Overlay transform group as necessary (providing you have saved the GE image as 2k_GE you should not need to alter image name/location in notepad ++).

The terrain will look like a staircase and can be smoothed by using the terrain brush but a better way is to convert the mapUS_dem from 8 bit RGB to 16bit Greyscale.
I have altered the cmd scripts in the DEM converter so they work on just drag and drop and not specific names like before.
Copy paste the mapUS_dem into the GIANTS_DEM_Converter folder and drag/drop onto the convertTo16bitChannel.cmd file a mapUS_dem-16Bit.png will be produced.
 Open the new mapUS_dem-16Bit.png in the Image Editor and select Filter –Blur –Gaussian Blur –Radius 5.0 pixels and save to the mapUS folder as mapUS_dem.png.
Open the map in GE and the terrain should be perfectly smooth with the height levels within 5m of what they should be when compared with Google Earth

Pic_9

TJ9VsQM.png

 

Pic_10

G77GHrF.png

CREATING the BORDER

Using the three images created earlier and applying the same method as for the Map DEM and GE.
Open the Image Editor (Photoshop in this case) and import the 6k_BGE, 6k_BMarker and 6k_BDEM images into it
Copy/Paste the 6k_BGE.jpg and 6k_BMarker into the 6k_BDEM image creating a three layer image

See ---Pic_5 Above

Ensure the rulers are set to Pixels and zoom in to the left hand edge of the Area marker note the reading do the same for the right hand edge then subtract one from the other and create a new image of that size.

See Pic_6 Above

Copy paste this new image into the image consisting of three layers and adjust it so that it fits inside the red area marker of the 6k_GE layer.
Select this new layer and Image –Crop then delete new layer
Resize image to 4096 x 4096
With just the DEM layer selected
Select All – Copy –Create New—Paste –Flatten Image—Save as - 6k_DEM.png
Do the same for the 6k_BMarker and 6k_BGE layers saving as 6k_Marker and 6k_GE respectively

Blender

Open Blender delete the cube ensure that the units are set to metric.
Then do the following
In  Object mode- Add - Mesh –Planes (can also be done by adding Images as Planes but will lead to distortion and problems with scaling)
Edit Mode --
Subdivide –Number of cuts 10
Add Texture – 6k_Marker.png
Image Mapping --Extension --Clip
U/V Unwrap Plane and assign Texture


Pic_11

TC144qO.png

Object mode –
Add New Texture ----add the 6k_DEM.png to the next slot with the following settings
Image--Color Space to --Linear
Image Mapping --Extension --Clip
Mapping-- Coordinates --Generated
Influence --Deselct Color Select –Intensity


Pic_12

kOZGPJP.png

Add Modifier - Subdivision Surface -Simple - Subdivisions - View 3
Add Modifier - Displace –
 Texture - dropdown box select  6k_DEM texture
Texture Coordinates – UV
Strength –  0.1     --- set to 0.1 to allow fine adjustment when opened and aligned in Giants Editor


Pic_13

xVWFFCB.png

Apply Subdivision Surface Modifier then Displace Modifier
Add Modifier –Edge Split and apply
Do not apply location or scale
Export as Giants i3d as Border_1 to your desktop folder
Open in Notepad++ and correct image file path.
Don’t close Blender as further adjustments will be necessary
Open map in GE and import the border_1.i3d
Scale X =3000, Scale Z =3000  (plane 2m square border 6000m square)
Y Scale this is dependant on the max height of your terrain over the whole border area (obtained from Google Earth) in this case its 281m so
 Y Scale equals 281 x 10 =2810  if max height below 100m then x 100


Adjust Y translation to raise lower border to fit map (may require slight adjustment to Y scale to match perfectly)


Pic_14

0dQXGjL.png

Note where the 2k Marker is in relation to the map edges
Back into Blender to delete the centre area to allow a closer match with map edges without encroaching on main map area.
Edit Mode
Border select –“B” and click drag to select an area 2 squares Inside the 2k Marker then ”X” to delete faces
Select Edge mode
Shift Alt and select one of the internal edges then lower (“G”- “Z”) by approx 2m


Pic_15

lDS0k4b.png

Export as Giants i3d -- this time as Border.i3d
Open in Notepad++ and correct image file path.
Open map in GE and import the border.i3d
Scale and translate as before, there should now be no incursion of the border into the main part of the map making it easier to match the edges
Finally replace the 6k_Marker .png with the 6k_GE.png using the Materials Editing panel in GE
To remove the shiny effect adjust the Smoothness and Metal in the Materials Editing window to 0.

Finished border and DEM


Pic_16

73yWTSs.png

Google Earth colours obviously do not match the FS colours so a suggestion for matching the colours of the fields is to use the Distance Textures from your map files and modifying the 6k_GE.png
You can also create normal and specular maps to add to the Border if you wish to make things stand out
The poly count of the complete border is 15,488  in comparison the US map border/boundary has 45,836 (and only covers three sides) .



MICRODEM

Microdem is a freeware mapping program available from here


https://www.usna.edu/Users/oceano/pguth/website/microdem/microdem.htm

Ensure that all the SRTM’s you wish to merge are contained in one separate folder.
If merging using Earth Explorer files ensure you have the .dt2 files i.e. n51_w003_1arc_v3.dt2 as using the normal GeoTiff.tiff file causes projection problems between Microdem and Google Earth.

Open Microdem
File –Open and merge DEM’s
Navigate to the relevant folder select all DEM’s and open
Once merged DEM’s are displayed
Select – Modify –– Display Parameter -- Elevation
Select zRange --  If the min/max height difference is 255m or less and max height less than or equal to 255 then the Zrange can be left as it is, for other values see Note 2 at the bottom of this section


Under Display colours select Gray scale (monochrome) and click OK
Pic_17

bCS3234.png

File – Save map as image – Quick map Export to Google Earth
This will then open up your merged and adjusted DEM in Google Earth at the correct location.
Right Click the Microdem entry in the Places Panel of Google Earth – Select – Properties and adjust the Transparency slider to Opaque and continue with the tutorial.

Note:
Some SRTM’a display a completely white images in Google Earth, if this happens open the SRTM in Microdem and follow the above steps to modify the Display Parameters.

 

Note 2

Zrange Values


If the difference in min/max  height values is greater than 255m  i.e 37 to 560m = 523m to keep the same ratio between the min and max heights and stay within the 255 limit required by GE it’s just a case of  bit of maths

i.e. min 37 max 560 – ratio  560/37 = 15.13

max hgt in GE 255/15.13  = 17

so new Zrange will be min 17m,  max  255m

For min values of 10m or below with a max height above 255 the only option is to reduce the max height to 255m.

10m figure is only a guide as GE does not allow any terraforming below 0m so no rivers or holes can be dug
After adjusting the Zrange in Microdem you may find that when you check the various heights against Google Earth in GE there will be a discrepancy in the readings this is due to the restriction in GE of a max height of 255 metres (255 shades) but the difference between two points should be approximately the same i.e.
Google Earth point 1. 325m, point 2. 150,  
GE point.1 250, point2. 75m
diff between points 1 and 2= 175m.

 


As always the final result is dependent on the quality of the original data, below is an image which shows two unedited 30m SRTM’s of this particular region.


Pic_18

aVFGRM2.jpg

You can see that the Shuttle data is a lot smoother and more defined which means that it might only require converting to 16bit and not adding any Gaussian Blur factor to create a smooth terrain.

Further Notes

 

Some people have been having problems in using this tutorial so here are some helpful hints

 

Read the tutorial carefully

 

It requires a working knowledge of Google Earth, Giants Editor, Image Editors and Blender, there are several tutorials available on the web on these programmes if needed.

 

Also it is based on a blank 2k map using the Ravenport (mapUS) map

If using map based on the Felsbrunn (mapDE) rename the following files upon completion of the tutorial

mapUS_dem.png to mapDE_dem.png, sand04_weight.png to beachSandWet04.png or beachSandRough04.png.

To ensure the new weight files you create display correctly, check that all the other weight.png's in the map folder are black i.e. no texture, (white area texture created, black area no texture created).

 

Obviously if you are using a 4k or even 16k map the Map DEM and GE, Grass, Sand and Asphalt Overlays image sizes will have to be increased by a factor of 2 i.e. 4k map 2048 x 2048 DEM, 4096 x 4096 overlays.

Items.zip

  • Like 1

Share this post


Link to post
Share on other sites

High definition 1m DSM/DTM LIDAR data for some areas of England have been released by the Environment Agency on the  https://environment.data.gov.uk/ website and is available for  free download.

The data consists of 5k x 5k tiles in a geo tiff format, to see what areas are currently available for download got to

https://environment.data.gov.uk/DefraDataDownload/?Mode=survey

Select the Layers symbol (top right),

OSM Grid

National Lidar Programme Catalouge 2018

Then the data set you want ( in this case the DTM 2018 files have been selected)

Pic

165yvvN.png

If your area is covered zoom in further to your chosen area and select the Download Your Data icon (Arrow pointing down)

Select the polygon icon and on the map Left click to begin drawing the polygon around your chosen area.

 

Pic

NCuKwFv.png

Once happy with selection select -Get available tiles- and in the Product Box select “National LIDAR Programme DTM“ (or DSM) from the dropdown box and download all the available tiles.

 

Once downloaded  unzip the files e.g.

Zip--National-LIDAR-Programme-DTM-2018-ST81ne

Folder --National-LIDAR-Programme-DTM-2018-TL63ne –P_10784 – Contains two files one with an .ftw extension and one with a .tif extension.

The file with the .tif extension is the one to use.

Drag and drop it into Google Earth and after the flying to location pop up and in the next prompt menu select Scale and in the New Image Overlay Box select OK.

Then carry on the tutorial in the normal way at the CREATING the DEM’s and OVERLAY IMAGES section

In cases where there are two or more tif images required to cover your area you will find that there is a an overlap at the edges (this is due to the projection differences between Google Earth and Ordance Survey data) to overcome this  use the clone tool on a small setting (hardness 0) to just run down the edge in the image editor or you could leave it and correct it in GE with the terrain tool.

Share this post


Link to post
Share on other sites

Paul I think there are fs17 videos. Looks like he just found better maps to use. Correct wrinkleys?

Share this post


Link to post
Share on other sites

Looks like some awesome info. Looks more in depth then I saw in fs17 so maybe no videos lol. 

Share this post


Link to post
Share on other sites

The tutorials are the same ones that I did  and posted on FS-UK with just the links updated to reflect better resoloution maps becoming available on line.

As I told Paul in answer to the PM he sent me I have no plans to do any video's of any of my tutorials as they are reasonably straightforward .

Providing you Read and Follow the various instructions

 

Share this post


Link to post
Share on other sites

I agree your instructions are great. Appreciate the detailed info. Great work. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...