Converting LIDAR data to TM terrain.

To convert LIDAR (Light Detection and Ranging) data to TM terrain you will need:-

QGIS https://www.qgis.org/en/site/

DXF2XYZ https://dxf2xyz.software.informer.com/download/

and something like MS Excel.

plus a text editor like Notepad

  1. Find you LIDAR DEM tile(s) for the area required. The file you need is a GEOTIFF (*.TIF)
  2. Add it as a layer to QGIS.
  3. Convert to contours using 0.5 as the interval. Set "Produce 3D vector" to true (tick).
  4. Export contour layer (Export>Save features As..) select Autocad DXF.
  5. Open DXF2XYZ and load the DXF you have just exported.
  6. Save xyz file. For some reason DXFD2XYZ swaps over the X value with the Y so we have to swap them over. This is where Excel comes in..
  7. Open EXCEL and load the xyz file you just created. It is a comma delimited file so excel will ask which delimiter to use for the data (use comma). The A column is the X the B is the Y and the C the Z.
  8. Select the B column by clicking on the "A", right click and "cut". Click on the A column, right click and "insert cut cells". You have now swapped over the X and Y.
  9. Save as a txt (comma delimited).
  10. Twinmotion does not expect commas so we have to replace it with a space character. Open up your text editor and load the txt file you just created. Search and replace the comma character with the space character.
  11. Save the file as an xyz file (yourfile.xyz)
  12. Now in Twinmotion import landscape and open the xyz file you just created. I set my amplitude to 100 and it seemed to work but you may have to play around with that. Unless you want terracing like rice fields, turn on smoothing. Now you have your terrain.

If you want more accurate values the reduced the interval number in step 3.

Hello ,

Thank you for posting this tip and seems like a working workflow for certain scenes. If you had any examples/screen-shots of the steps that would be very helpful. I personally don't have any Lidar Dem Content to test this out with, do you know of a site where you can download free samples?

Kind regards,

Vincent B.

Apologies for the late reply, Vincent. Been a tad busy.

New Zealand employs LIDAR extensively, being quite mountainous, a helicopter is cheaper than a man holding a theodolite over a cliff edge LOL

Its freely available from LINZ https://data.linz.govt.nz/search/?q=Christchurch. some example files I created are attached

gromov.qgz (7.3 KB)