Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

► Terrain to Mesh ◄

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

  1. CDUnityDev

    CDUnityDev

    Joined:
    Jan 31, 2017
    Posts:
    25
    Hey @Arkhivrag - I'm working on a game that requires a terrain and right now it's not getting the desired frame-rate. I'm thinking that this is because I used the Unity terrain system, and that it might improve performance to use your converter instead. There are lots of trees and plants, and those are hurting performance in addition to the sheer magnitude of the terrain itself.

    Do you think that using your converter/splitter would do the trick?
     
  2. CDUnityDev

    CDUnityDev

    Joined:
    Jan 31, 2017
    Posts:
    25
    Better question: I went ahead and bought your script, and I'm trying to optimize the 10,000 trees it spat out. How do I assign a LoD that influences all of them so that I can get proper culling and billboarding? (And so that they don't require a million polygons to render)
     
  3. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Trees are exported as original prefabs. LODs are not generated.



    VacuumShaders - Facebook Twitter YouTube
     
  4. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    287
    What about this @Arkhivrag :
     
  5. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
  6. CDUnityDev

    CDUnityDev

    Joined:
    Jan 31, 2017
    Posts:
    25
    So to confirm @Arkhivrag , it's not possible to mass-edit the generated tree clusters by editing a root prefab somewhere?

    The script outputted three clusters of trees, and I'm trying to assign them all LoDs without having to do it for each individual tree 10,000 times. When I updating the original tree prefab, I can't find a way to access an individual "master" tree. If I right click on an existing one, there's no way to click "apply." And if I click on a tree in the scene, applying changes to it does not affect any other of the same tree.

     
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    T2M generates prefab for holding original tree prefabs.
    You must modify original prefabs and not the one generated by the plugin.



    VacuumShaders - Facebook Twitter YouTube
     
  8. Max-Modestov

    Max-Modestov

    Joined:
    Apr 23, 2014
    Posts:
    4
    Hello! I get an exception when I open TerrainToMesh window:
    TypeLoadException: Could not load type 'UnityEngine.ImageConversion' from assembly 'VacuumShaders'.
    I use unity 5.6.2
    Could you please fix this?
     
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    You are using Unity 2017.1 version of the plugin inside Unity 5.6
    Remove plugin from the project, clear Asset Store cache and download proper version from the store.



    VacuumShaders - Facebook Twitter YouTube
     
  10. Max-Modestov

    Max-Modestov

    Joined:
    Apr 23, 2014
    Posts:
    4
    Thank you for the answer! It solved the problem.
     
  11. MoribitoMT

    MoribitoMT

    Joined:
    Jun 1, 2013
    Posts:
    298
    Hi,

    This is just amazing tool, mesh conversion capabilties are amazing. I want to ask something about basemaps. It creates one signle basemap, and quality is really bad even 8k res.

    Is there way to create multiple seperated high quality textures that give similar results to original terrain look ?

    Regards

    Original terrain
    Screen Shot 2017-08-05 at 21.55.25.png

    After conversion one single basemap
    Screen Shot 2017-08-05 at 21.55.37.png
     
  12. tissot-cai

    tissot-cai

    Joined:
    Jan 16, 2015
    Posts:
    1
    It can't run for unity5.6.2f1,could you fix it?thanks!
    Error info:
    TypeLoadException: Could not load type 'UnityEngine.ImageConversion' from assembly 'VacuumShaders'.
    VacuumShaders.TerrainToMesh.TerrainToMesh_EditorWindow.Draw_Title ()
    VacuumShaders.TerrainToMesh.TerrainToMesh_EditorWindow.OnGUI ()
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
     
  13. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    137
    Hello @Arkhivrag , would it be possible to add triplanar mapping for the terrain shaders please? We would greatly appreciate it.
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Check texture import settings and make sure Unity imports it as 8k instead of 2k


    You are using asset for Unity 2017.1 version inside Unity 5.6
    Remove T2M from the project, clear Asset Store cache folder and download proper version from the store.


    Triplanar terrain shaders are out of the scope of this plugin and will not be added, sorry.



    VacuumShaders - Facebook Twitter YouTube
     
    MoribitoMT likes this.
  15. bgrz

    bgrz

    Joined:
    Mar 22, 2015
    Posts:
    42
    Hi Arkhivrag,
    I have a small feature request - would it be possible to add a "Add skirts" option to terrain splitting (see example picture)? We're using mesh terrain in combination with Unity terrain and this would help cover up the gaps that show up where those two terrains meet.
    As far as texturing the skirt goes, it can "borrow" from the neighboring tiles' UV space, or just repeat the last 5-10% near the edge of the same tile (to allow for someone else's use-case where they use separate per-tile textures that fit exactly so there's nothing to borrow from).
     
    Arkhivrag likes this.
  16. YHS

    YHS

    Joined:
    Aug 10, 2014
    Posts:
    31
    Hi, I'd like to know is that possible to export splatmap over 2048? I use WorldCreator to generate terrain and texture but performance is really bad and I export terrain to a mesh. But ColorMap or SplatMap's resolution just not enough. All the color details are gone. I'm wondering is "Terrain to Mesh" can help out with this?
     
  17. ID10T-Games

    ID10T-Games

    Joined:
    Sep 22, 2017
    Posts:
    1
    Hi Arkhivrag,
    I'm currently working on a VR game and have been using your plugin to convert our runtime generate terrains to meshes and the performance increase has been amazing, however I would like to request a small feature :)
    Would it be possible to expose some interfaces that deal with raw data rather than Unity components?
    The reasoning behind this is two fold, firstly, we wouldn't have to create terrain objects the we don't intend to render and secondly by providing and receiving raw data we could move the conversion from terrain data to mesh to into a background thread.
     
  18. mmvlad

    mmvlad

    Joined:
    Dec 31, 2014
    Posts:
    86
    How do I make it work with curved world? I am changing properties of curved world controller but terrain doesn't change. Do I need to set special shader to T2M material?

    Thank you
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Terrain To Mesh exports original splatmap used by terrain engine.
    You can manually change terrain splatmap size inside terrain Settings under Resolution tab with Control Texture Resolution option.


    Check Terrain To Mesh/Packages folder and ReadMe.txt file there.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Sep 25, 2017
  20. mmvlad

    mmvlad

    Joined:
    Dec 31, 2014
    Posts:
    86
    Thanks, all shaders set up ok now!

    But after I curved mesh terrain - chunks began to disappear (in editor scene view and camera view). Camera near plane is 0.3, far is 1000. When the terrain is not curved all is ok. Any idea why this happens?

    https://www.dropbox.com/s/34j5xll231r03ec/Screenshot 2017-09-25 23.59.36.png?dl=0
     
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
  22. bgrz

    bgrz

    Joined:
    Mar 22, 2015
    Posts:
    42
    Hi,
    I can't figure out how to use the API to create OBJ files, can you give me some code hint?
     
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    OBJ exporter available only inside editor tool. There is no run-time API for it.
    Check ObjExporter or ExportOBJ



    VacuumShaders - Facebook Twitter YouTube
     
  24. bgrz

    bgrz

    Joined:
    Mar 22, 2015
    Posts:
    42
    I'd use it from the editor to automate some level creation tasks, no need for runtime. I'm writing meshes to asset files in the meantime.
     
  25. rtjia

    rtjia

    Joined:
    Jun 6, 2017
    Posts:
    5
    How to batch generate Terrain meshes? Only select one terrain, and once generate on mesh?
     
    Arkhivrag likes this.
  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    With editor tool only one selected terrain. But a good feature to have.



    VacuumShaders - Facebook Twitter YouTube
     
  27. pfiala

    pfiala

    Joined:
    Apr 18, 2014
    Posts:
    1
    Hello. I bought your Terrain to Mesh plugin to convert my terrain. It worked great for the terrain itself, but the trees still consume a lot of processing time, as I have 3000 trees. I see many options for the terrain, but only on or off for the trees.

    Do you have another plugin, or some advice on converting my trees into something that can be drawn faster? All my trees are seen from a distance, so I don't need the high poly closeup.

    I realize that there are LOD's and the system is drawing the correct one base don distance, which is usually LOD 2 in my application. However even at LOD 2, rendering the trees is a big performance hit.

    Thanks!
     
  28. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    If original tree prefabs used inside Terrain system have their LOD then they will be extracted, otherwise T2M does not generate any additional data for trees, including LOD.



    VacuumShaders - Facebook Twitter YouTube
     
  29. bgrz

    bgrz

    Joined:
    Mar 22, 2015
    Posts:
    42
    Any ETA on this?
     
  30. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
  31. blueteak

    blueteak

    Joined:
    Feb 19, 2013
    Posts:
    125
    Any chance we can get shaders updated to work with Single Pass Stereo rendering for VR? Currently terrain is only visible in one eye :D

    Edit: It seems only the 1-Directional Light shaders are affected by the issue, so switching to legacy 4-texture shader for now.
     
    Last edited: Oct 15, 2017
  32. veddycent

    veddycent

    Joined:
    Jul 22, 2013
    Posts:
    79
    Hi all,

    Am i right in saying that there is no way to batch convert a bunch of terrain tiles?
    For example if I have 100 terrain tiles ideally I would convert them to 3 different LOD, doing this manually would be very inefficient use of time.

    Thanks
     
  33. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Bookmarked for the next update.



    VacuumShaders - Facebook Twitter YouTube
     
    veddycent likes this.
  34. abcdls0905

    abcdls0905

    Joined:
    Sep 14, 2017
    Posts:
    3
    Can get the source code??
     
  35. tysuu

    tysuu

    Joined:
    May 3, 2017
    Posts:
    3
    Have it support unity 5.6.2 yet ?
     
  36. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    No.


    All Unity versions above 5.3



    VacuumShaders - Facebook Twitter YouTube
     
  37. Kinami37

    Kinami37

    Joined:
    Jun 12, 2016
    Posts:
    3
    Very bad customer service, heavy performance problems.

    Can not recommend. Waste of money.
     
  38. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    What's problem?



    VacuumShaders - Facebook Twitter YouTube
     
  39. Kinami37

    Kinami37

    Joined:
    Jun 12, 2016
    Posts:
    3
    I wanted a refund because it wasnt the asset i was hopeing it would be, and the stuff that worked, didnt work for me because I didnt know it comes with a huge performance impact on detailed terrain meshes, i absolutelty have no need for the asset i bought, so I wanted a refund, but it got denied sadly, so i just wasted 27€ ... thats alot of money for people like me and I was first hesitant to spend it but well, i guess its my fault
     
  40. JesterGameCraft

    JesterGameCraft

    Joined:
    Feb 26, 2013
    Posts:
    146
    Hi,

    Can this asset be used to generate the type of terrain seen in this package on the asset store? If so will unity mobile shaders provide similar look on the resulting mesh?


    POLYGON - Adventure Pack

    Thank You,
    Regards.
     
  41. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    You need tool for generating faceted mesh with baked texture inside mesh vertex color.
    Check Low Poly Mesh Generator. Before purchase do research about lowpoly art style.



    VacuumShaders - Facebook Twitter YouTube
     
  42. JesterGameCraft

    JesterGameCraft

    Joined:
    Feb 26, 2013
    Posts:
    146
    Thank You. I will.
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    New update v2017.2 is available:
    • Added per-chunk Basemap exporter.
    • Added 'skirt' generating option.
    • Added vertex count controller for MeshCollider.
    • Improved shaders VR support.



    VacuumShaders - Facebook Twitter YouTube
     
    bgrz likes this.
  44. KevinCain

    KevinCain

    Joined:
    Nov 8, 2016
    Posts:
    85
    As noted in the above thread, it seems there is no way to batch process multiple meshes in the editor.

    If that is supported in the API, can you provide an example of batch import/export?
     
  45. KevinCain

    KevinCain

    Joined:
    Nov 8, 2016
    Posts:
    85
    See below a clear color shift between an input terrain (left) and the MtT output mesh with .PNG texture (bounded in orange, right):



    At first glance it looks like the delta is increased gamma, but something more subtle could be going on here.

    Is this a known point, and what do you advise?

    Thanks for any suggestions...
     
  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Editor tool does not support batch converter, but with included API you can do it manually.
    Check example scripts and API.pdf file (inside Doc folder).



    VacuumShaders - Facebook Twitter YouTube
     
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Generated mesh just can be using different shader than the original terrain, or may be similar shader but with different parameters.



    VacuumShaders - Facebook Twitter YouTube
     
  48. GameDevSA

    GameDevSA

    Joined:
    Dec 12, 2016
    Posts:
    22
    Hi, I'm using Unity 2017.1.03f and I got the error:

    Covertion Failed :(
    Object reference not set to an instance of an object
    UnityEngine.Debug:LogError(Object)
    VacuumShadoers.TerrainToMesh.TerrainToMesh_EditorWindow:Draw_GenerateButton(Boolean)
    VacuumShaders.TerrainToMesh_EditorWindow:OnGUI()
    UnityEngineGUIUtility: ProcessEvent(Int32, IntPtr)

    I've attached an image with the error and the settings I was using. I tried changing the default shader to 'Standard' also and that didn't work.

    Am I supposed to use a game object from a scene, or drag in a prefab? I tried both and it didn't work either way.

    Is Unity 2017.1 supported?

    I tried setting it up as best as possible, not really sure what else to do. Thanks.
     

    Attached Files:

  49. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    1) Upgrade Unity to 2017.1.1
    2) Remove plugin from the project
    3) Clear Asset Store cache folder
    PC - C:\Users\[Your Profile Name]\AppData\Roaming\Unity\Asset Store
    MAC - "~/Library/Unity/Asset\ Store".​
    4) Re-download asset



    VacuumShaders - Facebook Twitter YouTube
     
  50. luftwaffe2020

    luftwaffe2020

    Joined:
    Jan 19, 2015
    Posts:
    5
    Hello !

    I created a big map using Terrain Composer 2.
    I wanna convert that terrain into Mesh with all textures as .obj

    Will this plugin do that ?
    PS : I am noob