Search Unity

► Terrain to Mesh ◄

Discussion in 'Assets and Asset Store' started by Arkhivrag, Oct 1, 2015.

  1. pixxelbob

    pixxelbob

    Joined:
    Aug 26, 2014
    Posts:
    111
    I see so it's unity's compression that causes the seams.
    T2M nests the trees inside the terrain prefab when Export trees is enabled, I think that's the issue here. It does make a seperate prefab for trees, maybe it should just not nest?
     
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    My fault, just detach tree prefab.




    VacuumShaders - Facebook Twitter YouTube
     
  3. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    pixxelbob likes this.
  4. pixxelbob

    pixxelbob

    Joined:
    Aug 26, 2014
    Posts:
    111
    No problem, you're right, I detatched the trees from the terrain and it seems to be working without error.
    Thanks very much!
     
  5. FutureAI

    FutureAI

    Joined:
    Aug 25, 2016
    Posts:
    10
    Sorry if these are silly questions, I'm still finding my way with Unity.

    I've played about with GAIA today, which enables me to create Unity terrains easily. Will this tool work okay with GAIA-generated terrains, does anyone have any experience?

    My understanding, from reading this thread, is that the best solution is to turn my terrain into a low-poly mesh and use a basemap to texture it, providing the best possible mobile performance. Is that correct?

    I see that I can move trees across, I guess what I will lose is the ability to automatically add grass etc. to the mesh in my scene. I'm also not sure about how water is handled.

    Thanks for any advice.
     
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    1) All Unity terrain assets can be converted to mesh.
    2) Basemap can be baked only if terrain asset uses Unity built-in terrain shader (it's default shader for terrain)
    3) Lowpoly mesh and Basemap are the best for mobile performance.
    4) Trees can be exported from Unity terrain, grass - no.
    5) Water o_O



    VacuumShaders - Facebook Twitter YouTube
     
  7. duencil

    duencil

    Joined:
    Dec 17, 2012
    Posts:
    91
    If you keep the original terrain enabled, but uncheck it's Draw option, it will still do grass and other detail, plus trees. Thats a nice compromise of performance and features. Of course if the mesh is at a lower resolution than the terrain was, you may get bits of floating grass where bumps got flattened
     
    Vontarga likes this.
  8. pixxelbob

    pixxelbob

    Joined:
    Aug 26, 2014
    Posts:
    111
    Hi, Getting some issues on iOS when using High compression.
    The vertex count error is fixed but we're getting reports of "Array index is out of range"

    Code (csharp):
    1.  
    2. IndexOutOfRangeException: Array index is out of range.
    3. at VacuumShaders.TerrainToMesh.CompressedMeshLoader.GetMeshData (UnityEngine.Mesh _mesh, SIDE _side, UnityEngine.Vector3[]& vertices, UnityEngine.Vector2[]& uv, UnityEngine.Vector2[]& uv2, UnityEngine.Vector3[]& normal, UnityEngine.Vector4[]& tangent)
    4. at VacuumShaders.TerrainToMesh.CompressedMeshLoader.Combine (UnityEngine.Mesh _meshBottom, UnityEngine.Mesh _meshTop, Boolean bottomTop)
    5. at VacuumShaders.TerrainToMesh.CompressedMeshLoader.Fix (UnityEngine.MeshFilter[] _childMeshFilter)
    6.  
    I've only seen this error on debug iOS builds pushed to our testers.
    No 100% sure if it breaks anything yet.
    Any ideas?
     
    Last edited: Sep 9, 2016
  9. DRIVER1ksa

    DRIVER1ksa

    Joined:
    May 29, 2015
    Posts:
    27
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    Only unity built-in shader can be baked (T2M material or Basemap). Custom shaders - no.
    If using custom shader, why just not use it on the generated mesh? May be shader will need some correction for it.



    VacuumShaders - Facebook Twitter YouTube
     
  11. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    288
    Kia ora

    Don't by chance have somit that does mesh to heightmap at all?
     
  12. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    ScreenShots_8.jpg



    VacuumShaders - Facebook Twitter YouTube
     
  13. DreamingEarthling-Joe

    DreamingEarthling-Joe

    Joined:
    Mar 8, 2016
    Posts:
    1
    Great Tool !!

    Currently, one basemap is generated per terrain, regardless the number of the chunks.
    Is it possible to generate/divide basemap per chunk in future, maybe ? :)
    (It would be a great feature for our mobile project)

    Thank you !
     
    beatelove likes this.
  14. mikeyma

    mikeyma

    Joined:
    Sep 14, 2016
    Posts:
    1
    I get no menu :-(
     

    Attached Files:

    • fdfd.PNG
      fdfd.PNG
      File size:
      27.2 KB
      Views:
      420
  15. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    Take note that there are two versions of the T2M on the Asset Store. One for Unity 5.3.6 and another for Unity 5.4
    Which version will be downloaded depends on Unity editor version itself, but some times Unity does not do it correctly.

    Solution:
    1) Remove Terrain To Mesh asset from the project.
    2) Clean Asset Store cache:
    PC - C:\Users\[Your Profile Name]\AppData\Roaming\Unity\Asset Store
    MAC - "~/Library/Unity/Asset\ Store".3) Now, download package from the Asset Store.

    When doing clean download Unity will recognize correct version of the asset.



    VacuumShaders - Facebook Twitter YouTube
     
  16. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,675
    Last edited: Sep 16, 2016
  17. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    Can you send your "image effect work in scene view" script, may be it somehow intersects with T2M maps generator.



    VacuumShaders - Facebook Twitter YouTube
     
  18. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,675
    This is new unity function.
    [ImageEffectAllowedInSceneView]
    If you add this to image effect script it will show at scene view.
    But this could be also because of world creator asset in my project so, nvm:)
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    Was not able to reproduce, at my side everything works as expected.
    What is the image effect you have used?



    VacuumShaders - Facebook Twitter YouTube
     
  20. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,675
    As I said this could be also world creator shaders. I will find this for you next week:)
     
  21. niandrei

    niandrei

    Joined:
    Sep 1, 2016
    Posts:
    3
    Hello,

    I have made a map for someone using your plugin, and now they tell me they have this problem, see attached.
    Any idea what is wrong, or how to fix this? They use Unity 5.4.0f3. Thanks in advance. Ekran Resmi 2016-11-03 10.31.16.png
     
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    1. Remove Terrain To Mesh folder from the project.
    2. Clean asset store cache:
    PC - C:\Users\[Your Profile Name]\AppData\Roaming\Unity\Asset Store
    MAC - "~/Library/Unity/Asset\ Store".​
    3. Download fresh version from the Asset Store.



    VacuumShaders - Facebook Twitter YouTube
     
  23. niandrei

    niandrei

    Joined:
    Sep 1, 2016
    Posts:
    3
    Thank you very much for your support.
     
  24. LightingBox2

    LightingBox2

    Joined:
    Mar 31, 2015
    Posts:
    2,815
    Thank you for your great asset
    My question:
    How can i use your tool with easy road 3d? I test it several times but doesn't work with easy road. unity 5.3 and 4.7 version.
    Is there any particular way?
     
  25. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    Terrain To Mesh converts Unity terrain asset into simple mesh, with controllable detail (vertex count).
    What do you mean by 'doesn't work with easy road'.



    VacuumShaders - Facebook Twitter YouTube
     
  26. LightingBox2

    LightingBox2

    Joined:
    Mar 31, 2015
    Posts:
    2,815
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    You are comparing high detailed Unity terrain with low detailed mesh.
    Just increase vertex count and you will have the same quality mesh.



    VacuumShaders - Facebook Twitter YouTube
     
  28. LightingBox2

    LightingBox2

    Joined:
    Mar 31, 2015
    Posts:
    2,815
    Yes. But my problem isn't terrain quality.
    I want to know how can i use terrain to mesh with EasyRoad3D correctly?

    This is my test:
    Untitled.jpg
     
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    During conversion Terrain To Mesh uses data stored only inside terrain asset itself. It is e.g. heighmap info, resolution, length and width etc.

    Inside terrain is not stored that it has been modified by EasyRoad or with some other plugin.

    Solution:
    You can export terrain as OBJ file and adjust it inside any 3d modeling software.



    VacuumShaders - Facebook Twitter YouTube
     
    LightingBox2 likes this.
  30. marcojacovone

    marcojacovone

    Joined:
    Jul 7, 2014
    Posts:
    63
    Hi,

    I'm using Unity 5.4.1f1 With Terrain To Mesh 1.44,
    Transforming from terrain to mesh with using BaseMap works well.
    With splat maps, it works only if I use max 4 texture.
    5, 6, 7, and 8 texture shaders (whatever shader I select) doesn't work, it shows the terrain completely transparent.

    What can I try?
    Thanks in advance. Schermata 2016-11-11 alle 02.47.18.png Schermata 2016-11-11 alle 02.47.24.png
     
  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    Can you send me terrain asset as package with all used paint textures?
    What OS do you use?



    VacuumShaders - Facebook Twitter YouTube
     
  32. marcojacovone

    marcojacovone

    Joined:
    Jul 7, 2014
    Posts:
    63
    Im using macOS.

    Can I send you I private msg? Conversations don't allow attachments.
     
  33. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
  34. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    Do you plan on supporting keeping original resolution at the edges as an option?
    This would make it super easy to make LOD versions of the terrain which would increase performance even more.
     
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    Currently not planed, but added to a wish list.



    VacuumShaders - Facebook Twitter YouTube
     
  36. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    Ok, instabuy for me as soon as its added : p
     
  37. MaxWeiChen

    MaxWeiChen

    Joined:
    Apr 10, 2015
    Posts:
    1
    HI I have the same problem,
    Im using macOS too , and Unity v5.4.2f2
    the shader 5,6,7,8 textures doesn't work in my case

    sorry my Enlish is pool
     
  38. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    Problem is not with shaders but with some MacOS that can not handle multiple texture rasterization in a single pass and fail to render (render mesh transparent).
    There is nothing to be fixed in T2M shaders, it may be hardware problem, drivers or Unity itself.
    Try reduce terrain paint textures count.



    VacuumShaders - Facebook Twitter YouTube
     
  39. blueteak

    blueteak

    Joined:
    Feb 19, 2013
    Posts:
    125
    Hello!

    Just bought your asset to turn my Unity terrain into a mesh but am having some difficulty with the process.



    I have a very light terrain, mostly snow with some patches of dirt here and there. The issue I'm having is that when I generate the mesh, the dirt areas are getting much darker than they should.

    I've tried many different combinations of settings, tried every included 4-texture shader, but nothing seems to fix the issue.

    Additionally, the generated BaseMap is completely black except for the last of the 4 textures (detail bright snow).

    When I went to the standard shader included, and changed all the Layers to the exact same texture+normal+settings (bright snow), the darkness remained, so I feel like it's an issue with the splat map or the shader.

    Please let me know of any of the settings seem incorrect, or if I'm doing anything wrong. I am on Unity 5.4.0f3 and the VaccumShaders updater says I'm up to date (1.45).
     
  40. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    Note, T2M works only Unity built-in terrain shaders. Custom shader are not supported and can not be baked.
    Dark areas may be due to Splatmap texture compression, change it to uncompressed format (Unity terrain use uncompressed Splatmaps too)



    VacuumShaders - Facebook Twitter YouTube
     
  41. blueteak

    blueteak

    Joined:
    Feb 19, 2013
    Posts:
    125
    Ok, I will try uncompressing the generated splatmap. I am using the Standard (built-in) Unity terrain shader for the base terrain being used to generate the mesh :)

    Any info on the black BaseTexture?


    Edit: Still having some issues, changing the compression didn't do anything, but changing the texture to turn on "Alpha is Greyscale" did help a bit.

    This is the material with all the textures the same (pure white snow) with the new splat texture, getting a number of dark splotches.

     
    Last edited: Dec 13, 2016
  42. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    Send me terrain with all its paint textures as package, I'll check.
    But before it, did you use Linear color space? Use editor tools in Gamma color space for avoiding Unity Linear<->sRGB conversions.



    VacuumShaders - Facebook Twitter YouTube
     
  43. blueteak

    blueteak

    Joined:
    Feb 19, 2013
    Posts:
    125
    Perfect! Gamma color space worked like a charm!

    Thanks for your help :D
     
  44. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,680
    Quick question. If I already have a mesh terrain can this tool split it into chunks?
     
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    If you mean common mesh splitting function, no.
    Plugin works only with Unity terrain asset.



    VacuumShaders - Facebook Twitter YouTube
     
  46. OcypodeStudios

    OcypodeStudios

    Joined:
    Aug 24, 2015
    Posts:
    6
    Hi

    I bought this package before and I want to use it now. I have a problem with shaders. My scene is lightmapped and I m using mobile unlit (supported lightmap) shader for other parts of my scene. I have to use unlit shaders of your package but unlit shaders of your packge does not support lightmapping. Maybe you can update package with new unlit shaders that are includes support lightmapping..
     
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,193
    One Directional Light shaders have the same performance as Unlit, if used with lightmaps.




    VacuumShaders - Facebook Twitter YouTube
     
  48. OcypodeStudios

    OcypodeStudios

    Joined:
    Aug 24, 2015
    Posts:
    6
    I have no performance problems with your shaders. There is a visual problem. Unlit shader and t2m shader sharing the same texture in my game. And grass parts looking different. I need the same visually..
     

    Attached Files:

  49. OcypodeStudios

    OcypodeStudios

    Joined:
    Aug 24, 2015
    Posts:
    6
    Any solution?
     
  50. OcypodeStudios

    OcypodeStudios

    Joined:
    Aug 24, 2015
    Posts:
    6
    Hi Arkhivrag. Are u going to help me? Are you going to edit unlit shaders of your package? Or Do I try somethings?