Search Unity

[RELEASED] Multiple Terrain Brush

Discussion in 'Assets and Asset Store' started by NatureManufacture, Aug 20, 2015.

  1. skaughtx0r

    skaughtx0r

    Joined:
    Mar 9, 2014
    Posts:
    74
    Hi, I just bought this asset and its not working with terrain that I generated with TerraLand. I have 4 terrains in the scene and the brush only affects one of them.
     
  2. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Hi
    Please show us setup. Does they have correct positions? For example when 1st terrain end at 500 another start from 500?
     
  3. skaughtx0r

    skaughtx0r

    Joined:
    Mar 9, 2014
    Posts:
    74
    It looks like this:

    Code (csharp):
    1.  
    2. Terrains
    3.     | - Terrain 1-1  X = -3000 Z = 0
    4.     | - Terrain 1-2  X = 0     Z = 0
    5.     | - Terrain 2-1  X = -3000 Z = -3000
    6.     | - Terrain 2-2  X = 0     Z = -3000
    7.  
    Terrains1.png Terrains2.png
     
  4. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Could you send us this terrains as bug example?
     
  5. skaughtx0r

    skaughtx0r

    Joined:
    Mar 9, 2014
    Posts:
    74
    Yeah, how should I send it to you?
     
  6. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Via mail? dropbox?
     
  7. skaughtx0r

    skaughtx0r

    Joined:
    Mar 9, 2014
    Posts:
    74
    So, I was playing around with it a little, and it turns out the problem seems to be with the parent object position.

    If the object that all the terrains are parented to is at 0, 0, 0 then everything seems to work fine.

    If the parent is something other than 0, 0, 0 the multi terrain editor seems to have issues. I'm thinking its not taking the parents position offset into account.

    I was able to reproduce it in the tutorial scene by adding a Terrains object at 0, 0, 0 then adding all the terrain objects to it. Then change the position of Terrains to 500, 0, 0
     
    Last edited: Dec 13, 2017
  8. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    We checked parent setup and tool works fine. You change position during painting?
     
    Last edited: Dec 15, 2017
  9. skaughtx0r

    skaughtx0r

    Joined:
    Mar 9, 2014
    Posts:
    74
    I changed the position of the parent when not in edit mode. If you did what I said above, if you use the raise elevation brush. You'll be able to modify the terrain, but it doesn't happen where the mouse is, its offset on another part of the terrain.

    It's very easy to reproduce, I can send you a sample scene tomorrow.
     
  10. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Sure we would love to. We could fix that in 2 min but need repro.
     
  11. skaughtx0r

    skaughtx0r

    Joined:
    Mar 9, 2014
    Posts:
    74
    I tried creating a new unity project and I can't get it to happen. It only seems to happen in my other project.

    I'm thinking it must be a conflict with something else in my project.

    I'll have to do some more digging.

    Sorry for the trouble.
     
  12. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Hello, I just bought this to use with World Creator Pro and World Stream, but for some reason everytime I try to import it from the store Unity just closes. Is there any known compatibility issues with any other assets? As soon as I remove the files it tried to import Unity works fine again.
     
  13. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Unity often have strange problems with asset download and import. Try to import to other fresh project and then coppy paste files.
     
    Last edited: Apr 23, 2018
  14. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Ok, will try that now, thanks!
     
  15. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Looks like that may have done the trick, thanks!
     
  16. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    322
    can you add a feature to set the terrain properties?
    For example the Control Texture Resolution (which I need to change in something like 32x32 terrain grid) :rolleyes:
     
  17. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Try at debug mode. In this mode you have acces to values which are not edditable at group:)
     
    MaximilianPs likes this.
  18. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    322
    Wow this tool is amazing! ^_^
     
  19. Unity-IBR

    Unity-IBR

    Joined:
    Feb 28, 2015
    Posts:
    23
    Hi, I'm using Unity version 2017.3.1 and, when i import your asset, i have this error in my project:


    error CS1704: An assembly with the same name `UnityEngine.UI' has already been imported. Consider removing one of the references or sign the assembly
    D:/Program Files/Unity2017.3.1/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll (Location of the symbol related to previous error)


    I bought asset in Unity version 5.6 and all worked fine.
    There is some incompatibility with the versions 2017 and 2018?

    I really need to be able to use your asset :/
    Thanks
     
  20. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    Is this fully compatible with Unity 2018.1?
     
  21. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,021
    Hi,

    I did a quick test on 2018.1,5f1 and it worked fine for me.
     
    RendCycle likes this.
  22. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    Thanks for that info! :) Wait a minute, does anybody know if this would be compatible for terrains I made using Terrain Composer 2? I just need to seamlessly connect how multiple terrains look because some edges have different heights. But the multiple terrains must stay segregated for optimization reasons.
     
    Last edited: Jun 19, 2018
    NatureManufacture likes this.
  23. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    It works with every unity terrain object.
     
  24. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    Thanks for the reply! Does it blend together each adjacent terrain to remove any small gaps that may remain or do I still need Terrain Stitcher for that? But I don't want to connect them all as one single terrain and I still need to keep each terrain segregated.
     
  25. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    If fill the gaps but if you talking about terrain lod differences ( gaps dissapear when camera is close) you rather have to add terrain neighbour to the scene.
     
  26. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    I'm using Terrain To Mesh, to create four tiled terrains from a mesh landscape. But MTB does not keep the tiles together, and in fact even running Terrain Stitcher on them makes no difference. In fairness I need to check two regular terrains to see if it actually is working - using 2018.1.0f2. But I cannot see anything wrong with the border edges - in shaded mode it looks like a slight lip, but the wireframe doesn't show that.

    These screengrabs show the result after using MTB on a join.

    Any ideas what might be wrong here? Thanks.

    Edit: Yep, works fine on two terrain tiles.
     

    Attached Files:

    Last edited: Jul 24, 2018
  27. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Any warnings? info from system?
    Terrains are on same height? Y?
     
  28. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    No warnings at all, no errors. Yes, the terrain (4 tiles in this case) blended well. I also ran Terrain Stitcher, as mentioned, which works fine with same meshes after they failed to respond to MTB.
     
  29. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Could you show me scene? They arent coppy of themself?
     
  30. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    I can, yes. Although oddly, this morning MTB is now reporting an error when I hit start, which it didn't yesterday. And that's after running Terrain Stitcher on it. I'll take a closer look at this and report back. I can't see where the problem lies, but I guess it is something screwy with the terrain tiles, or some of them at least. Yesterday, MTB reported no errors, but gave the results as reported.
     
  31. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    I've got a problem with the levelling tool. I noticed this on my previous project, and now on a new one, on terrains that were derived from two different ways. In this case, it's four tiles imported directly from World Creator using their Sync Tool. The native levelling tool, in one spot, reports a value of 186m, and if I brush around there the terrain gets levelled to that, as expected. In the same spot, MTB reports the elevation as 39m and brushing gouges a great pit, not surprisingly. In the previous project, I created a tiled terrain using Mesh to Terrain, and this same problem happened: MTB not readling the terrain elevation correctly, whereas the native one would.

    However, I created a flat terrain in Unity, created some bumps on it and then tried the MTB levelling too. That worked OK, no problem. Any idea what might be throwing it on these terrains? Using Unity 2018.2.2f1.
     
  32. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    Probably answering my own question here, but these terrains are derived from heightmaps that come via Global Mapper, then World Machine, then into World Creator. Somewhere along the line, the heightmaps/terrain get these sides:



    These were on the previous project. As mentioned, the native tool has no problem with it. I do not know what is causing this, whether it's related to the +1 pixel on heightmaps used by Unity; World Creator does not use that. It outputs 4096 when Unity wants 4097. Would appreciate some insight please.
     
  33. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    It's matter of raw heightmap import format. I didnt use WC for long time so.. but try to export it in other way. This exported data doesnt look good are you sure it's correct at all?
     
  34. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    The actual heightmap/terrain is as expected: it's 50m Ordnance Survey data melded with 1m LIDAR, using Global Mapper - the terrain does look pretty much as expected. Regular random terrains from World Creator don't create these odd sides, so it must be happening either in Global Mapper or World Machine. The only successful format I have managed to export the data from Global Mapper, is Terragen, sending that into World Machine to convert to a heightmap. If I was making terrains up, I wouldn't have all this hassle, but sending real world data through three apps before getting to Unity is seemingly screwing with something somewhere. I'll take another look at outputting and see if I can cut this workflow down, and get rid of this problem.
     
  35. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    You could send me problematic data samples so I will look on it.
     
  36. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    I'd appreciate that. I note World Creator will take an OBJ as height input, so I'm going to try that route. But it would be good to resolve this sides issue on these terrains, because I am always getting them from my real world data, out of Global Mapper/World Machine. How shall I send the files, and where to? Many thanks.
     
  37. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    I've done more digging on this, as there had to be a sane answer. I know from talking with someone years ago about this, that Global Mapper had/has some quirks in its formats. I tried outputting a RAW file directly from it, but nothing I have made sense of it, whereas RAW files output from World Machine are fine. The guy I spoke to said the most reliable route out of Global Mapper, for terrain modelling, is the Terragen format, hence my using that. So I use that to take the data into World Machine, but this time output a 16bit PNG, and first opened it in Photoshop. There is a one pixel dark border all around the heightmap, which obviously is what is causing those drop-down sides that seem to be upsetting MTB. I output a mesh too, and that had the sides as well, not surprisingly. So, the route seems to be to output 16bit PNG from World Machine, strip out 1 pixel border then resize back to whatever power of two the map was (8192 in this case), do processing in the standalone World Creator, then use the Sync Tool to tile that into Unity.

    However, after all that and getting a clean terrain, so I thought, MTB's levelling tool still isn't working. It is generating a different value to the native tool, which does work correctly, and consequently MTB either raises or lowers the terrain, usually considerably. I'm glad to have fixed those sides, but I think there is something else wrong that MTB doesn't like.
     
    Last edited: Aug 11, 2018
  38. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Send me scene with terrain data which doesnt work we will investigate it :) send it via email.
     
  39. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    Thanks! Leave it with me for a day or so. I tried another tiled terrain, specifically for this purpose, but the MTB levelling tool worked. Then it didn't a bit, then it did. I just want to make absolutely sure this is not me. Though the disparity between the reported elevations of native and MTB is obviously not me, when it happens.
     
  40. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    I emailed you files last night. But just reporting that two new natively created terrains, with a single bump using the MTB raise/lower tool, is also failing to correctly report the elevation of the terrain at any given point.
     
  41. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    Did you manage to have a look at this problem?
     
  42. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    Any news on this please? This is an incredibly useful and more refined version of the native tool, so please don't abandon it.
     
  43. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Hi
    Forum didnt show me that there was new posts here :/ I will refresh case sorry for delay.
     
  44. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    322
    Would be awesome to have a Mould tool, something that will force terrain to adapt his surface to a collider... :)
     
  45. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Resend me the file I think last time I was not able to download it.
     
    JBT27 likes this.
  46. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Interesting :)
     
    MaximilianPs likes this.
  47. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
  48. toctoccontato

    toctoccontato

    Joined:
    Jan 14, 2019
    Posts:
    11
    hi,
    is it possible to adapt this asset to work at runtime?
     
  49. marcjammy

    marcjammy

    Joined:
    Aug 26, 2019
    Posts:
    13
    Hi - does this asset work at runtime?
     
  50. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026