Search Unity

[RELEASED]Terrain Importer

Discussion in 'Assets and Asset Store' started by gilley033, Aug 26, 2014.

  1. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Hello everyone, I just wanted to let you know that a new version of the tool is available on the Asset Store (2.2.1). This version includes a fix for a bug, where terrain would not import correctly when importing tile sets with a row or column of 0.

    I also wanted to standardize the version support for different Unity versions, so starting with this update there will be at least 5 versions available. One for Unity 5.5 and 5.6, one for 2017.1.0, one for the most recent 2017 version, one for 2018.1.0, and one for the latest 2018 version. This model may be unsustainable as 2019, 2020, etc. come out, but for now it will work. Note that there is no difference between the different version besides the dll's being compiled to work with the Unity's dlls from each version.

    Cheers!
     
    HeadClot88 likes this.
  2. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    version 2.2 has been submitted for Asset Store Approval. It contains the following fixes/additions:

    Fixes
    1) Fixed a bug when using the "Create Prefabs" option that would cause the generated terrain in the scene to not be at their correct position.

    Additions
    1) Added Preserve Tree Prototype Layers option for Unity 2018.2.2+ users.
     
  3. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Version 2.2.2 is live on the Asset Store!
     
  4. weedfreak

    weedfreak

    Joined:
    Feb 14, 2018
    Posts:
    10
    I was looking for something like this and nearly bought it, but I then discovered the install is via a dll. This brought up a question, does this work with linux version of unity? as linux does not use dll's I doubt it but am prepared to be happily surprised.
     
  5. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    I have never worked with Linux so unfortunately I have no idea whether the dll will work. However, the source code is included, so you can just use that. When you import the package you will just need to uncheck the dll so it doesn't import. Then, extract the source code to the editor folder (it is provided in a zip file). For all future updates you'll need to follow this same procedure.

    With that said, there are a few issues with the Asset Store version that I am currently fixing, so if you do decide to purchase I would just email me (kgillen@deepspacelabs.net) your invoice code and when I have those issues fixed (a few days at most), I can send you an up to date version. I'll also need to know which version of Unity you are using.

    Thank you for your interest!
     
  6. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    I updated the known issues section in the OP:

    If you have a script outside of the TerrainImporter package that utilizes System.Threading, you'll see an error. To rectify this in the future I am going to remove the System.Threading.dll file. This will remove threading support for all versions before Unity 2018.3 (where .Net 4.x becomes the standard scripting runtime version - this runtime version has built in support for threading so the additional dll is not required). This is not ideal but it is the only way to fix this issue, and the threading support is very limited so it shouldn't have a tremendous impact on the speed of importing.

    However, I am not submitting this update until 2018.3 is released and I can confirm that .Net 4.x is indeed the standard scripting runtime version. If you run into this issue and want it to be fixed before then, please email me your invoice number and the version of Unity you are using and I will send you an updated package with the fix.

    @weedfreak The fixes I mentioned in my previous post have been implemented, so if you decide to purchase the kit, email me with your invoice number and Unity version that you are using and I will send you the updated package I just mentioned.
     
  7. weedfreak

    weedfreak

    Joined:
    Feb 14, 2018
    Posts:
    10
    No decision made yet, I will contact if I need to. I may try the dll install just in case it works first.
     
  8. amarillosebas

    amarillosebas

    Joined:
    Feb 28, 2013
    Posts:
    44
    Does this asset work with the new terrain system?
     
  9. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Thanks for you interest! I am not sure, let me do some research this week and I will have a definitive answer for you.
     
  10. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    If you are asking, "does the asset function" then yes, certainly it does. However, obviously 2018.3 added some new functionality such as a new way to handle neighboring by assigning terrain in a tile set the same grouping ID, an option to enable GPU instancing, as well as the new TerrainLayer and Brush asset types. Support for these new features will be added with the next update.

    With that said, I see support for these features really only being useful to those importing large tile sets, as you will be able to just add the TerrainLayers/Brushes once and have them show up on all terrain in the tile set. The same goes for setting the Grouping ID, "Draw Instanced", and "Auto Connect" options on the terrain. If you are just importing a few terrain then setting these options post-import is no big deal.

    Apart from that, I don't see any potential issues and I have tested importing in 2018.3 and everything works fine. If you have a particular concern please let me know! There's always the chance I missed something.
     
  11. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    The latest update has been submitted to the Asset Store.
    Fixes

    1) On Unity versions which support the .Net 4.x scripting runtime version, when Unity was set to this option you may have seen an like the following:

    The type 'InsertTypeName' exists in both 'System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

    This error occurs because the .Net 4.x scripting runtime has builtin support for System.Threading. Previously this was not the case so I included a System.Threading.dll file in order to enable threading.

    To rectify this error, the System.Threading.dll file will no longer be included with the package. You can safely delete this file from your project. Unity 2018.3 users who download the package will receive a version that does utilize threading (since the .Net 4.x runtime is enabled by default on these versions), however all other users on an earlier version will not get the benefits of threading. Note, threading was used only in a few areas, so this will likely result in very minimal speed differences in the import
    times.

    If you see a meta data missing error on Unity 2018.3, please change the scripting runtime version to .Net 4.x. If you still see the error after doing this (after attempting to clear the console log), please contact me!

    Improvements

    1) Added new Base Terrain Settings options for features introduced with 2018.3. These include "Grouping ID", "Auto Connect", and "Draw Instanced". Terrian Texture Layers are also now supported.
    I have also raised the price to $20, which will be effective once the update is live.
     
  12. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    The latest version (2.3.0) is live on the Asset Store!
     
  13. maclementos

    maclementos

    Joined:
    Feb 5, 2017
    Posts:
    1
    Hi Kyle

    Your asset looks very promising.

    As I'm understanding your asset correctly, it will generate unity terrain objects from the Unity terrain engine and not just meshes?

    Will it support overhangs (ready in unity 2019.2 if I'm remembering correctly)?
    I know it generates the terrains using 2d height maps which will not allow for overhangs. Is this something you will look into it once it is ready in Unity with a different approach? (maybe some 3d meshes which can be subtracted into an existing terrain to allow tunnels.)

    We are planning to create some big scenes based on real GIS data. Usually we will have a "project perimeter" with mostly very detailed data and a large "context perimeter" containing sparse data around the highly detailed project perimeter. This is necessary for having mountains in the distance for creating a realistic view (city planning purposes). Imagine a little city inside the alps, but with no alps around it. It would not be very "realistic" as the local viewer will constantly miss something. Maybe a very characteristic mountain for example.

    How would we accomplish this with your asset? Can we import two terrains, the detailed one first and then a second one with a "hole in the middle" where the detailed one would sit? Would this be possible or does it always have to be a "completely filled" terrain?

    Thank you for your reply in advance.
     
    Last edited: Mar 12, 2019
  14. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Yes, the tool generates Unity Terrain objects from 2D heightmap files. I will look into overhangs but currently that is not something I plan on supporting. It wouldn't be possible to create a terrain with holes in it. What I imagine you could do is create a tile set, for instance imagine a 4 x 4 tile set, with the inner 2 x 2 grid being the high resolution project perimeter and the surrounding ring being the lower resolution context perimeter.

    Please keep in mind however if the GIS data is in the form of GeoTiff files, which I imagine it is, my tool my have problems reading it. Please email a sample file to me beforehand (kgillen@deepspacelabs.net) so I can make sure the file(s) will import correctly.

    Best Regards,
    Kyle Gillen
     
  15. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Version 2.3.1 has been submitted to the Asset Store.

    Fixes
    1. Fixed an exception on Unity versions 2018.3 and above that was thrown when trying to view the inspector for importing splatmaps.

    2. Fixed a bug causing a FileNotFoundException when trying to import Full Coverage Textures.

    3. The "Try To Get Terrain Width/Length from File" option previously calculated the final terrain width and length using the output terrains heightmap resolution. It will now calculate the width and length based on the input heightmap file resolution.

    4. Removed 8193 as a Heightmap Resolution option, as it is not supported by Unity.
     
  16. QCPunk

    QCPunk

    Joined:
    Aug 3, 2019
    Posts:
    2
    Gilley033,

    This is an awesome asset. I am wondering if it is still possible to generate a Unity 5.2.3 version of Terrain Importer? I am hoping to use this asset in conjunction with CourseForge which is only compatible with 5.2.3.....

    Thanks!
     
  17. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Sorry for the late reply; I am currently travelling. It will take a day or two but I will look into this to make sure there are no issues (I don't believe there will be). I would need to send you the update manually (so just purchase on Asset Store and then email me your invoice number), and in the future if you needed an updated version (if the version on the Asset Store is updated), you would probably need to email me.

    Thanks!!
     
  18. QCPunk

    QCPunk

    Joined:
    Aug 3, 2019
    Posts:
    2
    Gilly, No problem on the reply time. I greatly appreciate it. Sounds good, We'll be in touch soon!

    Safe travels!
     
  19. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    I ran some test and there don't appear to be any issues with using the tool on 5.2.3, however if you purchase and run into some kind of unforeseen issue that cannot be fixed, I will be happy to offer a refund.

    If you decide to purchase, please email your invoice number to me at kgillen@deepspacelabs.net and I will send you the special version for 5.2.3.

    Thanks!
     
  20. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    ***SOLVED*** So it looks like when you make a new terrain a default splatmap is generated. Punching "reset splatmaps" allowed me to then export the new one onto terrain.

    Hello, Im sure I'm doign something wrong but I get this message when trying to apply a single splatmap to one terrain. I have the standard unity terrain material assigned.
    5269c1e1df6d732ea772f33e7eee9d2b.png
     
    Last edited: Sep 21, 2019
  21. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Can you elaborate on what the problem/solution was?
     
  22. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    • Made a new standard unity terrain from hierarchy create list
    • opened terrain tools to the menu you see in image above and tried to "export to terrain" my custom splatmap from world machine.
    • returned the error message you see
    • selected the terrain and used "reset splatmaps" to clear splatmap data
    • then was able to export custom splatmap onto terrain
    suggestions : this wording is a bit confusing as you are using common terms for other uses and using them in different way. I think "Apply to Terrain" and "Clear Current Splatmap" would be more clear.
     
  23. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    I think I must have not looked closely enough at your attached screenshot. It does not appear that you are actually using my tool. Is it possible you clicked on the wrong thread by mistake? Can you confirm you are using the tool from here, i.e., TerrainImporter?
     
  24. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    lol. sorry i thought this was for the terrain tools that comes with 2019 now. i just found thread through google search.
     
  25. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Haha, no problem!
     
  26. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Hello everyone,

    I have been hard at work improving the importer. I hope to expand support for more GeoTiff files soon. I have a working Gdal implementation that enables this, it just needs further testing. I am also hoping to introduce more threading support to speed up imports, which is very useful for large files or tiled imports.

    Both of these changes require the Unity Editor to be set to .Net 4.x scripting runtime. Currently I support Unity 5, however Unity 5 does not allow for the editor to be set to .Net 4.x, so I am considering removing support for it. Also, if your project cannot be changed to .Net 4.x for some reason, obviously you will not be able to update.

    I want to hear from anyone that this might effect. If I don't hear from anyone I will most likely implement these changes, require users to use .Net 4.x, and remove support for Unity 5. If I do hear from you, I may make these changes to the Asset Store but try and allow users who can't update to get crucial updates on the side.

    Thanks!
     
  27. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Update 2.4 is now live! Here are the list of changes:

    Improvements

    1) Added GDAL implementation to all Unity 2017.1 and greater versions of the package which will provide
    for more robust GeoTiff support. Even so, it is still best to email me your GeoTiff files to make sure
    they can be imported before purchasing the Terrain Importer.

    Because of this update, you will be required to switch to the Unity .Net 4.x Equivalent Scripting
    Runtime Version in order to use the Terrain Importer. If this is not possible,
    please email me with your invoice number and I will send you a version of the Importer
    compatible with .Net 3.5. If you are able to update your project to .Net 4.x, you can remove the
    BitMiracle.LibTiff.Net.dll file found in the Assets/Plugins folder, as it is not needed.

    2) Input and output heightmap resolutions are no longer intertwined. When importing a heightmap file, you will now specify whether to import the full file or a sub-region of the file (which allows you to define a width/length and origin for the sub-region). The output heightmap resolution of the terrain created in Unity is determined either by:

    a) The heightmap resolution of the existing terrain when exporting to an existing terrain and not using the heightmap override.
    b) The resolution calculated from the file when importing a GeoTiff file and the "Try To Get Terrain Heightmap Resolution From File" option is checked.
    c) The Heightmap Resolution setting under the Base Terrain Settings section if exporting to an existing terrain but using the heightmap override, or if exporting to a new terrain that is not a GeoTiff file.

    The full data you choose to import will always be used. If the input region you import and the output heightmap resolution do not match, scaling will be performed automatically. As such, choosing to scale or not is not an option any longer. You should specify the scaling method and whether to "Preserve Edges" in case scaling is needed.

    3) When importing a sub-region of a GeoTiff file and if you have the "Try To Get Terrain Width/Length From File" is checked, the output terrain's width and length will be calculated as a fraction of the full length/width of the heightmap file you are importing. For example, if you are importing a 1025 x 1025 heightmap file that represents a 1000m x 1000m region, importing a 513 x 513 sub region will produce a terrain that is 500m x 500m.

    4) Updated settings and visual look of inspector to match the Terrain inspector of each version of Unity the package is compatible with. Note only the version of Unity that the package has been built for is gauranteed to match. For instance, if using a package built with 2018.1 on Unity 2018.2 or Unity 2018.3, there may be some differences. Also note that Lightmapping info and the Collect Detail Patches option are not included in the Terrain Importer even though they show in the terrain inspector.

    Fixes

    1) Fixed a NullReferenceException when trying to open the Base Terrain Settings section while Export To (under Terrain Output Settings) was set to "Existing Terrain or Tile Set" or "Existing Disparate Terrain".

    2) Fixed a NullReferenceException when using the "Check All Overrides" or "Uncheck All Overrides" button.

    3) Fixed bug causing "Check All Overrides" and "Uncheck All Overrides" effect not to be applied to "Remove Light Probe Ringing" on Unity 2018.4 and greater versions.
     
  28. TOES

    TOES

    Joined:
    Jun 23, 2017
    Posts:
    134
    When unzipping the source code, I get compiler errors complaining the namespace OSgeo can not be found. How to fix?
     
  29. TOES

    TOES

    Joined:
    Jun 23, 2017
    Posts:
    134
    I found the solution, so posting it here in case anyone else has the same problem.

    The source code needs to be located in the same folder as the DLL files (gdal/editor/x64 on Windows)
     
  30. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Thank you for posting the solution Toes. I have not tried using an unzipped copy of the source code with the GDAL stuff. Can you confirm everything is working correctly?
     
  31. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Hello everyone!

    I wanted to provide a link to my new Discord Server, where you can view updates and get support for all of my products, including the Terrain Importer.

    Join My Discord Server Now!

    Of course, you can always PM me through the Unity Forums or my email as well, but Discord offers a new way to get support and stay up to date on the Terrain Importer.
     
  32. jtenny

    jtenny

    Joined:
    Aug 9, 2019
    Posts:
    7
    Very cool tool given its ability to use .tiff files! What attributes cause a .tiff file to be incompatible? Also, did you ever renew your interest in getting this tool to work during run-time?
     
  33. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    The .tiff file format is just very complicated. Whereas there are only a few details that may be different between RAW files (usually just the bit ordering), .tiff files come in hundreds of different flavors, from the straightforward version produced from World Machine, to the incredibly complicated produced by government agencies using satellites to capture land imagery.

    The meta data in a tiff is therefore very important, as it tells you how to read the data; unfortunately, there is not a lot of information out there for how to interpret all the different meta data, so you pretty much need GDAL handle different .tiff files effortlessly.

    Unfortunately, there has not been enough expressed interest to warrant the development time for this feature. It's not an impossibility for the future, however I would say it is unlikely given my other projects. Sorry!
     
  34. jtenny

    jtenny

    Joined:
    Aug 9, 2019
    Posts:
    7
    Thanks for your reply. I am shocked that people aren't interested in doing a DEM import and procedural terrain generation in runtime, it seems like a very powerful concept. We are pretty interested in the subject ourselves and will likely pursue a solution when we have some time. Could we/should we use your code as jumping off point? Would you be interested in any form of collaborative effort?
     
  35. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Perhaps there is interest out there, just not expressed from my users (I have had a couple inquire, just not enough.

    I don't think there would be much issue in getting the data into Unity at runtime, the main problem is in generating the terrain at runtime. It's not a trivial issue though I have a good idea on how to do it. It may be that putting the feature out there would attract more users, and so I will not rule it out as an option even if I don't get more interest; it's just that other projects are more attractive to me right now, especially since I am a game dev at heart and would like to get back to that (the last year has been spent mostly on Asset Store dev projects).

    You are absolutely free to use the source code as a jumping off point, it is included as a zip file with the package files; I advise exporting the files in a separate project to avoid naming conflicts. Good luck!
     
  36. paparmen

    paparmen

    Joined:
    Dec 16, 2020
    Posts:
    2
    Hi, is there any pre-reqs/dependencies to the asset? I get error when importing it.
    "Assembly 'Assets/TerrainImporter/Editor/TerrainImporter.dll' will not be loaded due to errors: Unable to resolve reference 'gdal_csharp'. Is the assembly missing or incompatible with the current plattform"

    OSX 11.0.1, Unity 2019.4.14f1
    (unity newbee, noob level)
     
  37. Maitre2008

    Maitre2008

    Joined:
    Dec 17, 2020
    Posts:
    2
    There is some assets supprot runtime generation : GIS terrain Loade TerraLand
     
  38. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Hi, sorry for the late reply, as I posted in the OP I was out of town last week. There are dependencies on a whole collection of .dll packages, but those are included with the kit so you shouldn't have any issues.

    The first thing I would try is to delete the entire TerrainImporter folder and redownload the package from the asset store, to ensure all files were downloaded correctly.

    Once you do that, confirm the following folders and files exist.

    TerrainImporter/Editor/gdal_csharp
    TerrainImporter/Editor/gdalconst_csharp
    TerrainImporter/Editor/ogr_csharp
    TerrainImporter/Editor/osr_csharp
    TerrainImporter/Editor/x64/(a bunch of files)
    TerrainImporter/Editor/x86/(a bunch of files)

    It's possible that you are not using Windows and there is an issue with your operating system. What operating system are you using? I only have Windows so have not tested on others, if there is a compatibility issue I will offer a refund as I know there is nothing stated on the Asset Store page about that.

    The only other thing I can think of is that the platform you are building for (please let me know which it is) is causing some kind of issue, but that should not be the case since the csharp files are configured for Editor only. However, you can try clicking on the gdal_csharp file and messing with the Import Settings. (If you are not using Windows, you could try changing the OS option if it is set to Windows, perhaps there could be an issue there that I have not realized).

    If none of the above is helpful or fixes the issue, the only other thing to do is send me a copy of your project so that I can further diagnose it. In that case, please email me at kgillen@deepspacelabs.net, so that I can provide you with a link to upload the projec to.

    Thanks, and sorry again for the late reply!
     
  39. paparmen

    paparmen

    Joined:
    Dec 16, 2020
    Posts:
    2
    Hi, i Use OSX on Mac-mini.
    So i guess i need to start up my old PC to get this to work?
    I'll give it a try on PC ant let you know if it works better there.
     
  40. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Okay, thanks! Again, if you want a refund let me know.

    Also, if at all possible, could you try to copy your project that the Importer is currently in to the new computer. This way, if it works, we will know it was the OS that was the issue. Thanks!
     
    Last edited: Jan 4, 2021
  41. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Hey everyone, I just submitted update 2.5 and will let you know when it is available on the store.

    This update contains a few bug fixes, a small UI overhaul, as well as some improvements that I think will have a big impact for certain users.

    Here is the change log:
    Known Issues

    1) The Cancelable Dialog Window that appears during import may not be very clear. This is because Unity uses the dialog box and its own use competes with my use, which causes the dialog to switch back and forth between what Unity wants to display and what I want to use. (Unity 2020.1 and up)

    2) When creating prefabs, after the import completes you will see multiple warnings in the console telling you that "[Insert Direction] neighbor of the terrain has a different heightmap resolution. Stop neighboring." These are harmless messages and can be ignored. (Unity 2020.3 and up)


    Improvements

    1) When exporting to existing terrain, not importing heightmap and/or splatmap data (or not otherwise generating a new /splatmap), and when a heightmap/splatmap resolution is set to a value that is different than the existing terrain, the tool will now use the existing terrains heightmap/splatmap data as input, scale it, and reapply it the existing terrain. This new strategy allows you to change the heightmap/splatmap resolution of one or more terrain without losing your existing heightmap/splatmap data. This is an incredibly powerful new use case, especially in situations where you need to change the resolution of multiple terrains at once.

    2) The Terrain Importer Inspector now utilizes tabs for the different sections of settings rather than drop down menus. This is a change but should result in a much more usable interface.

    3) Cleaned up code to remove unnecessary AssetDatabase calls and added more parallelization. The former change should shave off some time from importing, while the latter will only be noticeable to a few users.

    4) Overhauled the Progress Bar that is displayed during Import so that it presents a more accurate view of the progress of tile set or multi terrain imports.


    Additions

    1) Separated some of the options for Texture and Heightmap Importing, which should be useful for those with heightmap and texture data in different folders and different naming formats.

    a) Under General Import Settings, you will find a new field called "Folder Where Texture Data Is Stored". You can use this to specify an alternative folder where your splatmaps and other texture related data is stored, or you can specify the same folder as your Heightmap. The original field was renamed to "Folder Where Heightmap Data Is Stored".

    b) Under Tiled Import Settings, when "Import Tile Set" is checked, you will see the two new sections, Heightmap File Import Settings" and "Texture File Import Settings". With these new sections, you can configure different settings for your heightmaps and textures import files, in case they are ordered differently, require a different naming format (Import Format field), or one requires padding and the other doesn't.

    c) Under Terrain Output Settings, when "Import Tile Set" is enabled (in Tiled Import Settings section), you will see a new section "Tile Set Export Settings". This allows you to set different ordering (naming format and padding were already available) for the exported terrain and terrain data that is generated during the import process, rather than using the same format as the heightmap files (as was previously done).

    d) Note that the new settings will use the settings from the previous single field by default. For example, the texture import folder and heightmap import folder will be set to the folder that was set prior to installing this update.

    2) Added options to skip terrain generation if missing heightmap or texture files are present when importing tile sets.

    3) Added options when importing Tile Sets for specifying how much the tile set coordinates change from one tile to the next (previous behavior was that they could only change by 1). This allows you to import a tile set where the rows change by 2 (Row_1, Row_3, etc.), or any other increment. You can specify separate values for the import heightmap files, import texture files, and export terrain tile set generated by the tool.

    4) Added Compress Holes Texture option to Terrain Base Settings section.

    5) 2019.4 and up versions now correctly allow for setting the Base Map Distance to 2000-20000 values.


    Fixes

    1) Fixed an issue with importing extremely large raw files (error popup reports incorrect file size and import fails).

    2) Fixed a memory leak when importing tile sets.

    3) Fixed potential issue of terrain layers not being saved properly when using Create Prefabs option.

    4) Fixed potential issue with terrain resolutions not applying correctly.

    5) Fixed Reflection Probes field not showing up correctly.

    6) Fixed a potential issue of Alpha Maps not being imported correctly.



    Other Changes

    1) Moved the file menu option to create a Terrain Importer object to Create -> Terrain Importer -> Terrain Importer Object (was previously located in Terrain Importer -> Create Terrain Importer). While this location may be a little difficult to find at first, I made it to declutter the Unity Asset menu.

    2) Added a SampleHeightmapImporter.txt file to the TerrainImporter/Editor folder, which provides a sample of a custom Heightmap File Importer (Custom Heightmap File Importers can be used to import file types not currently supported by the Terrain Importer package).
     
  42. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Hi all, version 2.5 is now available in the Asset Store!!
     
  43. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    I will be out of the office until next Wednesday (Nov 24). I will not have access to email at this time, so please contact me via these forums or Unity Discord if you have a question or need assistance.
     
  44. atifmahmud95

    atifmahmud95

    Joined:
    May 13, 2019
    Posts:
    1
    Hey, hope you had fun camping!

    I am trying to implement a Digital Twin visualisation tool for a mine site. I have a Digital Elevation Model (DEM) in TIFF format and accompanying Imagery in TIFF format too (note that the imagery covers a larger extent than the DEM).

    Is there a way I can import the DEM and apply the Imagery as texture on it while preserving GeoData (i.e. The pixel value on point (x, y) on the terrain should be from point (x, y) on the Imagery TIFF)
     
  45. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    Thanks (though I didn't go camping, I appreciate the sentiment)!

    I am going to explain a bit about how the Importer works, because I am not 100% positive I understand your question (but maybe the explanation will answer it anyway).

    The Importer does not utilize coordinate data in any way from DEM files, so there is no way to utilize coordinate data to match up the texture file with the heightmap file.

    The heightmap import functionality includes an option to import a sub region, which allows you to ignore some data in the heightmap file. This functionality is not included with the texture import code. It might be possible to add it, but I would need more users to ask for it to make it worth it. Is this what you are looking for, since your texture contains a larger region?

    All data (heightmap or texture) is applied in a continuous manner. You have the option to reverse the data in the file on the X or Y Axis (or both axes), but the data is still applied continuously to the terrain.

    You can import an alphamap or you can import a single texture that covers the entire terrain (as if the terrain were a mesh and the texture were the albedo of the mesh). I think the latter is what you want.

    If what you are asking for is the ability to import only a sub region of the texture, what you can do is set the terrain layer (post import) on the terrain so that its size is equal to the size of the area the texture represents in real world units, in proportion to the size of the area the heightmap represents.

    For instance, say the heightmap is representing a region of land 1000m x 1000m, while the texture represents a region 2000m x 2000m.

    You would set the terrain layer to 2000 x 2000 instead of its default 1000 x 1000.

    You also need to modify the terrain layer offset values, the exact values of which will depend on where your real world 1000 x 1000 region begins in the texture file data.

    I hope that makes sense and answers your question! If not, please let me know what I missed and feel free to elaborate if you feel that I didn't understand your question correctly!
     
  46. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    108
    Hi!
    I ran into strange duplicating things during tiles importing. Source raw heightmap data are OK (if manually imported). Help, please :)
    Terrain Importer tile import.jpg
     
  47. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    I’m so sorry you are running into this issue!

    I haven’t seen this before, however it could be a bug that was introduced with the last update and just hasn’t been reported.

    As a first step, please export the TerrainImporter object you used to perform the import (as a unity package) and send it to me, as well as the following information:
    1. Exact unity version you are using.
    2. Version of Terrain Importer package you are using (in package manager, or in change log file at the top of the file).
    3. Purchase Invoice number
    Email to kgillen@deepspacelabs.net

    Thanks!
     
    akareactor likes this.
  48. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    108
    As it turned out, this is solely my inattention to an import format pattern. Thanks for the quick support and sorry for making you worried!
     
  49. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,193
    No problem, I’m glad we were able to figure it out and get the issue resolved!
     
    akareactor likes this.
  50. Danistmein

    Danistmein

    Joined:
    Nov 15, 2018
    Posts:
    82
    Hi, gilley.

    I created a terrain in WorldCreator. And it look likes below. When I import it into unity (with heightmap.raw, splatmap_00.png, splatmap_01.png, splatmap_02.png, splatmap_03.png), the terrain heightmap is correct. but the imported splatmap looks strange. Is there any settings I missed?
    Thanks!

    in WorldCreator:
    upload_2022-3-23_8-57-5.png

    Imported to Unity:
    upload_2022-3-23_8-48-14.png

    These are the settings:
    upload_2022-3-23_8-53-14.png
    upload_2022-3-23_8-53-33.png
    upload_2022-3-23_8-53-4.png
     
    Last edited: Mar 23, 2022