Jump to content

WrinkleysRule

Wrinkley
  • Posts

    245
  • Joined

  • Last visited

  • Days Won

    56

Posts posted by WrinkleysRule

  1. Just a quick note regarding Microdem, on the newer versions you will need to right click in the map area to bring up the full Display Parameters option.

    Also if when drag dropping .tif into Google Earth it is basically a whiteout, open in Microdem and either Save map as image --Geotiff (greyscale or Quick (or Deleiberate) map  export to Google Earth only change the z range if necessary.

    If you have further problems like high areas of your dem not translating properly and flattening out ( normally high brightness) in Giants Editor then open SRTM in MIcrodem and adjust the upper zRange to  lower zRange  + 255 this will spread the greyscale over a larger range, this has the effect of darkening the SRTM as the upper hight values now use a lower part of the greyscale band, the height  values of the final dem should not be affected.

    • Thanks 1
  2. Your problem appears to  caused by subsetting the area as you have no way of knowing what the max and min height levels in your subsetted area are.

    Thers is no need to subset any SRTM, possibly  you are  confusing this tutorial wth another one by somebody else.

    All you need to do is open the SRTM in MIcrodem change the Z range of the Whole SRTM then  in Micro dem either save as GeoTiff and drag drop into Google Earth or Quick map export to Google Earth and crop the area using the method described in the above tutorial.

    Using the figures you have quoted

    Ratio  516/172 = 3

    maxHgt in GE   255/3 = 85

    so your new zrange over the whole SRTM will be  85  min  255max

    Hope this helps

  3. 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

     

  4. 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. Ireland, Northern Ireland, Scotland and Wales have their own data sets albeit very limited a LIDAR Google search for the relevant area should bring up results.

    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 following,

    OSM Grid

     LIDAR Composite Catalogues --2020--LIDAR Composite DTM 1m 2020 Index--LIDAR Composite DTM 2020 2m Index
    the overall coverage will then be displayed

    mZkqKLo.png

     

    Should you require DSM files in the LIDAR Composite Catalogues then select --2017 and the relevant data set, in this data set are some 25cm and 50cm resoloution files but beware these are in the range of 200mb - 1gb in size and may require the use of Geospatial programme like QGIS to view and also not cover the whole area shown.

    Other data DSM/DTM files coverage can be also be seen by selecting the National Lidar Programme Catologues --2021--National Lidar Programme DSM (DTM) 2021, all years/data sets will need to be selected to get the full coverage available.

    Any of the above data sets, once downloaded and unzipped are easily used for map.dem.png as they all contain GeoTiff images that can easily be drag/dropped into Google Earth

    Once done close the Layers panel, zoom in to your chosen area and selecting the polygon symbol on the left, Left click to begin drawing the polygon around your chosen area

    Pic

    z4R6Pxb.png

    On the right hand side select under "Download your data" the down arrow "Get Available Tiles" another Download your data box will open.

    The first box marked "Product" allows selection of the various data products available in this case LIDAR Composite DTM has been selected
    Second box marked "Year" is the date the data was compiled
    Third box marked "Resolution" allows selection of the various resoloutions avalable in this case DTM 2m is selected

    A list of the required tiles for your chosen area is listed under "Available tiles" just select each tile to download
     

    91f717R.png

     

    A 2m DTM tile is around 20mb and a 1m DTM file is around 70mb

    Download all the files listed that cover your chosen area and unzip them all
    Inside the folders will be a file with the Tile name and a tif file type e.g. SP32ne_DTM_2m.tif
    Drag and drop this file (and any other file required to cover your chosen area) into Google Earth and after the flying to location pop up, 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 in 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,  in the image editor,  use the clone tool on a small setting (5 pix max,hardness 0) to just run down the edge or you could leave it and correct it in GE with the replace terrain tool.

    Below is an example of part of a 25cm resoloution DSM file

    JfaeLt2.png

     

  5. Open map in GE
    goto  Windows(C) -Programme Files(x86)--Farming Simulator 2019 --data- maps -trees and import the releveant i3d into your map (i.e. birch.i3d)
    in GE --Edit --Replace -- a Replace box will open
    Select the tree you want to replace and and select "Load" in the "Target Section" i.e birch_stage_3
    Select from the imported birch.i3d the tree you want to use to replace the original i.e birch_stage_4 (or any other size for that matter)
    Select "Load" in the "Replace with" section
    you should now have , "Target" --the tree you are replacing and "Replace With" the tree you are using as your replacement.
     
    Select Replace All
     Every tree of the type you selected on the map as the Target has now been replaced with the tree you selected in Replace With retaining original scale and translations.
     
    Save and rezip map.
     
    • Thanks 1
  6. 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 colour
    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

     

    https://earthexplorer.usgs.gov/  Requires registration to download -- has the latest files and are of a better quality
    https://apps.nationalmap.gov/downloader/#/    USA only   No log in required
    http://viewfinderpanoramas.org/dem3.html  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.

    SRTM files must be in the Geo.Tiff format for this tutorial to work

     

    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

    For later versions of Blender 2.93 and above see updated Border method on page 3 of this topic

    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 for example i.e 37 to 560m = 523m to keep the same ratio between the min and max heights  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

    If the max height is above 255 you will have to adjust the heightScale value in the map i3d to the higher value (not recommended but can be a max of 355m otherwise distortion will occur) and adjust the max height figure  in the above example to suit

    A minimum height of 10m is advisable  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 and  in GE there will be a discrepancy in the readings this is due the different way each does its own height calculations 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 5