Route Art How To Prepare Lidar Dem Data?

Discussion in 'PC Editor Discussion' started by protonmw, Sep 19, 2023.

  1. protonmw

    protonmw Active Member

    Joined:
    Mar 18, 2022
    Messages:
    179
    Likes Received:
    144
    Hello expert's!

    Would it be possible to give a short overview on how to prepare DEM laser scan data? Just a couple of bullet points, no need for a full tutorial yet!
    • What file format is the editor expecting?
    • What coordinates transformation must be done? DTG Matt talked about this in the live stream
    I have already installed QGIS und also have the data available. Thanks!
     
    Last edited: Sep 19, 2023
    • Like Like x 7
  2. protonmw

    protonmw Active Member

    Joined:
    Mar 18, 2022
    Messages:
    179
    Likes Received:
    144
    • Like Like x 1
  3. Oystein

    Oystein Well-Known Member

    Joined:
    May 24, 2018
    Messages:
    266
    Likes Received:
    303
    Would be great to get some pointers on this in advance so that we at least download the correct data.
     
    • Like Like x 3
  4. OldVern

    OldVern Well-Known Member

    Joined:
    Nov 2, 2020
    Messages:
    17,963
    Likes Received:
    36,552
    Yes I have a couple of folders now for potential projects with LIDAR stored ready alongside the SRTM but a heads up would be appreciated as to what we need to do to prepare it.
     
    • Like Like x 2
  5. OldVern

    OldVern Well-Known Member

    Joined:
    Nov 2, 2020
    Messages:
    17,963
    Likes Received:
    36,552
    First check as regards LiDAR data. Been looking at a short branch line in Victoria, done the markers and grabbed the 30m SRTM. Go to the Geoscience Australia "Elvis" site, draw a nice box around the area I want then get told "No data available". Oh well, will have to se what the 30m stuff looks like.
     
    • Like Like x 1
  6. protonmw

    protonmw Active Member

    Joined:
    Mar 18, 2022
    Messages:
    179
    Likes Received:
    144
    Thats bad indeed...

    I have full dataset with 1m resolution available, as ground model and also as raw surface model:
    2023-09-26 13_52_07-Geoportal-Sachsenatlas.png 2023-09-26 13_53_21-Geoportal-Sachsenatlas.png
     
    • Like Like x 1
  7. DonnyDave

    DonnyDave Active Member

    Joined:
    Jun 29, 2020
    Messages:
    222
    Likes Received:
    106
    maybe a bit of a noob question but where did you get the data set from and how did you import it to unreal engine?
     
  8. protonmw

    protonmw Active Member

    Joined:
    Mar 18, 2022
    Messages:
    179
    Likes Received:
    144
    Data is free for Saxony (Germany) and can be viewed online (thats where the screenshots are from). No Import yet!
    https://geoviewer.sachsen.de/mapviewer/index.html
     
    • Like Like x 2
  9. OldVern

    OldVern Well-Known Member

    Joined:
    Nov 2, 2020
    Messages:
    17,963
    Likes Received:
    36,552
    That is impressive.

    I extracted the 30m DEM (25m as it turned out) into Trainz Surveyor and it did not look very good at all. I have found the latest batch of NASA 30m SRTM to be rather rough and bumpy, picking up buildings or clusters of trees then averaging them into little blisters on the terrain. I actually prefer working with the Viewfinder data where that is available at 30m resolution.
     
    • Like Like x 1
  10. VictoryWorks

    VictoryWorks Well-Known Member

    Joined:
    Sep 22, 2017
    Messages:
    263
    Likes Received:
    1,379
    Last edited: Sep 26, 2023
    • Like Like x 1
  11. DTG Lukas

    DTG Lukas Developer Staff Member

    Joined:
    Dec 18, 2017
    Messages:
    68
    Likes Received:
    418
    Prepare your own 2500x2500 .asc grid in the pseudo Mercator projection :)
     
    • Like Like x 1
  12. protonmw

    protonmw Active Member

    Joined:
    Mar 18, 2022
    Messages:
    179
    Likes Received:
    144
    Hi DTG Lukas could you give some more details? I´m confused.
    Downloaded data comes in *.xyz format. What are the steps in QGIS to get an *.asc file?
     
    • Like Like x 2
  13. VictoryWorks

    VictoryWorks Well-Known Member

    Joined:
    Sep 22, 2017
    Messages:
    263
    Likes Received:
    1,379
    100%

    DTG Lukas Yeah we're gonna need more than that if you expect anyone to ever build a route

    There's so much to learn with UE/TSW that we'll use over and over whereas spending a few dozen hours learning how LIDAR/DEM works for what is essentially a one off job per route. At least help us get the landscape into the editor with some basic steps please. Once that's in we can mess around with all the other tools to our hearts content.
     
    • Like Like x 3
  14. OldVern

    OldVern Well-Known Member

    Joined:
    Nov 2, 2020
    Messages:
    17,963
    Likes Received:
    36,552
    Well I just got the link from the Norway topo site to download the LiDAR data and the zip contains the following files:

    norwaydtm.jpg

    What files to I need to extract and what do I do with them next (please)?
     
    • Like Like x 1
  15. bremen

    bremen Active Member

    Joined:
    Aug 24, 2023
    Messages:
    127
    Likes Received:
    105
    (The funny part, for me, is that .asc is a format that I use at work and has nothing to do with maps :D).

    I tried to convert one my geotiff in asc following this mini tutorial.
    https://wiki.tuflow.com/QGIS_Export_Raster_to_asc

    It generates an asc file but there are no indication of the dimensions.

    Edit. By the way, if I have to do this process for each file I'll finish for TSW5...
     
    • Like Like x 1
  16. VictoryWorks

    VictoryWorks Well-Known Member

    Joined:
    Sep 22, 2017
    Messages:
    263
    Likes Received:
    1,379
    I've just done exactly the same thing (although nowhere did I see anything about "pseudo Mercator projection"). So now I have my asc, asc.aux.xml and prj files but also have no idea what size it is, it just converted one of the DTM tiles I need.
     
    • Like Like x 1
  17. VictoryWorks

    VictoryWorks Well-Known Member

    Joined:
    Sep 22, 2017
    Messages:
    263
    Likes Received:
    1,379
    The prj file contains PROJECTION["Transverse_Mercator"] so I guess that's not right
     
  18. bremen

    bremen Active Member

    Joined:
    Aug 24, 2023
    Messages:
    127
    Likes Received:
    105
    In theory is the classic WGS 84.

    "WGS 84 / Pseudo-Mercator -- Spherical Mercator, Google Maps, OpenStreetMap, Bing, ArcGIS, ESRI"

    https://epsg.io/3857
     
    • Like Like x 1
  19. bremen

    bremen Active Member

    Joined:
    Aug 24, 2023
    Messages:
    127
    Likes Received:
    105
    The convertion does not work.
    I have placed 2/3 of the terrain of my route but when I tried with the asc it simply deleted the HGT terrain.:o
     
  20. DonnyDave

    DonnyDave Active Member

    Joined:
    Jun 29, 2020
    Messages:
    222
    Likes Received:
    106
    One live stream i saw showed Matt introduce another guy, sorry can't remember his name but he was great, he was showing briefly how he imported .hgt files and STRM data into his Dresden route. As the video wasn't a tutorial and just a sneak peak of the editor it didn't go into any details of where those files came from or how the .hgt and STRM details were actually imported. I think a tutorial showing this would be a great start :)
     
    • Like Like x 1
  21. DonnyDave

    DonnyDave Active Member

    Joined:
    Jun 29, 2020
    Messages:
    222
    Likes Received:
    106
    When I was importing data for a terrain in my UE 5.3 project I tried importing .tif files but it didn't recognise them someone said I had to convert them to .tiff or .raw file format, suggested using an online converter which I wasn't going to do as there's so many websites that are not safe to use these days
     
    • Like Like x 1
  22. The7Train

    The7Train Active Member

    Joined:
    Nov 6, 2018
    Messages:
    190
    Likes Received:
    88
    Yes, there are a lot of us trying to get LiDAR data into the editor. I keep having .LAZ files from LiDAR data for US routes so what are we suppose to be doing?
     
    • Like Like x 1
  23. DonnyDave

    DonnyDave Active Member

    Joined:
    Jun 29, 2020
    Messages:
    222
    Likes Received:
    106
    Last edited: Sep 26, 2023
    • Like Like x 1
  24. OlaHaldor

    OlaHaldor Member

    Joined:
    Apr 10, 2019
    Messages:
    26
    Likes Received:
    35
    After I read this I found this stuff in QGIS.
    It's a bit painful to set up a batch conversion of many files, but..
    You go to RASTER -> CONVERSION -> TRANSLATE
    upload_2023-9-27_0-14-26.png

    In the window that pops up, you load your geotiff, usgs or whatever file you have as a source.
    Then you apply the Pseudo Mercator projection.
    upload_2023-9-27_0-16-20.png

    Last, you need to set a place to export to, and then run the process.
    Like I said, this can also be set up to batch, but it's a bit tedious to input all the different source files one by one but at least that worked for me.

    However.... I'm not sure I see the full quality result in Unreal. It seems rather low resolution still, like, I expected a lot more distinct details after "apply lidar data" on the selected landscape streaming proxy object.

    From here, I'm frankly not sure how to lay tracks properly. The editor crashes so much I feel I'm barely taking one step forward before tumbling back 10 steps :D
     
    • Like Like x 3
  25. VictoryWorks

    VictoryWorks Well-Known Member

    Joined:
    Sep 22, 2017
    Messages:
    263
    Likes Received:
    1,379
    You did better than I did. Got the height data in, looking much like a billiard table although the area is quite flat. Added the lidar on top and it all just vanished. Mind you I got errors importing the aux and prj files so it might well be related to that.
    I hope they come up with some kind of basic helper notes for landscape set up or any new routes are dead in the water.
     
    • Like Like x 1
  26. KrisKol

    KrisKol Active Member

    Joined:
    Apr 2, 2023
    Messages:
    154
    Likes Received:
    89
    I think DTG-Lukas has to do a video on this.
    I know about GIS and how to use GIS softwares, but its not much good, if we dont know the formats and the steps to import correctly. And the tile sizes we need to be in Asci Grid etc. Then we could probably make a python script to automate the whole lot.

    I also noticed while looking through the editor, that "World Machine" is used in some way. I have a Licence for this. (World Machine is an advanced terrain generation tool)
    But I think we would all like to hear more about all this from lukas. Its VERY Important!
     
    • Like Like x 1
  27. GingerPitti

    GingerPitti Member

    Joined:
    Aug 17, 2022
    Messages:
    70
    Likes Received:
    77
    Also - are the .hgt files absoluteley necessary? I only have the LiDAR .asc files but cannot work out how to create a landscape differently than what was shown on the preview stream.
     
    • Like Like x 1
  28. KrisKol

    KrisKol Active Member

    Joined:
    Apr 2, 2023
    Messages:
    154
    Likes Received:
    89
    What the .hgt files are being used for is to generate distant terrain.
     
  29. paintbrushguy

    paintbrushguy Well-Known Member

    Joined:
    Jun 9, 2020
    Messages:
    443
    Likes Received:
    675
    I downloaded
    some Elvis stuff but I have no idea how to use it... Always just opens as a black square.
     
    • Like Like x 1
  30. OldVern

    OldVern Well-Known Member

    Joined:
    Nov 2, 2020
    Messages:
    17,963
    Likes Received:
    36,552
    I just think this is going to need proper step by step documentation. A few Twitch or YT streams, while appreciated, are no substitute for properly structured instructions. I plan on grabbing the editor this morning but given I have 166Gb worth of data to download to the laptop first so all the assets are available, probably going to be two or three days before I can take a meaningful look at it.
     
    • Like Like x 5
  31. DTG Lukas

    DTG Lukas Developer Staff Member

    Joined:
    Dec 18, 2017
    Messages:
    68
    Likes Received:
    418
    So the problem here is, I can’t give a step step guide, since this always depends on your data source and projection.

    Few important things though.
    Always find out what your data is in. Saxony for example is 33N I think?
    Meaning first you import your .xyz
    Then you merge it all, reproject it from 33N to pseudo Mercator (make sure it projects correctly! (Use a OSM layer to validate)

    then out of this huge reprojected plane, tile it into 2500x2500 grid (by creating a raster)

    delete all files which are null data only, since this gets padded to a rectangular shape

    But this is all before anything happens with the actual TSW, this is just where you will need to know how to operate Qgis and I can’t really help you with that except give some ideas..
     
    • Helpful Helpful x 7
    • Like Like x 3
  32. VictoryWorks

    VictoryWorks Well-Known Member

    Joined:
    Sep 22, 2017
    Messages:
    263
    Likes Received:
    1,379
    Well that's good info to push us in the right direction.
    Can I ask, is the imported data automatically read to the correct lat/long based on the hgt/asc files or do you need to set your route location to somewhere specific?
     
    • Like Like x 2
  33. fakenham

    fakenham Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    774
    Likes Received:
    1,123
    Blimey, didn't think importing DEM/LIDAR would be this complex. I think I'll wait until someone produces a step by step...
     
    • Like Like x 1
  34. DTG Lukas

    DTG Lukas Developer Staff Member

    Joined:
    Dec 18, 2017
    Messages:
    68
    Likes Received:
    418
    Dem itself is easier, you find the STRm data somewhere and just put the right .hgt in the folder.
     
    • Like Like x 1
  35. GingerPitti

    GingerPitti Member

    Joined:
    Aug 17, 2022
    Messages:
    70
    Likes Received:
    77
    Is it possible to skip STRM and just do LiDAR from the beginning?
     
  36. DTG Lukas

    DTG Lukas Developer Staff Member

    Joined:
    Dec 18, 2017
    Messages:
    68
    Likes Received:
    418
    Yeah, you can just create the tiles without dem and put LiDAR on it
     
    • Like Like x 1
  37. OldVern

    OldVern Well-Known Member

    Joined:
    Nov 2, 2020
    Messages:
    17,963
    Likes Received:
    36,552
    After some trial and error I got the SRTM around my start co-ordinates, albeit blank tiles with no texture.

    What's eluding me now is how to get the kml file in and displayed so I can follow along the route and continue to place the SRTM.

    LiDAR can be done later, if at all.
     
  38. joep#7206

    joep#7206 New Member

    Joined:
    Sep 27, 2023
    Messages:
    6
    Likes Received:
    1
    Where did you get your srtm data? Every time I try importing hgt files i get a flat landscape.
     
  39. OldVern

    OldVern Well-Known Member

    Joined:
    Nov 2, 2020
    Messages:
    17,963
    Likes Received:
    36,552
    I think these ones were from the Viewfinder site as NASA coverage doesn't go above 59N.
     
  40. bremen

    bremen Active Member

    Joined:
    Aug 24, 2023
    Messages:
    127
    Likes Received:
    105
    This is the part that I cannot figure out with QGis.
     
    • Like Like x 2
  41. joep#7206

    joep#7206 New Member

    Joined:
    Sep 27, 2023
    Messages:
    6
    Likes Received:
    1
    I just get a big flat plane :(

    upload_2023-9-27_18-18-20.png
     
  42. OldVern

    OldVern Well-Known Member

    Joined:
    Nov 2, 2020
    Messages:
    17,963
    Likes Received:
    36,552
    Only thing I can think of is have you tried going up with arrow kwy (it is very slow and shift doesn't help) as after placing the terrain you are still at sea level.
     
  43. joep#7206

    joep#7206 New Member

    Joined:
    Sep 27, 2023
    Messages:
    6
    Likes Received:
    1
    Yea, I've tried that, also tried playing around with the sea level value. Nothing seems to work. I've tried different hgt files and just the same result.

    You tried Lidar yet? Wondering if that could be an "easier" option.
     
  44. bremen

    bremen Active Member

    Joined:
    Aug 24, 2023
    Messages:
    127
    Likes Received:
    105
    Have you created a route?
    If yes, check the coordinates. I had to redo that part 3 times to define the correct location.
    Just a small variation and you can be Kms from the terrain.
     
  45. joep#7206

    joep#7206 New Member

    Joined:
    Sep 27, 2023
    Messages:
    6
    Likes Received:
    1
    How precise do these need to be? How would I go about getting the exact coordinated because that might be where I'm going wrong? Yes i've created a route.
     
  46. JT-Nor

    JT-Nor New Member

    Joined:
    Sep 14, 2023
    Messages:
    17
    Likes Received:
    13
    For that postion I think the sourcefile have to be from N52E000 hgt.
    You are atleast close to the border so I would throw the N52E000/N53E000/N52E001/N53E001 tiles in there to for good measure. When cooking route I would guess unused data is not packed anyway.

    N and E are positive position values, S and W are negative.
     
    Last edited: Sep 27, 2023
  47. VictoryWorks

    VictoryWorks Well-Known Member

    Joined:
    Sep 22, 2017
    Messages:
    263
    Likes Received:
    1,379
    Ok, I've got my LIDAR into QGIS. Combined it all into 1 map, converted it to Pseudo Mercator 3857, overlaid a 2500x2500m grid, raster extracted by layer mask using the grid to iterate each grid square.
    I then have half a dozen layers that are each a 2500x2500m square in the correct format. I Translate export as asc, and get 3 files - .asc, .asc.aux.xml and .prj

    I then drop them into TSW4 editor where they either
    a) throw up error messages saying .xml and .prj are not recognised (the .asc load but do nothing when used in the terrain import)
    b) crash the editor with an index out of range exception

    I understand that the imported data is different based on the sources but DTG Lukas you could definitely give us a step by step in QGIS once we have our "huge reprojected plane".
     
    • Like Like x 1
  48. OlaHaldor

    OlaHaldor Member

    Joined:
    Apr 10, 2019
    Messages:
    26
    Likes Received:
    35
    I agree we need a step by step 'how to do it properly in QGIS' document.
    Doesn't matter where the data is from ,that is not what we're asking for. We need a way to get the data out of QGIS in the way you guys know it works.
     
    • Like Like x 2
  49. OlaHaldor

    OlaHaldor Member

    Joined:
    Apr 10, 2019
    Messages:
    26
    Likes Received:
    35
    Could you please show me how you did the grid and raster extract by layer mask?
    VictoryWorks
     
    • Like Like x 1
  50. DonnyDave

    DonnyDave Active Member

    Joined:
    Jun 29, 2020
    Messages:
    222
    Likes Received:
    106
    everytime i try importing .hgt i get a file not supported error
     
    • Like Like x 1

Share This Page