Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Mesh Terrain Editor, a mesh-based terrain creator, converter and editor

Discussion in 'Assets and Asset Store' started by zwcloud, Apr 10, 2016.

  1. pasza89

    pasza89

    Joined:
    Mar 27, 2014
    Posts:
    12
    I've just ran into an issue:
    - reloaded a level
    - deactivated everything except Terrain 2
    - selected Terrain 2 in inspector
    - Window -> MTE -> Editor
    - I can paint height normally
    - when I wanted to use Vertex Paint to restore painted vertices, I couldn't do it - the button Attach VertexColor is active
    - I clicked it, and vertex colors were reset
    - I painted some shapes again with Vertex Paint
    - saved, reloaded level
    - same situation every time: I can paint height, but can't paint vertices after reloading, even though VertexColorInitializer is attached, active, and has VertexColor object set

    Unity 2017.3.1f1

    Sorry :/
     
  2. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Please don't attach vertex color initializer again if there is one already. The tool button Attach VertexColor should only be used once on a mesh terrain.

    And if you haven't read MTE_ReadMe, please have a look at it. Many details about how to use MTE are already described in it.

    I will try to reproduce the issue that you can't paint vertices' color, it didn't happen before.
     
  3. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    There is no need to select a mesh-terrain in the scene. Please read The Filter section of MTE_ReadMe:
    And for MTE Free, there is an extra limitation: only the first two meshes that match the filter can be edited. But which two meshes will be selected is totally random.

    So following the steps below:
    1. Add a tag 'mesh_terrain'.
    2. Set the tag of meshes, which you want to edit with MTE, to 'mesh_terrain'
    3. Set MTE filter tag to 'mesh_terrain'.
    4. Click the filter refresh button.
    5. Now only the meshes with the tag 'mesh_terrain' will be edited by MTE.
     
    Last edited: Jun 7, 2018
  4. pasza89

    pasza89

    Joined:
    Mar 27, 2014
    Posts:
    12
    Ah, in the ReadMe you used phrase:

    "MTE Free users can only edit first two mesh-terrains together."

    I thought that mesh-terrains which were created/converted by MTE were somehow recognized by MTE. But from what you wrote here, my understanding is that MTE can edit all meshes which match the filter - so I created a tag+layer which I use only temporarily for terrain that I want to edit, and it seems to work :)

    Also, I am not sure if I always remembered to click Apply in the inspector after editing Vertex Colors (so that the changes are applied to the prefab), but it seems that using it helps with issues related to vertex colors.

    Thanks again, you are the greatest!
     
    zwcloud likes this.
  5. pasza89

    pasza89

    Joined:
    Mar 27, 2014
    Posts:
    12
    After like 2 hours of editing, it stopped working after I switched from height paint to vertex paint (I've done it several times during that time and it worked before).
    On the screenshot you can see that dark green mountain on the left is selected, it has tag Landmass and layer Visible for #1, the same settings as MTE. There is Vertex Color Initializer component present on the object, th Vertex Color object still has the information I painted (if I view it in notepad, there are many modified values), but I can't paint - the button Attach Vertex Color is active for a reason I don't know. I can still edit height, it's just seems that Vertex Paint stopped seeing VertexColorInitializer.
    I tried setting tag and layer again, clicking filter button, closing and opening MTE window, launching Unity again, still the same.
    The other terrain on the right works just fine when I set its tag and layer.

    upload_2018-6-7_22-41-57.png


    EDIT:
    I made a little test - I've made a ton of backups of VertexColor.asset file, removed VertexColorInitializer, clicked button Attack Vertex Color, and compared new file with no data (just 1,1,1,1 as the color for all vertices) and there was one significant difference. If that matters - the terrain is maximum size, 180x180 segments

    freshly made VertexColor.asset has 32427 lines (last line is empty)
    the previous VertexColor - Copy.asset has 32426 lines (last line is empty)

    for some reason, at some point, one line is removed apparently and the number of data lines doesn't match the number of vertices (180x180 = 32400).
    So I added one line with data right before the empty line:
    Code (CSharp):
    1. - {r: 1, g: 1, b: 1, a: 1}
    ...and it works again.
     
    Last edited: Jun 7, 2018
    zwcloud likes this.
  6. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Thank you very much! I'm really grateful to you for the detailed test and description. I will definitely look into it carefully.


    UPDATE:
    The only reason I can think of is that the vertex count somehow changed.

    And this is probably caused by
    The possible solution, I think, is to use the binary-format asset instead (I'm not sure if it works) and don't use some settings that have an influence on the vertex count of a mesh.

    The MTE editor itself never changes the vertex count of a mesh, even when deleting faces in the mesh toolbox - it only removes indices of faces.

    That's a correct solution. MTE won't edit the vertex color if the count of vertex colors in the asset file doesn't match the vertex count of the mesh.

    In the next version of MTE, a warning message will be added to the editor window when the vertex count is different from the vertex color count, which will clearly point out why MTE cannot paint.
     
    Last edited: Jun 9, 2018
    pasza89 likes this.
  7. pasza89

    pasza89

    Joined:
    Mar 27, 2014
    Posts:
    12
    Happy to help, hopefully I didn't cause you a lot of trouble.
    Regarding vertex count, the mesh which had this problem was created by MTE, so maybe default settings of it are at fault... Not sure and I don't want to experiment as long as it works (and it does, had no issues in the last 2 days, so it might be rare happening) - the only issue are vertex colors not being applied after loading the project so I gotta click paint on each of them.
    Thanks again and I'll report any issues I'd encounter :)
     
    zwcloud likes this.
  8. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Solved.:) Just replace the original MTE_script.dll with the attached one below:
     

    Attached Files:

    pasza89 likes this.
  9. pasza89

    pasza89

    Joined:
    Mar 27, 2014
    Posts:
    12
    It works perfectly now! Thanks a lot!!! :D
     
    zwcloud likes this.
  10. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    MTE v3.2.0 released!

    Direct Download:
    https://mega.nz/#F!uFpCRQQL!GhzA01BkUIt7kLimxA7mbw

    Release notes:
    • Editor
      • Grass Painter:
        • Added support to specify the rotation of grass quads when painting.
      • Vertex color painter:
        • Fixed that the vertex color is not applied to a mesh when opening a scene.
        • Added a warning to debug output when it detected that vertex color count and vertex count is not equal.
      • Fixed NullReferenceException when opening the MTE editor.
      • Fixed MissingReferenceException when opening another scene.
    • General
      • Added a warning when the vertex count is big while using .obj as the file format of a mesh.
     
  11. JDEdmo

    JDEdmo

    Joined:
    Jun 10, 2018
    Posts:
    3
    First off I for one like that in the video you showed it taking time in creating/converting instead of just cutting the video.

    If this is still an active asset....

    Unity Version 2017.3.1f1
    However for some reason when I create a mesh-terrain add my 4 textures and go to try and paint the textures on it turns the mesh black. I also had to goin and manually set the splatmap it creates to RGBA 32 and went to each of the textures I have and set them to the same and still just a black screen.
    Just black no errors once I changed all the textures to RGBA32

    As you can see here I did get it to work for a tiny while when I used Unitys Checkerboard but then once I clicked off of paint texture and went back it was black again.


    I am assuming it has something to do with ether the format/size of the textures I am trying to use or some unity setting for importing images.

    What size and format for the images do you or others use that work?
     
  12. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Sure, it is! I will update MTE more often from now on.

    Thanks for the feedback. I'm looking into it.

    This is my importer settings for the Splat Alpha 0/1 textures: (Unity 2017.1.0f1)

    upload_2018-7-15_18-51-42.png


    I'm downloading Unity 2017.3.1f1...

    UPDATE:

    On Unity 2017.3.1f1, the import settings for the SplatAlpha textures should be set like below.
    upload_2018-7-15_19-27-46.png

    The default import settings is incorrect (the texture should not be compressed) and it is a bug. It will be fixed in the next release of MTE. I have created an issue item for this: https://github.com/zwcloud/MeshTerrainEditor-issues/issues/14

    I'm really grateful for your feedback!
     
    Last edited: Jul 15, 2018
  13. JDEdmo

    JDEdmo

    Joined:
    Jun 10, 2018
    Posts:
    3
    Thanks for the fast reply and bonus workaround.. I had set the no compression settings but didnt think to change the default since I was assuming changing it for PC/Android was enough.

    Gotta love the smart people :)
     
    zwcloud likes this.
  14. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    It is actually a bug. I'm sorry for the inconvenience.
     
  15. JDEdmo

    JDEdmo

    Joined:
    Jun 10, 2018
    Posts:
    3
    Soo ya about bugs lol
    [this issue was first found in my main project but i created a new one with just mte and probuilder assets no other stuff added]
    I changed the layout of the windows in unity and docked the MTE Editor window like so


    and when I go to click that layout under the windows->layout it does some funky stuff.. like it opens up lots of other windows not connected to unity like so...


    but after signing out and back into windows (since some of the windows wont close or end there tasks) unity loads up looking like so...


    fyi I am still looking forward to using this tool once it seems to play nice with Unity 2017.3.1f1 hehe

    Also is there some other forum I should post any future issues.
     
    zwcloud likes this.
  16. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    That's probably caused by some Unity internal bug which I cannot handle. I will look into that later.

    It is recommended to post issues on the MTE issue tracker.
     
  17. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
  18. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    I have been implementing light-mapping for grass and adjusting the editing and run-time pipeline since three weeks ago. 80% of the work is finished.
    0731210.jpg
    (baked scene in Unity 2018.1f1)

    Sorry for the delayed new release of MTE. It will be released soon.
     
    Last edited: Jul 31, 2018
    Fibonaccov and HeadClot88 like this.
  19. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Mesh Terrain Editor 3.3.0 is released, submitting to Asset Store.

    == Direct Download from Mega ==

    upload_2018-8-24_20-21-44.png

    Change Log:
    • Editor
      • Texture Painter:
        • Fixed: preview becomes black after baking lightmap.
      • Grass Painter:
        • Supported lightmap for grasses.
        • Changed: the GrassLoader is automatically loaded.
        • Improved grass shaders.
    • General
      • Changed "MTE" to "Mesh Terrain Editor" in the menu.
      • Added useful help items to menu items under Mesh Terrain Editor -> Help.
      • Added a welcome window.
      • Improved ReadMe styles and layout.
     
    Last edited: Aug 25, 2018
  20. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    I'm improving the build pipeline of Mesh Terrain Editor. And it will moved to a cloud platform so I can work with it anywhere with access to the Internet.
    These changes will effectively reduce the time for making and publishing a new release.
     
  21. Lesnikus5

    Lesnikus5

    Joined:
    May 20, 2016
    Posts:
    126
    Hello!
    I want to edit the mesh at runtime, during the game. In order, for example, to create craters from bombs or mud furrows like in SpinTires. Is this possible?
     
  22. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Thank you for your interest in Mesh Terrain Editor. But currently I have no plan to support runtime-editing. (Runtime-editing had been developed for a while, but was dropped because it is too much for an individual.) Maybe one day I will do that but that's not planned, sorry.

    FYI, the theory of runtime-editing is not quite complex: a proper map from a real 2D region to the texcoord region.
     
    Last edited: Sep 3, 2018
  23. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Mesh Terrain Editor v3.3.1 is ready for download. (Asset Store package pending review.)

    https://mega.nz/#F!3BIShKAA!YKqjh3BQnnTz-8oRIpcHBA

    tool_grass_painter.png

    Change Log:
    • Editor
      • Texture Painter:
        • Improved: automatically set the importer settings of brush textures. Fixed this issue.
      • Grass Painter:
        • Changed: show grass prototype mesh in the editor.
        • Added: Support for rotating painted grasses.
     
  24. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Last edited: Oct 7, 2018
  25. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    To Unity 2018 users: some terrain shader will not compile on Unity 2018.

    The solution is to delete this section in the shader you want to use:
    This is actually a bug of Unity 2018. Sub-shaders that are not supported should be ignored by Unity instead of throwing an error.
     
  26. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,879
    @zwcloud If I have a multi-tile terrain, can MTE convert it to multi-tile meshes? If so, is it possible to seamlessly sculpt, paint, and work with vegetation on multi-tile mesh terrains?

    [EDIT]
    I tried the free version and it lets me paint and sculpt across 2 terrain tiles among a set of 4 terrain tiles. Is this a free version limitation? Will pro allow editing across all tiles?

    [EDIT 2]
    I see you answered my tile editing question earlier so no worries there.
     
    Last edited: Nov 12, 2018
  27. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,879
    @zwcloud Do you have a fix for the issue where the editor goes blank after running a scene? I'm probably going to purchase this, but having to close and re-open Unity every time I run a scene is a huge problem.
     
  28. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Yes, it is. MTE Pro will allow editing across all tiles.

    That issue has been fixed in the latest version v3.3.1f2. Have you tried it? It is not live on the asset store but can be downloaded directly from https://mega.nz/#F!3BIShKAA!YKqjh3BQnnTz-8oRIpcHBA
     
    Last edited: Nov 13, 2018
    magique likes this.
  29. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    @magique
    This hasn't been implemented but there is a plan. You will need to convert the tiled terrain one by one or use the API programmatically:
    MTE.MTEConversion.ConvertTerrainToMesh

    Code (CSharp):
    1. public static void ConvertTerrainToMesh(GameObject terrainGameObject, TerrainConversionSettings settings);
    See the doc for detail on MTE conversion API.

    But you can create tiled meshes directly with MTE Creator, and then seamlessly sculpt, paint, and work with vegetation on multi-tile mesh terrains.
     
    Last edited: Nov 13, 2018
    magique likes this.
  30. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,879
    @zwcloud Does the Pro version have any sort of mesh tessellation? For example, I might want to smooth out a really rough piece of terrain, but if the resolution in that spot is too low then it's not going to work well. It would be nice to be able to specify a tessellation option on a brush so that when I smooth an area out that it automatically tessellates the mesh so that the smoothing would be more precise.
     
  31. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    No. But that's planned and will be implemented in a future release of MTE, maybe v4.0. No ETA yet.
     
    magique likes this.
  32. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Last edited: Nov 21, 2018
  33. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Mesh Terrain Editor v3.3.2f1 is ready for download

    https://mega.nz/#F!PUpiUYgY!lnzKISFIsj4yNJkEzpHX7g

    upload_2018-12-10_0-39-28.png

    Change Log:
    • Updated the documentation(MTE_ReadMe.htm).
    • Fixed: When converting a mesh-terrain to unity-terrain, the tilling is incorrect.
    • Fixed: Images on welcome window are blurred.
    • Separated the Settings window from MTE Editor window.
     
  34. Ronaldoz

    Ronaldoz

    Joined:
    Sep 9, 2018
    Posts:
    5
    Hi, When will compatible w 2018.3 version be available?
     
  35. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Hi, I have tested MTE v3.3.2f1 on Unity 2018.3.0f2 and it seems to be compatible. Any problems when using it?
     
  36. Ronaldoz

    Ronaldoz

    Joined:
    Sep 9, 2018
    Posts:
    5
    TerrainToMesh Converter (3.3.2 free version) dont create mesh. Terrain will be created previous versions Unity. Possible to solve this problem?
     
    Last edited: Jan 7, 2019
    zwcloud likes this.
  37. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Thanks for your feedback. I'll look into that.
     
  38. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    @Ronaldoz

    It seems working well with Unity 2018.3.0f2:
    upload_2019-1-7_21-53-49.png

    Could you share more details when the converter was not working on your machine? Maybe a short video or several screenshot. Or join this gitter channel so we can talk about it.
     
  39. Ronaldoz

    Ronaldoz

    Joined:
    Sep 9, 2018
    Posts:
    5
    Sorry i can't record video.
    You use the pro version. It makes no sense for me to use it since I only use the converter. In the free version, the mesh is not created.
    Screenshots MeshError.png Settings.png
     
    zwcloud likes this.
  40. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Thanks! I'll try more to reproduce the issue.
     
  41. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
  42. Ronaldoz

    Ronaldoz

    Joined:
    Sep 9, 2018
    Posts:
    5
    Thx for new version, but the problem is not solved unfortunately (
     
  43. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    That's really unexpected... I will still try to reproduce the issue.

    You can try the
    MTE.MTEConversion.ConvertTerrainToMesh
    API instead of using MTE converter, if you know about programming. Please refer to the doc for how to use it.
     
  44. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Mesh Terrain Editor v3.3.3 is ready for download:

    You can also get this download link by clicking the check for updates button in the about window.
    https://mega.nz/#F!eZZx2IJT!kvoeO1ZRvODdwEZIesMCpw

    116222722.png

    Change Log:
    • Creator
      • Improved performance: reduced tiled mesh-terrain creating time.
    • Converter
      • Added experimental support to reuse existing mesh when converting a mesh.
    • General
      • Fixed: MTE created meshes shouldn't be optimized in the importer settings.
     
  45. Ronaldoz

    Ronaldoz

    Joined:
    Sep 9, 2018
    Posts:
    5
    Hi, My test project perhaps might help you solve the problem/ Unity 2018.3.1
     

    Attached Files:

    zwcloud likes this.
  46. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Thank you very much! I will try it tonight.
     
  47. DarkDeivel

    DarkDeivel

    Joined:
    Aug 31, 2016
    Posts:
    85
    Hello! Too many posts, so I decided to just ask. Is it suitable for creating a mobile terrain? Having watched the video on YouTube, I did not notice whether the number of triangles in the created terrain is shown somewhere in real time? For example, made several mountains and immediately see the number of triangles on the created terrain.
     
  48. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    347
    Hi,

    Mesh Terrain Editor is originally designed to be the successor of T4M. So it is suitable for creating a modile terrain and has been used in many mobile games/apps so far.

    The number of triangles of a created mesh-terrain is shown at the bottom section of MTE creator window.

    BTW, You can try MTE Free first:
    https://assetstore.unity.com/packages/tools/terrain/mesh-terrain-editor-free-67758
     
    DarkDeivel likes this.
  49. DarkDeivel

    DarkDeivel

    Joined:
    Aug 31, 2016
    Posts:
    85
    Thank you very much for the answer! I will now try the free version, where the main advantages of the paid version from the free version are written?
     
  50. DarkDeivel

    DarkDeivel

    Joined:
    Aug 31, 2016
    Posts:
    85
    I installed and launched the plugin, there was a void when creating the terrain, there are also errors in the console. Asset supports Unity3d 2018 3.0 ??

    P.S. For test i use clear new project.

    MTE_ERR.PNG
     
unityunity