Search Unity

TerraLand 3 - Streaming Huge Real-World & Custom Terrains For Open-World Environments

Discussion in 'Assets and Asset Store' started by TerraUnity, May 20, 2018.

  1. Quast

    Quast

    Joined:
    Jul 5, 2015
    Posts:
    560
    Congratulation. I see a unique tool for terrain building. Great work.
     
    TerraUnity likes this.
  2. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    @Quast Thank you so much. It's been around 2 years of a teamwork only to bring TerraWorld up.
     
    Quast likes this.
  3. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    The upgrade path on our website is setup now and working as it should. So if you already bought TerraLand from our website, you can get TerraWorld package with 30% discount for $49 as you would on AssetStore too.

    TerraUnity customers can upgrade with 30% discount from here: http://terraunity.com/product/terraworld/
     
  4. Bingobuzzard

    Bingobuzzard

    Joined:
    Feb 5, 2017
    Posts:
    9
    I have a custom data elevation set of the entire world. I've seen how to make an offline server with custom data, but it's max size(1000 x 1000) is too limited for my needs. What I need to do is what the online streaming demo does, but offline with my data. How do I get past this size limitation.

    I can write scripts to manually cut up the data into tiles in qgis, but I would like to know how to take those tiles and make them into a server of the whole world. I see in the "Info" folder on an offline server has several files such as the GlobalHeight.tif, which only encompasses a small area.

    Any help would be greatly appreciated.

    P.S. Not that it matters, but I don't need any textures, just the heightmaps in my database.

    Thanks,
     
  5. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    The 1000km x 1000km limitation of area size in Downloader is when you want to use the Downloader plugin to create a cached server for you but if you already have your own data tiles, there is no limit in area size. The following information will get you started for your own custom server setup:

    TL's streaming only supports .raw for eleiovation and jpg for satellite images, so first you have to convert them to the supported format, slice them into tiles and put it in a cached server with supported structure...

    In "TerraLand Terrain" component there are processors which take heightmaps (also in .asc) format and convert to raw, also you can slice both elevation and imagery data to the desired grid size, so most of these actions are already built-in through these processors.

    The following two posts describe the structure of the servers in TerraLand to start making your own:

    https://forum.unity.com/threads/rel...world-environments.532304/page-6#post-4256392

    https://forum.unity.com/threads/ter...eal-world-gis-data.377858/page-8#post-3388627
     
  6. aerospacevitd

    aerospacevitd

    Joined:
    Nov 29, 2017
    Posts:
    5
    Anyone know how to fix this error? I'm in unity 2019.2.15f1

    Assets\TerraLand\TerraLand Core\Scripts\ConnectionsManager.cs(21,20): error CS0234: The type or namespace name 'Configuration' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
     
  7. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    There are 2 files named "mcs.rsp" & "csc.rsp" in the root Assets folder in project after importing the package, seems like you have removed those 2 files from project.
     
  8. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    HeadClot88 likes this.
  9. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    189
    It is not every day that a developer will help themselves to lose money in order to help their customers... bought it xD Thanks! Wont use it for a while, but happy to support and get a deal.
     
    TerraUnity likes this.
  10. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    @Rickmc3280 lol, always happy to help other developers and customers. Thanks for the kind words and support.

    If you want to connect with us and get notified about the latest updates, join our Discord server here: https://discord.gg/9J6Jk7B
     
  11. Mike891

    Mike891

    Joined:
    May 18, 2019
    Posts:
    23
    When is lwrp version available?
     
  12. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    @Mike891 TerraLand has nothing to do with Unity Rendering Pipelines and is already compatible with any SRPs such as HDRP and URP (aka LWRP) since it does not include any custom shaders or graphics stuff.
     
  13. AlienFreak

    AlienFreak

    Joined:
    Jul 2, 2012
    Posts:
    40
    Didn't work for me. I got TerraLand and would love TerraWorld but the discount wasn't triggering.
     
  14. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    Did this happen during the sales? If so, then contact AssetStore and send them purchase dates and info to resolve it for you, the same happened to many customers during sales.
     
  15. zakm9

    zakm9

    Joined:
    May 25, 2020
    Posts:
    3
    I am happy to have bought your two products and to be part of your community.

    For my first test of Terraland3, I followed your little tutorial:
    0- Download http://terraunity.com/freedownload/TerraLandStreaming_ZionPark.zip
    1- Extract TerraLandStreaming_ZionPark.zip file in the root directory of the project next to the "Assets" folder
    2- Find the gameobject with "RuntimeOffline" script attached on it in scene hierarchy
    3- Enable "Project Root Path" checkbox in "RuntimeOffline" script
    4- In the text field of "Data Base Path", type the name of extracted folder in step 1 and run the scene
    but the result is not as expected + an error (see my screenshot).
    Using:
    - Hp Envy dv6 i7 - win 10 - Ram:16G - Nvidia Geoforce GT-635M.
    - TerraLand 3.4.4
    - Unity: 2019.2.0.f1 and same problem with Unity 2019.3.10.f1.

    Please help me to resolve this issue.
    Screen.png
     
  16. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    @zakm9 Thanks, we are happy to have you in our list of customers too.

    The pink terrain is related to terrain material. Seems like you did not set any materials in the inspector for it on RuntimeOffline script.

    Regarding the error, we can not tell where the problem is unless you copy paste the full error from the console into here.
     
  17. zakm9

    zakm9

    Joined:
    May 25, 2020
    Posts:
    3
    Thank you very much for your support. I tried your guidelines, and it works.
     
    TerraUnity likes this.
  18. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    @zakm9 Glad you could sort it out. Let us know if you need more help using TerraLand.
     
  19. antsonthetree

    antsonthetree

    Joined:
    May 15, 2015
    Posts:
    102
    Hello - I just purchased TerraLand 3 and installed into a brand new unity project. I am getting the following compiler error. I tried removing System.Drawing.dll from the plugins folder but that just resulted in many more errors.

    upload_2020-5-28_14-48-9.png
     
  20. antsonthetree

    antsonthetree

    Joined:
    May 15, 2015
    Posts:
    102
    Nevermind. Had to finish the setup. The window was hiding behind another window. I'm good now. Very nice!
     
    TerraUnity likes this.
  21. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
  22. zakm9

    zakm9

    Joined:
    May 25, 2020
    Posts:
    3
    Sir, thank you very much for your support, and greet you in a friendly way.
    1) I use TerraLand3 and having trouble correctly displaying the map of the "SanSebastian" area that you gave as an example, in the forum.
    My problem is to know the values to assign to the following parameters of "RuntimeOffline" script :
    - Terrain Material
    - Detail Texture & Detail Normal
    - Layer 1 Abledo & Layer 1 Normal & Tiling 1
    - Layer 2 Abledo & Layer 2 Normal & Tiling 2
    - Layer 3 Abledo & Layer 3 Normal & Tiling 3
    - Layer 4 Abledo & Layer 4 Normal & Tiling 4
    - Streaming Assets
    - Is Streaming Assets
    I ask you to kindly indicate the values to be entered, to display the map correctly.

    2) Can I use the same values in all your examples ?

    3) Why should we give these parameters, when it is a TRUE TERRAIN, downloaded by TL3 and therefore, Material - texture ... must be applied automatically from the actual images ... downloaded from the area in question

    3) Will TerraWorld soon replace TerraLand and have only one tool to use?

    Thank you Another time for your support.
     
  23. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    @zakm9 you are welcome and greetings from here.

    First of all, please make sure you have the latest version from the store as San Sebastian demo has been removed few versions back.

    For "Offline Streaming" system in TL, there are already 7 sample scenes to get started and you don't need to do anything to run them in play mode except reading the ReadMe file next to each scene file to download needed terrain data and content from our website. These demo scenes are located under "TerraLand => Scenes => Runtime API => Offline Streaming" in your project.

    After downloading the content and do the steps in ReadMe, you can enter play mode and stream large worlds as all needed parameters in "RuntimeOffline" script has been already set up properly.

    is used when you need terrain tiles to have your custom terrain material and if it is empty then TL will pick Unity's stock terrain material automatically.

    These parameters are used when you need runtime splatmapping on terrains, the sample scene "Splatmap Terrains" under "Heightmaps - Splatmaps (World Machine)" folder uses this functionality to stream 8K terrain created in World Machine.

    There are also sample demo scenes under "Runtime Assets Placement" folder which shows how to stream terrain tiles from your server and automatically place items on terrains based on user-defined rules automatically in runtime.

    Here is a post with some information on it: https://forum.unity.com/threads/ter...world-environments.532304/page-7#post-4433686

    In the end, you just need to open demo scenes, explore "Runtime Offline" script and replace server path with your own downloaded tiles data and that's it, no need to change anything unless for customization.


    Sure, that's what is recommended as stated above, the set parameters can be a starting point to continue from there.

    Obviously, this is a Streaming System which loads terabytes of data from local/online terrain data servers as a complicated solution so for user customization and quality/performance considerations based on target platform all these parameters need to be set and confirmed by the user. I did not understand the question totally here though!


    That's true and false at the same time as we consider porting most of TL features such as streaming in TW in future but TL will still hold its exclusive features suited for more advanced GIS projects which don't care much about graphics and assets placement based on landcover biomes.
     
  24. Rom-

    Rom-

    Joined:
    Nov 26, 2008
    Posts:
    90
    Hello,

    I'm wondering if TerraLand 3 will be updated to support Unity 2020.1? I'm trying to use it in my project, but get a VideoPlayer error (which I've fixed), and can't get the dynamic (server) part to run.
     
  25. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    Hi, yes, it popped up recently due to latest API changes in Unity, simply remove "TerraLandSettings.cs" script and "TerraLandSlide.ogv" video file from the project and you will no longer receive errors about VideoPlayer.

    Please elaborate more on the issue and where you are stuck or copy/paste errors in the console if you have one.
     
  26. skytow2003

    skytow2003

    Joined:
    Feb 9, 2014
    Posts:
    30
    I need to generate meshes from terrains and I have done so pretty quickly.
    What I cannot understand and don't find any information on how to do (I couldn't find any manual apart from 3 images with a 1 line description) is to apply the images to the mesh.
    I tried using image tiler and image stitcher but either it didn't work or I dont know where the resulting images went.


    It is such a pity that a so well done product (very fast to create terrain) doesn't have any detailed information on how to use it and we have to resort to forums, chats, 2 year old videos ...

    thanks you for any response.
    pietro
     
  27. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    There is no automatic way to texture terrain meshes in TerraLand, because it's a simple mesh and you can easily drag and drop a satellite image in the Albedo/Diffuse slot of its material, that's it.

    If you need multiple images to be applied on this mesh then you need to UV the mesh accordingly which is out of question in Unity and you can do it pretty much in every 3D modeling software such as 3ds Max.
     
  28. alexisdubois

    alexisdubois

    Joined:
    Nov 23, 2016
    Posts:
    10
    Hi TerraUnity team !

    I bought today Terraland 3 and I guess I missed something in the workflow as my terrain remains grey even if the texture map has been downloaded (Unity 2020.1 URP)
    upload_2020-7-29_12-48-15.png

    My workflow : I open TerrainGenerator tab, find the correct location, setup parameters like size, resolution and then click on "Generate Terrain" button. And then I get this grey terrain, with a terrain layer which contains texture. Did I miss something ?
    Beside this, in the console, I have the error message as seen in the ConsoleError.txt attached.
    Could you help me ?
    Thanks
     

    Attached Files:

  29. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    @duboaa Thanks for the report, seems like a temporary issue while TL tried to move downloaded terrain tiles. If this happens all the times, then you should check your system admin settings to see if you have full read/write permissions.
     
  30. alexisdubois

    alexisdubois

    Joined:
    Nov 23, 2016
    Posts:
    10
    Hi @TerraUnity !
    Thanks for the tip. I'm gonna try tho check these permissions ;)
     
    TerraUnity likes this.
  31. skytow2003

    skytow2003

    Joined:
    Feb 9, 2014
    Posts:
    30
    To follow up on the terrain to mesh query, I would like to understand the workflow that you advice to turn a terrain from terra land into a textured mesh terrain that can be used in a mobile project for which the use of unity terrain is not advised.
    In my case I need a 4kmx4km mesh terrain. I first have Terra Land create the terrain which is output as 4 chunks and 16 images. I then convert the terrain into mesh still inside terra land (the output is 1 mesh).
    Now I need to texture the mesh and your advice was to uv map the mesh and apply the images to the mesh. The problem is that Terra land gave me 16 images so I either stitch them together in gimp and then apply the resulting image or I make 16 materials in Blender and assign them to the right faces of the mesh and then import it in unity in which I would have 1mesh with 16 materials. This workflow totally defeats the point of terra land being very quick and efficient at creating the terrain in the first place. Not considering that 16 images at 4096x4096 even compressed would take a lot of memory (if I would go the second route).
    I saw that on one of your videos you show a mesh terrain with textures. What is the workflow that you used to get to that result?

    Thanks in advance for your response.
     
  32. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    @skytow2003 Both methods you mentioned were correct and on point.

    So first of all, we never advertised TerraLand is a quick mesh generator from real-world data and its main goal is to generate terrain objects rather than meshes for all the extra features a terrain has over meshes. The Terrain To Mesh processor in TerraLand is a useful helper to convert your existing terrains into meshes and do the rest of modifications from there.

    In your case, the easiest way to go is to create a single terrain or as many as terrain objects in your scene (e.g. 4x4 tiles) each with a single satellite image on them and then convert each tile to mesh and simply drag and drop the sat image on each terrain model's material. The whole process is being done in Unity via TerraLand without the help of any external software and it would take under 2 minutes for 16 tiles!

    Would you please point to the video with mesh terrain and textures?
     
  33. skytow2003

    skytow2003

    Joined:
    Feb 9, 2014
    Posts:
    30
    This is the video.


    is it possible to send you a PM so I don't clutter this forum ?
     
  34. Biffbutkus

    Biffbutkus

    Joined:
    Sep 13, 2018
    Posts:
    1
    Hi - I imported TerraLand3 into my project in 2020.1.0f1 version, changed the Unity Player setting to ".Net4x" as instructed but I still get 999+ compile errors related to global namespace. Here's one:
    Assets/TerraLand/TerraLand Core/Scripts/BillboardText.cs(6,14): error CS0101: The namespace '<global namespace>' already contains a definition for 'BillboardText'

    Similar errors follow for other TerraLand classes like "AreaBounds" etc.

    What am I doing wrong?
     
  35. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    @skytow2003 Regarding the video, it's the same workflow I mentioned earlier, single terrain mesh and a single satellite image on it. FYI, the scene in the video is already available in the package with the name "TerraLand Terrain Processors" to checkout.

    Sure you can, but the best option is to join our Discord server and ask your questions from us and our community there: https://discord.gg/QgPpNpE
     
  36. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    @Biffbutkus It means you have duplicate scripts in your project! Simply remove the duplicate files and all errors will be gone.

    FYI, occasionally this could happen during package importing or dragging and dropping folders in Unity projects and not related to TL.
     
  37. skytow2003

    skytow2003

    Joined:
    Feb 9, 2014
    Posts:
    30
    I was able to create a single terrain with a single image and to convert it to mesh. The image was rotated but I can easily fix that in blender.
    The big problem is that the resulting mesh has 32000+ tris and 1.9 mb for only a 4kmx4km size.
    I checked your terrain to mesh example just to make sure I didn't miss something but your example of mesh is 134.000 tris.
    My intereset in TerraLand was to have a quick workflow all inside one package and with results that were usable in my mobile game. I already have an alternative workflow that is more convoluted and takes more then one program and more time but the results are more in tune with mobile devices for both tris and memory.
    I now understand that TerraLand is more geared towards Terrains and less towards optimized meshes so for me the asset in unusable.
    Since I have owned Terraland for less then 15 days I would like to ask for a refund. How do I go about this since I have never done it so I don't know if I have to contact Unity directly or deal with you as the developer of the asset.
    thanks for your assistance.
    Pietro
     
  38. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    @skytow2003 Honestly, nobody has ever requested refund from us on forums!

    FYI, refunds are accepted due to critical bugs and/or lack of support to resolve an issue and/or false advertisement of the product and not based on user assumptions, dreams or feature requests. If you still think that you have the reasons for this, send us an email at "info@terraunity.com" and our team will get back to you with the results if it is approved or not.

    Regarding your case, you already know that you can give your final mesh a division value (half, 1/4, 1/8, 1/16...) to define poly count in TERRAIN TO MESH processor.

    And no need to rotate mesh in Blender, the proper and easier way is to rotate your satellite image which you can do it even in Windows/Mac built-in photo viewer or any image editing software if mirroring needed! The output mesh is in the proper direction and rotation so you need to adopt image based on that but it's the nature of Unity that UVs are rotated after generation and you need to rotate image manually.
     
  39. skytow2003

    skytow2003

    Joined:
    Feb 9, 2014
    Posts:
    30
    Okay, I will write to you. .
    I didn't specify it but in my test I had obviously used the highest possible reduction of the mesh, 1/16th.
    And for me it's quicker in blender that I use every day and because sometimes it's not a matter of rotation but of mirroring. I didn't go in detail because I didn't think it was relevant.

    What is the problem in asking for a refund on a forum ? I stated that I am doing this because your plugin doesn't meet my needs not that your plugin doesn't meet somebody elses needs. I don't need terrain or streaming, somebody else does.

    Talking about dreams is very condescending on your part and regarding assumptions I didn't have the possibility to test your software and so I had to rely on the video in which you showed a mesh-terrain. But a 32000 tris terrain is not optimal when I can have one for less then 1000.
    If you don't think you have to refund me then don't, but let's keep this professional.
    Best regards.
    Pietro
     
  40. Liviuss

    Liviuss

    Joined:
    Apr 2, 2014
    Posts:
    101
    Hi,
    We just purchased this tool for one of our project and we have a strange behaviours during the editor play. The world itself loads fine at the start but when it come to load new terrain chunks, editor just hang(and it's a mbp16 with i9 16gb ram). We are using TerraLand Runtime scene for testing, screen is attached. Any suggestions? Thanks.

    P.S. Also build for standalone Mac is not working because of "Application.dataPath"

    ------EDIT------
    It hang because of heightmap size.
     

    Attached Files:

    Last edited: Aug 12, 2020
  41. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    Hi, that's the nature of Unity terrains API which takes place in the main thread and main functions like SetHeights for the heightmap is heavy especially on higher resolutions and causes spikes which is unavoidable. We have been waiting for thread-safe terrain API for years but seems like it is not going to happen soon.

    So to decrease these lags to its minimum, make sure to have the original heightmap tiles in the server to have low resolution (e.g. 256 or 128 or even lower) depending on the target platform and have more tiles count instead. In other words, to have a total of 16k heightmap resolution, instead of having a grid count of 32 with each tile being 512 pixels, change the grid count to 128 with each tile being 128 pixels. The math is as follows:

    Lower performance and more spikes: 32 (grid count) x 512 (tile resolution) = 16384 pixels
    Higher performance and less spikes: 128 (grid count) x 128 (tile resolution) = 16384 pixels

    Obviously, when you have more tiles, the updating of surrounding tiles will become more frequent and you need to increase the "Active Tiles Grid" value in RuntimeOffline component to have further viewing distance for the active tiles around the player. You can also increase the "Elevation Delay" value to spread heightmap process between frames (e.g. 0.1 instead of 0.001) to give more time for the heightmap applying.


    Would you please copy/paste the whole error you receive in the console!
     
  42. Liviuss

    Liviuss

    Joined:
    Apr 2, 2014
    Posts:
    101
    Hi

    There is no error related to datapath. I figured out that you have 2 modalities to set the path - Relative to Application.dataPath and Absolute. With relative, there is a problem because it point inside the .app package. You can alter this package but it's not a good solution.

    The biggest problem is the Mac build.
    If we build with Mono then on build we get:
    Code (CSharp):
    1. DllNotFoundException: /Users/bokken/build/output/Unity-Technologies/mono/external/buildscripts/add_to_build_results/monodistribution/lib/libgdiplus.dylib
    2.   at (wrapper managed-to-native) System.Drawing.GDIPlus.GdiplusStartup(ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
    3.   at System.Drawing.GDIPlus..cctor () [0x000c6] in <0dae0dd0475f4ff1915650ecf61fba20>:0
    4. Rethrow as TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception.
    5.   at System.Drawing.Image.FromFile (System.String filename, System.Boolean useEmbeddedColorManagement) [0x00026] in <0dae0dd0475f4ff1915650ecf61fba20>:0
    6.   at System.Drawing.Image.FromFile (System.String filename) [0x00000] in <0dae0dd0475f4ff1915650ecf61fba20>:0
    7.   at RuntimeOffline.GetImageryInfo () [0x001d9] in <1b5765d000b4406fb0638ebde8ab6b45>:0
    8.   at RuntimeOffline.SetupServer () [0x00851] in <1b5765d000b4406fb0638ebde8ab6b45>:0
    9.   at RuntimeOffline.Start () [0x00041] in <1b5765d000b4406fb0638ebde8ab6b45>:0
    10.  
    I solved the problem in Editor by following this: https://medium.com/xrpractices/working-with-libgdiplus-dylib-error-on-mac-and-unity-cd46181608b3

    If we build with IL2CPP then build fail:
    Code (CSharp):
    1. ArgumentException: The Assembly Mono.WebBrowser is referenced by System.Windows.Forms ('Assets/TerraLand/TerraLand Core/Plugins/System.Windows.Forms.dll'). But the dll is not allowed to be included or could not be found.
    2. UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:154)
    3. UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:194)
    4. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
     
    Last edited: Aug 12, 2020
    TerraUnity likes this.
  43. Liviuss

    Liviuss

    Joined:
    Apr 2, 2014
    Posts:
    101
    In the meantime i just removed all the System.Drawing dependencies and replaced with UnityEngine code. It's compiling now on MacOS.

    Example of code:
    Code (CSharp):
    1.  
    2. /*  using (System.Drawing.Image sourceImage = System.Drawing.Image.FromFile(TerraLand.TerraLandRuntimeOffline.imageryNames[0]))
    3.             {
    4.                 TerraLand.TerraLandRuntimeOffline.imageWidth = sourceImage.Width;
    5.                 TerraLand.TerraLandRuntimeOffline.imageHeight = sourceImage.Height;
    6.                 imageResolution = TerraLand.TerraLandRuntimeOffline.imageWidth;
    7.             }*/
    8.  
    9.             //Begin New Code
    10.             byte[] byteArray = File.ReadAllBytes(TerraLand.TerraLandRuntimeOffline.imageryNames[0]);
    11.             Texture2D sampleTexture = new Texture2D(2, 2);
    12.             if(sampleTexture.LoadImage(byteArray)) {
    13.                 TerraLand.TerraLandRuntimeOffline.imageWidth = sampleTexture.width;
    14.                 TerraLand.TerraLandRuntimeOffline.imageHeight = sampleTexture.height;
    15.                 imageResolution = TerraLand.TerraLandRuntimeOffline.imageWidth;
    16.                 Destroy(sampleTexture);
    17.             } else {
    18.                 Debug.LogError("Failed to load texture:" + TerraLand.TerraLandRuntimeOffline.imageryNames[0]);
    19.             }
    20.  
    21.             Destroy(sampleTexture);
    22.             //End New Code
    23.  
     
    TerraUnity likes this.
  44. Liviuss

    Liviuss

    Joined:
    Apr 2, 2014
    Posts:
    101
    Hi,
    I have found another problem related to the offline streaming and stitching.
    Let's imagine a situation:
    I load a 6x6 grid of terrains and all is fine, all terrains get stitched correctly and there are no gaps between them.
    If i load the same terrain in a 4x4 grid, all is fine for the loaded terrains but when the system loads next chunks the stitching is not applied(check attached images).

    This is valid for any region, any geo-structure(mountains, desert, etc).
    Any help would be appreciated.
    Thanks
     

    Attached Files:

  45. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    @Liviuss First of all, thanks for the great reports and sharing the solution on System.Drawing conversion. Macs become nightmare when dealing with System.Drawing and some other libraries and users think it's the asset's fault rather than Unity itself. Glad you could sort it out though.

    Regarding Windows.Forms.dll, would you please find this dll in project and remove it to see if you receive any errors at all? If so, a safe method some TerraLand users is to remove all TerraLand editor plugin related files from the project and make builds to avoid these errors and then bring them back again if you need it; or a better option is to have a development project where you create/setup scenes and another project for release and build where you have imported generated scenes as unitypackages.

    Can you confirm that this is the only place where System.Drawing is referenced in builds? If so, we will update the codes on our side and include your version there to avoid dll errors on Macs!


    Seems like the "Stitch Terrain Tiles" checkbox in RuntimeOffline script is uncheked, so enable this feature and all streaming tiles will be stitched accordingly when loaded. The weird thing is if this option is disabled there will be visible seams no matter if it's a 6x6 grid or 4x4!
     
  46. Liviuss

    Liviuss

    Joined:
    Apr 2, 2014
    Posts:
    101
    I have replaced System.Drawing in "Runtime", "TerraLandRuntimeOffline", "RuntimeOffline", "TerraLandRuntime".


    "Stitch Terrain Tiles" checkbox is enabled! I did a VS debug session and the stitching code is called but without effect.
     
  47. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    Thanks for the heads up.

    Seems to be a bug then, we'll check it out later. So with what's been reported, I think stitching will work fine if you select a Power of 2 value (e.g. 4, 8, 16, 32...) for "Active Tiles Grid" parameter. Please check back with it and let us know.

    P.S. what's the heightmap resolution of each tile?
     
  48. Liviuss

    Liviuss

    Joined:
    Apr 2, 2014
    Posts:
    101
    I have attached Info output so you can see how terrain was generated. By using only Power of 2 values on "Active Tiles Grid" parameter does not solve the problem with stitching.

    P.S. I have a suspition that the problem is related to the gap distance.
     

    Attached Files:

  49. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    Thanks for sharing, will check it on our side and get back to you soon.
     
  50. Liviuss

    Liviuss

    Joined:
    Apr 2, 2014
    Posts:
    101
    Any news on stitching issue?