Search Unity

[Released] GIS Terrain Loader

Discussion in 'Assets and Asset Store' started by UnityGISTech, Aug 12, 2019.

  1. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193

    Hi there
    It seems that you have somethings wrong with your DEM file projection.

    Please precise which file type do you want to generate, your GTL version, unity version, Editor or Runtime.
    Could you upload your file please.

    Best Regards
     
    Last edited: Sep 19, 2020
  2. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    GIS Terrain Loader Updated to v2.0

    Released date : Oct 29, 2020

    Updates :

    /////////////////////////////////////////////////// General Updates ////////////////////////////////////////////////////////

    - Added support for "*.hgt" SRTM30 and SRTM90;
    - Added support for "*.Bil" (band interleaved by line);
    - Added support for "*.Shp" (shapefile format);
    - Added possibility to Load Full DEM File or Sub Region by coordinates;
    - Added ability to generate buildings from Vector files;
    - Added possibility to select number of terrain tiles manually by producing Splitting /Merging;
    - Documentation Updated.

    /////////////////////////////////////////////////// GTL Runtime Updates ////////////////////////////////////////////////////////

    - Fixed Some bugs;
    - Added new Airplane demo scene;
    - No needs to add Terrain Shades for build.

    For any unity compatibility issues please contact us;

    Runtime Airplane demo scene


    Airplane.jpg


    Load Full DEM File or Sub Region by coordinates

    Reading Mode.png


    A06_Sub Region.jpg

    Auto Detection terrain tiles

    AutoDetection.png


    Set manually terrain tiles ( producing Splitting /Merging )

    Manual.png
     
    Last edited: Oct 29, 2020
  3. Dunsec

    Dunsec

    Joined:
    Apr 3, 2015
    Posts:
    5
    Hi great asset so far!

    A couple of questions, I am working on a project using your asset trying to get in large areas of data.

    We have brought in our own ASCI data provided by government scans. This data has chunks of data missing so we would like to underlay the STM satellite image. We are having trouble merging them and keeping the height data. How would you go about this?

    We also have an issue with the accuracy of elevation. It seems this problem comes from merging the tiles as a UInt16 as recommended in your tutorials leaving us with inputs like this: upload_2020-11-10_17-23-28.jpeg
    upload_2020-11-10_17-24-2.jpeg

    How do we get around this without smoothing which reduces the quality?

    Any help would be great, again an amazing asset!
     
  4. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    Thanks for using GIS terrain Loader.
    If you have a lot of chunks you need to merge and export them to one of the supported files.
    In your case you merged your files by QGIS application, this may cause an accuracy problem.
    1- So please upload at least tow chunks to me i will try to find an optimal way to resolve your merging issue.
    2-Which GIS Software are you using
    3- if we can not manipulate your files by Free GIS Software, in that case i have to integrate an option to load multiple terrain file.

    Best Regards
     
    Last edited: Nov 10, 2020
  5. ycq2012

    ycq2012

    Joined:
    Sep 25, 2020
    Posts:
    3
    Great asset! I am interested in it. I have a question, could it support very huge terrain, such as one or several provinces of China? We have such a project involving such an huge area.
     
  6. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there
    GIS terrain load support large terrain in the limite of memory use. (I tested an area of 60 km with sat images level 17 it works perfectly).
    Load large terrain ex more than 100km with height texture resolution will consume a lot of memory, so the solution to do that is to make some streaming system or loading only the tile where the player is.
    We are working on such type of asset but still no released in the asset store.
     
  7. Yair_Peretz

    Yair_Peretz

    Joined:
    Nov 3, 2020
    Posts:
    1

    Hi, I also have this problem, almost every DEM file I tried to upload has this problem with the terrain dimensions.
    I use unity 19.3.6, and i tried to upload a Raw file by the editor.
    Thanks.
     
    UnityGISTech likes this.
  8. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there, Raw file does not have real world dimensions, in that case you have to set manuelly your dimensions file in km.
    Aslo there is some files not projected in geographic Lat Lon, so GTL can not detect them.(please check examples file asset)
    If any one has the same problem with specific file please contact me in the private to solve your issue.

    Best Regards
     
  9. david3dwood

    david3dwood

    Joined:
    Aug 26, 2013
    Posts:
    3
    Hey, Im trying this out at home in Unity 2020, but we only have Unity 2018.4.7 at work. It sounds stupid to ask but do you have a version that runs in 2018.4.7 still? Im mostly on Telework due to the pandemic these days. We would purchase another license for any additional install locations of course.
     
  10. david3dwood

    david3dwood

    Joined:
    Aug 26, 2013
    Posts:
    3
    So, it wont load in 2018.4.7 cause thats too old, I tried loading into my new 2020.1.6f and I immediately get these errors:
    1) Assets\GIS Tech\GIS Terrain Loader\Scripts\GISTerrainLoaderRuntime\GISTerrainLoaderImageEffects\SunShafts.cs(103,103): error CS0103: The name 'format' does not exist in the current context
    2) Assets\GIS Tech\GIS Terrain Loader\Scripts\GISTerrainLoaderCommon\GISTerrainLoaderSplatMapping.cs(127,54): error CS1061: 'GISTerrainLoaderTerrainLayer' does not contain a definition for 'Texture_Size' and no accessible extension method 'Texture_Size' accepting a first argument of type 'GISTerrainLoaderTerrainLayer' could be found (are you missing a using directive or an assembly reference?)
    3) Assets\GIS Tech\GIS Terrain Loader\Scripts\GISTerrainLoaderCommon\GISTerrainLoaderSplatMapping.cs(127,76): error CS1061: 'GISTerrainLoaderTerrainLayer' does not contain a definition for 'Texture_Size' and no accessible extension method 'Texture_Size' accepting a first argument of type 'GISTerrainLoaderTerrainLayer' could be found (are you missing a using directive or an assembly reference?)
    4) Assets\GIS Tech\GIS Terrain Loader\Scripts\GISTerrainLoaderCommon\GISTerrainLoaderSplatMapping.cs(182,35): error CS0103: The name 'layer' does not exist in the current context
    5) Assets\GIS Tech\GIS Terrain Loader\Scripts\GISTerrainLoaderCommon\GISTerrainLoaderSplatMapping.cs(183,37): error CS0103: The name 'layer' does not exist in the current context
    6) Assets\GIS Tech\GIS Terrain Loader\Scripts\GISTerrainLoaderCommon\GISTerrainLoaderSplatMapping.cs(184,48): error CS0103: The name 'layer' does not exist in the current context
    7) Assets\GIS Tech\GIS Terrain Loader\Scripts\GISTerrainLoaderCommon\GISTerrainLoaderSplatMapping.cs(184,70): error CS0103: The name 'layer' does not exist in the current context

    I will browse this forum for answers but if you have any suggestions I would appreciate. thanks
     
  11. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there
    Thanks for using GTL, so sorry for errors that you got.
    GTL still not tested with unity 2020. Please let me more time to test it and to fix any errors.

    Best regard
     
  12. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there
    To solve errors you have to add :

    In GISTerrainLoaderSplatMapping.cs add : || UNITY_2020 into 87 Line
    : || UNITY_2020 into 147 Line


    In SunShafts.cs add : || UNITY_2020 into 94 Line

    Best Regards
     
    Last edited: Dec 5, 2020
    david3dwood likes this.
  13. david3dwood

    david3dwood

    Joined:
    Aug 26, 2013
    Posts:
    3
    YES! It works. and similarly I added || UNITY_2018_4 to get it working in my version 2018.4.7 installation. I look forward to throwing the many terrain data sets at it and getting results. I have used "Terrain Importer" asset in the past but your package is very interesting with the preliminary work on runtime functions. those look very interesting for some of the stuff we are working on at work. Im especially interested in getting it to pull in data from active online networked data via Web Map Service (WMS). thanks for the very quick response and help.
     
    UnityGISTech likes this.
  14. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    GIS Terrain Loader Updated to v2.1

    Pending on preview : Dec 12, 2020

    Updates :

    /////////////////////////////////////////////////// GTL Runtime Updates ////////////////////////////////////////////////////////

    - Fixed Loading Tiff and Raw in build Mode;
    - Fixed Textures detection in build mode;
    - Support Unity 2020 (Tested on Unity 2020.1.6f);
    - Tested with HDRP ;
     
  15. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    189
    I noticed that this asset uses PDAL etc. I am working on a project that requires point clouds, but I have developed my own solution, however I am interested to give it a try if the other features are useful... the feature that I am interested in is SHP file loading/exporting.

    Is it possible to tap into your PDAL integration to use SHP export? Or to reverse engineer the import of shapefiles for exportation purposes if I wanted to modify the data?

    Oh... also...

    I have a large set of data that is some thousand tiles processed from DEM data. Would I be able to use this tool to move around my dataset if I setup a solution for culling? It is processed into the 6 box (x-,x+, y-,y+ z-, z+) (I forget what it is called) method. So even being able to pull in a subset (x-, or x+ for example), would be awesome.
     
    Last edited: Dec 16, 2020
  16. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193


    Hi there,
    GTL use PDAL to Load point cloud points (Like Las files) in order to make high terrain quality.
    GTL can read shp files data (name, type , position .... ) to generate 3d modes (Like Tree, building ....).
    Actually GTL can not export modified shp files, may be PDAL can do this work but actually there is no relation between SHP and Pdal in the asset.
    fr the last question : you are able to read your DEM data and generate large terrain in Runtime/Editor , note that there is no streaming terrain system so you should use culling or streaming to save your memory use.

    all the best
     
  17. MidwestSurveyors

    MidwestSurveyors

    Joined:
    Sep 30, 2020
    Posts:
    3
    Hi, I noticed that your asset can bring in shapefiles. What functionality do they have when brought in? Can they be draped over terrain or do they come in looking like regular lines in unity that just run from point a to point b and don't drape over terrain?
     
  18. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there
    GTL is able to load vector data (OSM and shape files ).
    for shp files you can read all data and filter your tags to generate 3d object like trees, roads, building ... etc.
    you are able to read (point, lines and surfaces).
    all generated objects are dropped into terrains using real world coordinates.
    you can develop the concepte to customize your 3d objects or prefabs already defined in your shape files.
     
  19. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    189
    Thanks for the info. and yes, Pdal integrates GDAL (funny right), to process shapefiles. In their API they do have a process for exporting, so what I was hoping for was that you already integrated it into this package. I was doing more research into it last night, but am looking for someone who has already created a useful pdal/gdal integration that can handle some of the rest. Guess I will be working on that soon :(
     
  20. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    189
    Sounds like you have previously worked with topodot and (forgot the name of the other one) doing extraction? Or maybe one of your team members has?

    Draping is a very interesting thing for unity. It would require the pc to be meshed and have collisions. If you are referring however to simply loading the vector data, it should come in exactly as it is supposed to. You will probably however struggle with the problem of Y/Z flipping necessary due to unity and other modeling software being reverse of normal cad software xyz coordinates.
     
    UnityGISTech likes this.
  21. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    I will try to integrate more fonctionality for pdal gdal with unity in the futur versions.
     
  22. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    About coordinates, Shp API read geographic coordinateur and convert them to unity space.
    For examples . I created a roads by a gis softwar, i set type of that road in his database, after exporting GTL will drop that road into a terrain as 3d road.
    We can generalize the idea to specifc data.
     
  23. Robot_PeaceKim

    Robot_PeaceKim

    Joined:
    May 7, 2019
    Posts:
    1
    Can I import .shp, .svg files?
     
  24. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    GTL is abel to generate 3d trees, grass, building, roads by loading .shp or osm vector files.
    If you have your own shp files you should customize your tags in shp database.

    All the best
     
  25. MidwestSurveyors

    MidwestSurveyors

    Joined:
    Sep 30, 2020
    Posts:
    3
    I am struggling to bring in a shapefile with my terrain. i keep gettng this error:
    upload_2021-1-7_12-28-34.png

    I've check my directory structure and it should be good. The shapefiles are created from globalmapper.
     

    Attached Files:

  26. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    hi there
    could you upload your files to me please.

    all the best
     
  27. MidwestSurveyors

    MidwestSurveyors

    Joined:
    Sep 30, 2020
    Posts:
    3
     
  28. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    which kind of Areas would you generate (Like trees, grass ..)
     
  29. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    your files are correctly set just edit the attributes of your shp files.
     
  30. dorianrea

    dorianrea

    Joined:
    Mar 15, 2015
    Posts:
    3
    I recently purchased your asset and am impressed by the features. I have a webgl project where I store the terrain data in the IndexedDB of the browser using "Application.persistentDataPath", when I try to load the terrain data into your plugin it throws a few errors.

    "ReadDirectory: Warning, /idbfs/c82cc4cddde88f5dbf0866c03ff5cb04/Terrain/Desert.tif: invalid TIFF directory; tags are not sorted in ascending order"

    "To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking"

    Any idea on what might be causing there errors?
     
  31. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,

    I need to know the source of that errors, Could you put the full debug.

    best regards
     
  32. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    GIS Terrain Loader Updated to v2.2
    GIS Terrain Loader Data Examples Updated to v1.2

    Pending on preview : Jan 23, 2021

    Updates :

    Bugs Fixed :

    // Some bugs for SHP loading
    // Duplicated roads for SHP files
    // Dimensions detection for large terrains

    New feauters :

    // Added Support for 3D SHP files (PolygoneZ, PointZ, LineZ..)
    // Auto georeferencing to Geographic Lat/Lon for shapefiles with UTM and Lumber93 projection

    // ASCII,Flt,Bil DEM files Support Auto georeferencing to Lat/Lon Geographic.
    // Ability to read prj files

    // Added Ability to load negative elevation value for tiff 16 bit
    // Added Ability to load TIFF files based on Tile for 32 bit float points
    // Ability to Generate underwater surface

    // Added BaseDisMap and Pixel Error for terrains.
    // Ability to Customize terrain material(Editor/Runtime)

    // Added MenuItem "Assets/Create Vector Prefab" for roads and grass
    // Added ScriptableObject for roads (prefabs) in "Prefabs/Environment/Roads" to customize roads

    // New GUI Style for 'TerrainContainer' in the inspector Tab


    New Into video for (Editor and Runtime) GIS Terrain Loader







    Roads from ShapeFile



    Roads In Unity



    New Scriptable Menu Elements



    Customized roads via scriptableobject


     

    Attached Files:

    Last edited: Jan 29, 2021
  33. TipTop3D

    TipTop3D

    Joined:
    Dec 10, 2015
    Posts:
    9
    Hello!
    I have small problem with generated terrain. There is a grid on the terrain. It is a bump and only on slopes.
    Am i missing something or is it a bug?
    What i did:
    1. original tif does not make heightmap in Unity. Generates terrain without height
    2. open original tif with Global Mapper
    3. export as geotiff
    4. in Unity generating terrain. 5 x 5 tiles, resolution 1025, no texture
    5. changing projection to Geographic Lon/Lat doesn't matter, still generating grid
    Original tif (5km x 5km) and prj files:
    https://1drv.ms/u/s!Aml8X3uUgC8Hgu1k7o0155OR8i1ENA?e=uA826R
     

    Attached Files:

  34. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193

    Hi there,

    Try smooth surface for value= 2, this may fix the grid.

    Best Regards
     
    TipTop3D likes this.
  35. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Some new feauters in GTL v2.2
     

    Attached Files:

  36. TipTop3D

    TipTop3D

    Joined:
    Dec 10, 2015
    Posts:
    9
    I feel like there is something wrong. I can't see the jaggedness in original data. I think script is drawing Z pattern or rotating data or something like that. There is terrain shift in that grid pattern. In my case 1m shift.
    Yes I can smooth it but rest of the terrain is smooth enough.
    Maybe im doing something wrong but i dont know
     
  37. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    I will retry your file to check the source of that grid.
     
  38. TipTop3D

    TipTop3D

    Joined:
    Dec 10, 2015
    Posts:
    9
    Maybe these pictures depicts it better what i mean.
    Should be a straight ditch but there is a 1m shift in geometry after every 100m. Overall ditch is straight but it is going like that:
    /
    /
    /
     

    Attached Files:

    UnityGISTech likes this.
  39. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi,

    I tested the your file and i got the same result when the resolution >= 1025 for many terrains , im still not detected the source of that grid.
    Please let me more time to work on it.

    Best regards
     
    TipTop3D likes this.
  40. TipTop3D

    TipTop3D

    Joined:
    Dec 10, 2015
    Posts:
    9
    No problem. I'm not in hurry with that and can do everything as it is.
     
    UnityGISTech likes this.
  41. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    problem solved, please check your inbox.
    best regards
     
    TipTop3D likes this.
  42. TipTop3D

    TipTop3D

    Joined:
    Dec 10, 2015
    Posts:
    9
    Thank you. Everything is smooth now
     
    UnityGISTech likes this.
  43. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    GIS Terrain Loader Updated to v2.3

    Pending on preview : Feb 27, 2021

    Updates :

    New feauters :

    - Added support for DEM "*.Bin" files
    - Runtime GTL is able to get coordinates of any space position in to the following Coordinates system :

    . Geographic : Latitude-Longitude / Deg Min Sec
    . UTM : Meter / MGRS Military Grid Reference System
    . Lambert

    - Documentation updated to v1.4

    Bugs Fixed :

    // Smoothed Grid appearing on the terrains
    // Terrain smoothed by default for high resolutions
    // Fixed Wrong values for Terrain dimensions in the Manual Mode
    // Fixed inaccurate dimensions for ASCII files projected in UTM
    // Fixed Some Unsaved preferences of Editor Tabs
    // Flat zone for Underwater with terrain scale under 1
     
  44. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    I tried to use GIS Terrain Loader to create a city but I'm confused even after reading the docs. I tried to use QGIS to create DEM, raster, and vector files but I can't find ZonePreview.jpg file.
     
  45. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    I made a new video on how to download GIS Data, try it and contact me for any details :

     
  46. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    I tried to run SAS.Planet but I got "Unable to load maps. Aborting" message. How can I fix this problem?
     
  47. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Download stable version like v19 or change google satellite to bing imagery.
     
  48. Nakel

    Nakel

    Joined:
    Sep 28, 2017
    Posts:
    106
    GREAT WORK!

    I have some doubts before buying...
    1. Can it make terrain from contour lines .shp?
    2. Can I export modified data to any GIS file?
     
  49. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    I followed your tutorial on downloading GIS data but when I tried to generate the terrain, I get "DEM file not supported. Try another file"
     
  50. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there, Sorry for that simple mistake, to fix it you have to bring up the line 839 in EditorTerrainGenerator.cs to 832.
     

    Attached Files:

    Last edited: Mar 3, 2021