Tutorial New Route With Lidar Setup Guide.

Discussion in 'PC Editor Discussion' started by alex#5853, Jun 6, 2025 at 4:38 PM.

Tags:
  1. alex#5853

    alex#5853 Member

    Joined:
    Sep 27, 2024
    Messages:
    64
    Likes Received:
    61
    OK.
    I’ve spent a day exploring available tutorials on setting up route scenery layout with LIDAR and want to share this written manual with you. And save it for myself as well :) I think text manual is always better than video. Anyway, cheers to DTG Lukas and TheTrainGuy4. I used their videos as base material.
    The manual is quite long, but pretty simple once you get the idea of what you are doing.

    I split it in 3 parts:
    1. Work in Google Earth
    2. Work in QGIS to get basic dem and LIDAR
    3. Work in UE4

    First things first - prerequisites:
    1. QGIS https://qgis.org/download/
    2. Google Earth account https://earth.google.com/
    3. Google Maps API key (if you want google overlay in UE4) https://developers.google.com/maps/documentation/javascript/get-api-key
    4. LIDAR data. This one depends on the area you want the data for and can come in different formats (formats are not a problem since we have QGIS to convert it into the one that UE4 can work with). For the UK, as an example, you can get it from here https://environment.data.gov.uk/survey


    Work in Google Earth

    Creating route KML.

    1. Open Google Earth
    2. Create a project
    3. Draw a track path on the map
    4. Add checkpoints (stations, POIs, etc, whatever you think is important for your route). This data will be used in UE for quick landscape tiling and jumps to checkpoints.

    In my example it’s single station and short part of tracks

    [​IMG]

    When you finished drawing. Export the data in KML format.

    That’s it with Google

    Work in QGIS to get basic dem and LIDAR.

    Obtaining base dem data.
    This data has less resolution (accuracy) than LIDAR data but good as a foundation and for distant scenery

    1. Open QGIS.
    2. Install 2 plugins: QuickMapServices and SRTM Downloader. Screenshot shows them installed. To install, go to “All” tab and search by name.
    [​IMG]

    3. Create a new project.
    4. In the Content Browser on the left, select OpenStreetMap layer and drag it into the Layers window under the Content Browser. It will display the map.[​IMG]

    5. Open project properties (Project -> Properties)
    6. On the “CRS” (Coordinate Reference System) tab filter available by 4326 (it’s the ID of the CRS), that will leave you with the only available option: WGS 84. Select it and apply.[​IMG]
    7. When it’s done, position the map in the way that the whole route fits in.
    8. On the top bar menu click Plugins -> SRTM Downloader -> SRTM Downloader
    9. In the opened window click “Set Canvas Extent” and set output path and hit download


    [​IMG]

    It’ll prompt you for credentials. If you don't have one, the prompt has a registration link (super easy).

    After the downloading is completed you will see new layers on the map, and most importantly you will have N .hgt files in the download location. These are the only ones we care for. The rest you can safely delete.

    Creating LIDAR data.
    This one might look scarry but you have to remember the base algorithm of the process and then you don't need the manual at all. The algorithm is:
    Import your LIDAR tifs -> Merge into one -> Reproject into Pseudo-Mercator -> Break one into multiple tifs -> Convert tifs into acs.

    Now step by step.
    1. Create new project in QGIS
    2. Drag your LIDAR .tif files into QGIS. If QGIS prompts for conversion, convert with highest accuracy.
    [​IMG]
    3. Merge all tiffs into one. Raster -> Miscellaneous -> Merge
    You’ll see a window like on the screenshot. Hit three dots next to the Input Layers field and select all your tifs on the next window. (only LIDAR tifs!)

    [​IMG]

    [​IMG]

    Press run to execute
    New layer called “Merged” should appear in the Layers window. Leave only this layer. Delete the rest[​IMG]

    Now Reproject this single tif into WGS 84 PseudoMercator (UE4 friendly projection)
    1. Raster -> Projections -> Warp(Reproject)

    2. Set input layer “Merged” .

    3. Set source CRS to the CRS of this layer. (if not sure, right click the layer -> Properties, and on the Source tab you’ll see your layer CRS) In my case it’s 27700

    4. Target should be WGS 64 / Pseudo-Mercator. ID 3857
    [​IMG]

    5. Hit Run to execute. Now you have a new layer “Reprojected”. You can delete “Merged” safely.
    [​IMG]

    Now we need to split this big reprojected layer into small pieces.
    1. To do that right click the layer -> Export -> Save as… and set the parameters same as on the screenshot [​IMG]
    2. After export is completed delete “Reprojected” layer
    3. Drag and drop exported tifs back into QGIS, we need to convert them into UE friendly format.
    4. You might have many pitch black tiles that store 0 valuable data. You want to remove these tiles. To know what tiles to remove you can mark/unmark the checkbox next to the tile in the Layers window and see what disappear/appears on the map. [​IMG]
    [​IMG]
    5. When finished, delete unused layers.

    Now we want to convert to acs.
    1. Then. Raster -> Conversion -> Translate (Covert Format…)
    2. In the opened window click “Run batch…”[​IMG]
    3. In the “Input Layer” column click autofill and select layers you want to convert[​IMG]
    4. In the “Converted” column for the first row click on … 3 dots. The give any name you want, like lidar_tile and select output format .asc and hit save[​IMG]
    5. You will be immediately prompted for autofill settings. Select Fill with numbers [​IMG]
    It will automatically populate all rows below with autoincremented number

    [​IMG]
    5. Run to execute.

    That’s it. QGIS manipulations ends here.
     
    • Like Like x 1
  2. alex#5853

    alex#5853 Member

    Joined:
    Sep 27, 2024
    Messages:
    64
    Likes Received:
    61
    UE4 Part.


    This one is pretty simple, though can take most of the time due to landscape tiles generation.

    Initial setup and folders creation.
    1. Create a new route. Set coordinates somewhere in the center of the route. I simply put Lovestoft coordinates in my case.
    2. Create folder called Map in you project root and move generated by UE level from the root into there
    3. Inside Map folder create dem folder and put .hgt files there
    4. Inside Map folder create LIDAR folder and put .asc files there
    5. Inside Map folder create KML folder and put .kml file there

    I might be wrong in the folder naming convention, and if I am, please correct me, but for the sake of the manual names don’t matter.


    Set up your KML data.

    1. Switch to route building mode
      [​IMG]
    2. In the Route Building Mode settings go to the “Use Guides” tab and drag your KML file into the KMLSource array. Create array element if the array is empty.
    3. [​IMG]
    3. Click Show Guides at the bottom of the tab
    [​IMG]

    Now, if you click the Route Map button you will see your points there

    [​IMG]




    Configuring Route Tiles Source Data
    1. In the Route Building Mode settings go to the “Create Tiles” tab
    2. Select all your .hgt files and click “Use selected assets” at the bottom of the tab. Selected files should appear in the Source Data array of this tab.
      [​IMG]
    Creating tiles
    Now when we have our source data configured. We can create our tiles. To do that

    1. Open console (tilda ~)
    2. Run ts2ed.experimental.CreateSceneryAndLandscapeTilesFromKML 3 . This command creates landscape tiles along the path that you created in GoogleErth (kml file). The number following the command specifies how many additional tiles will be placed around the tile through which the path passes.

    After a while you will have tiles in place. [​IMG]


    Adding LIDAR data.
    1. In the Route Building Mode settings go to the “Snap Landscape to Track Tab” tab
    2. Select all your LIDAR files
    3. At the bottom of the tab click “Use selected assets”. It should populate “Lidar Source Data” array [​IMG]

    4. Select tiles in the world editor -> Right click -> Apply lidar data. Your Lidar data will be applied [​IMG]

    Google maps overlay.

    1. Get google api key. (google it)
    2. Place it here and enable [​IMG]

    3. Voila [​IMG]


    THE END.


    P.S.: Dear DTG developers, if you find any mistakes and inconsistencies in this manual, please, bring them up.
    P.P.S: Sorry for poor formatting, I'll fix it later. Maybe
     
    • Like Like x 1

Share This Page