Search Unity

  1. Unity 2019.2 is now released.
    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. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    Glad to know it works!

    I think the moving folder operation is no longer correct, so it should be a documentation bug. I will fix that.

    Thanks for your feedback and suggestion.
     
  2. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,595
    Ok, did run into an actual problem now, haha.

    I tried setting up a basic unity terrain to convert from, using 4 textures with albedo and normal textures. I then used MTE to convert this to a mesh, and it results in a purple texture on the mesh, and creates this error:



    Any ideas what I could be doing wrong?
     
  3. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    I just found a similar issue (conversion failed if terrain only uses splat textures but no normal textures) and fixed it.:)

    Are you sure there are normal textures?o_O It should work for terrains with normal maps.
     
    Last edited: Aug 27, 2017
  4. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,595
    Yep, here is how I had them assigned:

     
  5. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    A possible working solution is setting the shader manually: MTE/Legacy/4 Textures/Bumped. I hope the SplatAlpha 0 map are extracted correctly.
     
  6. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,595
    Ok, I will try that out. What should I set the "Control (RGBA)" texture to?
     
  7. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    SplatAlpha 0.png next to the mesh file. But if you can't find that, this is definitely a serious bug.
     
    Last edited: Aug 27, 2017
    MD_Reptile likes this.
  8. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,595
    Ok, manually assigning the shader works for me - but it didn't seem to maintain the texture painting I did on the unity terrain before the conversion, and required me to do texture painting after the conversion, but that may have been my own fault from testing other textures as the control, I'm not sure.

    Thanks for the help getting this going and what seems like a pretty cool asset so far, I'll let you know if I break anything else. :)
     
  9. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    Oh, that's because the SplatAlpha 0 wasn't correctly extracted. It's not your fault. That's really a terrible bug... :( I will try to reproduce and fix it. I'll appreciate your feedback!
     
    Last edited: Aug 27, 2017
    MD_Reptile likes this.
  10. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    MTE v3.0b1 submited to asset store and waiting for their approval. It's a bug-fix release.
    Change Log:
    You can download them directly:
    @MD_Reptile It should fix the terrain conversion issue. I have tested it on Unity5.6.3p1 and it works. Please download and have a try.

    UPDATE
    MTE v3.0b1 has been published.
     
    Last edited: Aug 30, 2017
    MD_Reptile likes this.
  11. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,595
    I'm very happy to report that the new version works flawlessly so far! I am able to just select a terrain for conversion, and it simply works:


    (NOTE: in this GIF the mesh terrain is moved 1 unit higher than the unity terrain, for visual comparison)

    I'm also happy to say that on mobile, these mesh terrains run about 50-75% better FPS than the built in unity terrain does :D

    Thanks so much @zwcloud
     
    zwcloud likes this.
  12. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    Hi, @Rodmanix
    Thank you very much for the feedback in asset store review. I have looked into the cause of the *dark areas* when two textures meet. And the issue is probably caused by the difference between linear gamma sRGB color space and regular sRGB color space.

    Checking Bypass sRGB sampling in the inspector of SplatAlpha 0/1.png should solve the issue.

    When color space is linear color space,
    Before checking bypass sRGB sampling,
    upload_2017-9-6_22-24-14.png

    after: (dark area is gone)
    upload_2017-9-6_22-24-37.png


    In the next release, MTE will set this automatically for SplatAlpha textures.
     
    Last edited: Sep 6, 2017
  13. Rodmanix

    Rodmanix

    Joined:
    Dec 4, 2012
    Posts:
    13
    Your fix worked perfectly. Thanks so much for the quick response! It is very much appreciated.
     
  14. Rodmanix

    Rodmanix

    Joined:
    Dec 4, 2012
    Posts:
    13
    I have a terrain that I created using 4 textures and now I want to add a 5th texture. When I switch to using a 5 texture shader, the 5th texture does not get painted onto the terrain. Am I doing something wrong? Thanks!
     
  15. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    Please try refreshing the filter or restarting Unity. Just in case, have you activated MTE Pro?
     
    Last edited: Sep 7, 2017
  16. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    MTE v3.0 published on Unity asset store.

    >> Direct Download <<

    Change Log:
    • Editor
      • Texture Painter:
        • Improved performance and effect of texture painter.
      • Grass Painter:
        • Improved grass creating procedure.
        • Implemented one-quad grass (commonly used for billboard grass).
      • Flow Painter:
        • Improved performance.
        • Implemented 4 paint mode: Directional, Movement, Pinching/Inflating, Vortex
    • Tools
      • Add a Control Texture Creator.
    • General
      • Fixed issue: when using linear color space, the places on the terrain where the different textures meet, it produces very dark areas.
      • Fixed issue: rendered result shows dark dots when brushed weight is very small. (terrain shader issue)
      • Fixed issue: Metallic calculation is incorrect for 5-texture standard terrain shaders.
    new flow painter:
    tool-button_flow_painter.png

    billboard grass:
    grass_preview.jpg
     
    Last edited: Sep 26, 2017
    AbhishekRaj likes this.
  17. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    Dear MTE users,

    I'm sorry for the inconvenience but for some personal reason, the development of MTE has been paused and will be resumed on 26th of December.
     
  18. veddycent

    veddycent

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

    Am i missing something or is there a reason why you cannot convert a terrain to mesh that only has a basemap?

    It says 'The terrain object has a different number of splat textures other than 2/3/4/5'

    Thanks
     
  19. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    Hi,

    If you are using MTE Pro, just add an extra splat texture to the terrain, then it should work. But for MTE Free, the terrain being converted should have 4 textures.
     
  20. datui

    datui

    Joined:
    Jul 24, 2013
    Posts:
    1
    Hi,
    If I pay for the pro version , can i get the source code?
     
  21. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    No. The source code will not be provided for now.
     
  22. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,030
    This looks like a great tool, but can you answer a couple questions before I buy it?

    1) I'm using MicroSplat,I have 12 splats on my terrain and will use MicroSplat to export a colormap, so I don't need MTE handle splats at all. Is there an option for that -- or at least to override the splat limitation? (I tried the free version and it wouldn't let me do anything with the terrain since it had more than the allowed number of splats.)

    2) Can you show how the multi-terrain tile functionality works? I don't see any screenshots of that, though possibly I missed them. I have 64 tiles so I really need that to work nicely :)

    thanks
    Dave
     
  23. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    MTE Converter converter doesn't support a terrain with more than 5 splat-textures. That's because MTE Editor (Paint Texture) does't support shaders like those used by MicroSplat. (See MTE_ReadMe.htm: FAQ #4 Can I change the shader? ) I have ever tried to make MTE compatible with MegaSplat but it is quite hard to implement. And IMO, it is not that nessary for a mesh-based terrain to use more than 5 splats on a single mesh since MTE is mainly designed for mobile platforms.

    I have asked the author of MicroSplat whether MicroSplat shader works for mesh and how but he said that MicroSplat doesn't support mesh. See this.
    If you don't need MTE to handle splat, you can follow the steps below. (Make sure to back up your terrains!)

    First convert the height data of the terrain to a MTE mesh-terrain:
    1. Make a copy of the terrain asset you want to convert to a MTE-editable mesh-terrain. Terrain.asset must be copied.
    2. Drag the copied terrain asset to the scene. Remove the splats in the terrain inspector until there are only 4 splats.
    3. Convert the copied terrain with MTE Converter.
    Now you get a mesh-terrain with 4 dummy splats. Then replace the material in MeshRenderer with the MicroSplat material:
    (It seems I cannot get the location of the material file via double clicking Custom Material. I searched for it by name.) Assign the original MicroSplat material to the Custom Material field.
    replace.jpg

    But this still cannot make MicroSplat shaders work on a mesh.

    Check Create Mutiple Copies when you create mesh-terrains with MTE Creator:
    CreateMutipleCopies.jpg

    But to be honest, 64 tiles (8x8) are too many for current MTE implementation. I haven't tested MTE with so many tiled meshes-the editing performance is possibly very slow. Also, MTE is unable to convert tiled terrains to mesh. But there is a plan to implement that later next year. (I don't have much time developping this year.)
     
    Last edited: Nov 18, 2017
  24. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,681
    MicroSplat will only sample a fixed number of textures for each pixel (which is adjustable), which actually makes it quite suitable for mobile platforms which support OpenGLES3.0 or above (required for texture arrays), and was primarily optimized using iOS GPU profiling tools. If you have 4 textures of 16, the per-pixel sample count is the same.

    The answer is a bit more complex, actually. If a mesh conforms to the same specs as a Unity Terrain, then there is nothing preventing the shader from working on a mesh, since Unity Terrains are a mesh under the hood. But once you put it onto an arbitrary mesh (a character, etc), then you actually need to compile the shader slightly different, as the tangents will be incorrect if you don't. So if your mesh happens to work just the the terrain does (which in this case is basically a yes), it all can potentially work.

    That said, the MicroSplatTerrain component would have to be slightly re-written to work on a mesh and make the whole system usable. It is basically responsible for holding references to textures and syncing the data to the shader, as well as instancing a material for each terrain so that a single material can act as a template material for multiple terrains. I actually already have a version of this, so an integration would be pretty trivial if you are interested in doing one.
     
    zwcloud likes this.
  25. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    Thank you for the kind explanation!

    I will try again to integrate MTE with MegaSplat in a proper way next year when I have enough time.:)
     
  26. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,030
    Thanks for the replies. To clarify:

    * MicroSplat is a bit of a distraction from my question, I mentioned it only as why I have so many splats on my terrain. I don't think you need to do any kind of Micro (or Mega) Splat integration. I was planning to use the standard shader with the maps that MicroSplat renders out, that's all. My question was really if there was a way in MTE to convert terrains with more splats, by disabling the splat function/restrictions completely, if I don't care about the splats getting converted. Sounds like the answer is "no", which is a bummer.

    * I'm still unclear on the multi-terrain support. What happens if I click that checkbox? I assumed that "Support creating tiled mesh-terrains" meant some kind of batch conversion, but still unclear on that. (I am not necessarily planning to edit these meshes, and can work around performance constraints if I do -- I just don't want to have to convert each terrain tile one by one...)
     
  27. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    First I want to clarify a point that a rendered mesh is consist of two parts: the height of vertices and the appearance. So the conversion procedure is also separated into two steps:

    1. convert a terrain to get the height of vertices (the geometry of the mesh)
    2. convert a terrain to get the splats and other related data of the terrain and apply to the mesh generated in step 1. (This step is Unity-terrain-only and doesn't support Mega/MicroSplat, because splats work quite differently in Mega/MicroSplat. And this is the place to do the integration.)

    The splats conversion procedure isn't independent from the overall conversion in current implementaion of MTE Converter. That's really a point where should be improved in future MTE releases. Added to TODO list!;)
    For now, just follow the steps in [Spoiler: Possible steps if MicroSplat supports mesh.] . You CAN get a mesh with the same heights (geometry) as the original unity terrain object.

    No. MTE doesn't support batch conversion. This is already in the TODO list. I'm sorry for the inconvenience.:(

    Kind Reminder: There is no need to buy MTE Pro if you only want to convert your terrains to meshes without preserving the splats(the appearance). If you want batch conversion, you can have a look at Terrain To Mesh, maybe it supports batch conversion.
     
    Last edited: Dec 2, 2017
  28. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    MTE v3.1.0 is available!

    >> Download from Mega <<
    (New version should be live on asset store in one week.)

    An editor API is introduced in v3.1.0, and there will be more in the future.

    MTE.MTEConversion.ConvertTerrainToMesh
    Code (CSharp):
    1. void ConvertTerrainToMesh(GameObject terrainGameObject, TerrainConversionSettings settings);
    2.  
    3. public static void ConvertTerrainToMesh(GameObject terrainGameObject, string name, string outputDir, bool exportTrees, int vertexCountAlongAnEdge)
    4. {
    5.     string terrainName = name ?? terrainGameObject.name;
    6.     if (String.IsNullOrEmpty(terrainName))
    7.     {
    8.         terrainName = "terrain" + terrainGameObject.GetInstanceID();
    9.     }
    10.     TerrainConversionSettings settings = new TerrainConversionSettings
    11.     {
    12.         Name = terrainName,
    13.         FileFormat = MeshFileFormat.obj,
    14.         OutPutDir = outputDir,
    15.         ExportTrees = exportTrees,
    16.         VertexCountAlongAnEdge = vertexCountAlongAnEdge
    17.     };
    18.  
    19.     ConvertTerrainToMesh(terrainGameObject, settings);
    20. }
    21.  
    22. ConvertTerrainToMesh(terrainObjA, "TerrainA", Application.dataPath + "\\Output\\", false, 75);
    23. ConvertTerrainToMesh(terrainObjB, "TerrainB", Application.dataPath + "\\Output\\", false, 50);
    24. ConvertTerrainToMesh(terrainObjC, "TerrainC", Application.dataPath + "\\Output\\", false, 60);
    See API section in MTE_ReadMe.htm for details.

    ChangeLog:
    • API (new)
      • Added an API to convert a Unity terrain to a mesh-terrain: MTE.MTEConversion.ConvertTerrainToMesh(...).
    • General
      • Improved compatibility with Unity 2017.2.
      • Fixed issue: invoice number activating ambiguity.
     
    Last edited: Dec 17, 2017
  29. skullwolf

    skullwolf

    Joined:
    May 14, 2013
    Posts:
    4
    Hey, are you still planning to add realtime modification of terrain height and texture through code? I would want my explosion to be able to carve a hole in the terrain and paint the hole with a selected texture.
     
  30. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    Yes. That should be basically available in the next version of MTE. Thanks for the description of your use case!:) I will take it into consideration when implementing runtime features. And all MTE runtime features will be provided with source code as always.
     
  31. skullwolf

    skullwolf

    Joined:
    May 14, 2013
    Posts:
    4
    Is that a ETA for the next version? :)
     
  32. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    MTE 3.2 will be released before January 10.

    I'm sorry, but I have to break my promise. I just got a new job one week ago and am quite busy with it. I have implemented some part of runtime mesh generation and modification and I'll try to finish it in this weekend.
     
    Last edited: Jan 9, 2018
  33. skullwolf

    skullwolf

    Joined:
    May 14, 2013
    Posts:
    4
    No worries. Congrats on your new job. :)

    By the way, is the runtime modification through script usable in the editor too? I was thinking of placing trenches on the map and the collision of the trench will auto modify the terrain to fit the trench (when i said auto i meant using a custom script).
     
    zwcloud likes this.
  34. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    Thank you!

    I have the same idea as you and I'll try to implement it. I have once implemented a similar feature in grass painter (no t available in current MTE but in a early prototype): changing the height of terrain and then the position(Y) of grass on it will be updated automatically. The logic is similar and is not hard to implement as to fitting trench. Thanks for sharing the idea.
     
  35. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    Hey,

    Does the mesh terrain generation and modification work in real-time/game?

    Thanks in advance.
     
  36. ofusion

    ofusion

    Joined:
    Dec 5, 2013
    Posts:
    27
    I tried free version and find that Mesh Terrain Creator create flat mesh terrain. even I create from a heightmap.
    And there is Unity exception when i began to paint texture, and failed to paint:

    MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.

    PS: this happens when I using Mesh Terrain Creator with "Create Multiple Copies" ticked

    PS: why vertex count is limited to 180 and mesh size is limited to 1000 in Meh Terrain Creator?
     
    Last edited: Apr 21, 2018
    zwcloud likes this.
  37. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    MTE activation server was down. I will restart it at 14:00 UTC. Please wait if you want to activate/deactivate MTE Pro.

    Update:
    The server is up. You can activate/deactivate MTE Pro now.
     
    Last edited: May 3, 2018
  38. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    MTE v3.1.1 published. (The package submitted to Asset Store is still pending review.)

    Direct download:

    https://mega.nz/#F!2AZBDICZ!tsjNCbmh0HC_XIX_2D_sEA

    Change log:
    • Creator
      • Support creating mutiple meshes from one single height map.
      • Change maximum vertex number to 255x255 = 65025.
      • fix: MissingReferenceException when creating a mesh with many vertices.
    • Editor
      • Grass Painter:
        • Improved grassing painting procedure.
        • The height of grasses will be adjusted when modifying the mesh-terrain's height by height tools.
        • fix: paint grass quads cannot be removed by brush.
    • General
      • Improved compatibility with Unity 2017.3.
      • Removed support for Unity 5.4 and 5.5
    from_heightmap.jpg

    grass_height-min.gif
     
    Last edited: May 20, 2018
  39. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    I'm fixing compatibility issues on Unity 2018.1.0f2 and performance issues for big meshes with many vertices. Watch MTE issue tracker if you are interested.
     
  40. Cloud1990

    Cloud1990

    Joined:
    May 3, 2018
    Posts:
    1
    great tool!
     
    zwcloud likes this.
  41. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    Found a proper solution to the performance impact when editing a mesh containing too many vertices (more than 180*180). I'm applying it to all editors.
     
    Last edited: May 13, 2018
  42. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    MTE v3.1.2 published (The package submitted to Asset Store is still pending review.)

    Direct download:
    https://mega.nz/#F!LEhAFCSC!GFnjz6gtt0cvahYE_taALA

    Change Log:
    • Creator
      • Enlarge maximum mesh size to 10000.
      • Change maximum vertex number back to 180x180 because of the triangle count limitation.
    • Converter
      • Fix: Converted mesh is not placed at the same position of the source mesh.
    • Editor
      • Improve editing performance for a mesh with many vertices.
      • Improve performance of Undo/Redo.
      • Fix: the height of grasses isn't updated when editing height by moving mouse quickly with height tools.
      • Fix: the height of grasses isn't updated when moving vertices with Mesh Toolbox.
    • General
      • Improved compatibility with Unity 2018.1.
      • Fix: Don't prompt "Please select a path inside the "Assets" directory" if the user cancelled selecting a folder.
    See also: MTE v3.1.2 milestone: https://github.com/zwcloud/MeshTerrainEditor-issues/milestone/2?closed=1
     
    Last edited: May 22, 2018
  43. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    282
    Does the paid version of this plugin contain the source code in it instead of dlls?
     
  44. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    For editor-only code, no. But all runtime MTE codes (MTE_script.dll) has already been included in MTE\Editor Default Resources\MTE\MTE.zip.
     
  45. pasza89

    pasza89

    Joined:
    Mar 27, 2014
    Posts:
    12
    Hi,

    Note sure if it's the correct place to post it - can't click on "E-mail the author" button in About section, and your website seems to be down.

    I've run into some issues regarding MTE:

    1) Whenever loading the project, vertex colours aren't applied - I need to select each terrain, use vertex paint tool and click wherever on the terrain to make correct textures viisble.

    2) This one's bigger:

    NullReferenceException: Object reference not set to an instance of an object
    ‪‍‮‮‌‬‬‬‌‫‪‌‫‏‭‌‫‌‏‏‎‫‮.‭‎‌‌‍‫‬‪‎‎‮‬‭‮‏‬‎‍‏‪‍‏‌‭‪‭‮ (UnityEngine.Material )
    ‪‍‮‮‌‬‬‬‌‫‪‌‫‏‭‌‫‌‏‏‎‫‮.‮‬‪‏‪‫‬‭‪‏‎‎‌‪‬‏‌‬‏‭‎‌‮ ()
    ‪‍‮‮‌‬‬‬‌‫‪‌‫‏‭‌‫‌‏‏‎‫‮.‏‬‪‫‭‮‏‍‍‬‎‍‪‍‬‮‮‌‮ (System.String , Int32 )
    ‬‮‏‮‭‎‬‬‫‭‪‍‫‪‪‫‮‬‭‫‌‎‮.‫‌‍‬‍‫‎‌‏‌‌‬‭‍‎‮‬‫‮‮ (System.Object , System.EventArgs )
    ‪‍‮‮‌‬‬‬‌‫‪‌‫‏‭‌‫‌‏‏‎‫‮.‪‮‪‭‌‏‪‫‎‎‫‎‎‪‭‎‫‍‏‎‌‌‫‎‪‌‮‎‫‮ (System.EventArgs )
    ‬‮‏‮‭‎‬‬‫‭‪‍‫‪‪‫‮‬‭‫‌‎‮.OnEnable ()
    UnityEditor.EditorWindow:GetWindow(Type)
    ‬‮‏‮‭‎‬‬‫‭‪‍‫‪‪‫‮‬‭‫‌‎‮:‭‭‎‬‪‌‌‭‭‬‫‬‮‮‍‬‫‪‮‫‭‌‮(Type)
    ‬‮‏‮‭‎‬‬‫‭‪‍‫‪‪‫‮‬‭‫‌‎‮:‌‌‌‪‭‬‫‍‌‏‪‌‏‏‎‫‍‎‏‮‌‎‮()


    The issue appeared just an hour ago and can't figure it out. I can't select the terrains which I created and edited before - regardless if I select the terrain on the Scene view, or in the Hierarchy, open MTE-> Editor, the thing I can edit are some random models on the map (like fountain or a bridge, which aren't relevant to MTE). Even if I disable them, I can't edit the terrain - https://i.imgur.com/zBHiIqd.png (I've got terrain selected and I can only edit the little object at the bottom, which I don't want to)
     
  46. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    I'm sorry for the late reply.

    It is actually an email link like mailto:zwcloud@hotmail.com . It seems that your system doesn't support it.

    Yes, it is down for two days. I don't know the exact reason but I have restarted it.

    This did happen on some old versions of MTE but it has been fixed. What's your Unity version and MTE version?

    This will happen if
    1. some mesh, that is the editing target of MTE editor, were deleted
    2. the scene was changed, i.e. opening a new xxx.unity file
    This will be fixed in the next version of MTE. Please try using the filter and click the refresh button. If it still doesn't work, reimport MTE.dll or restart Unity.

    If it is not the case, please reply to tell me how to reproduce the problem, thank you!

    Please use the filter at the top of MTE editor to properly *select* mesh-terrains that will be modified by MTE editor. MTE don't know what kind of mesh should be regarded as a mesh-terrain, which should be modified, because mesh-terrains are just regular mesh.
     
    Last edited: Jun 5, 2018
  47. pasza89

    pasza89

    Joined:
    Mar 27, 2014
    Posts:
    12
    Hey, thanks for quick reply actually! :)

    I am using Unity 2017.3.1f1 - if that would help I'll try a newer version when I'll have a bit of time.

    I didn't delete any of components of meshes. Even if I create a new MTE terrain, sculpt and paint it a bit, save it, reopen Unity, I can't edit it anymore - I need to create a new terrain, and reapply previous ones values (mesh, collider, vertex paint)

    Here's a gif showing selecting the terrain, which worked perfectly ok right before closing Unity - you can see that MTE tries to sculpt 2 little objects:

    https://i.imgur.com/uOZP9sT.gifv

    When I click the "filter refresh" icon on top of MTE, I get another error:

    https://i.imgur.com/QGufjLk.gifv

    Here's the content of error message:

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. ‪‍‮‮‌‬‬‬‌‫‪‌‫‏‭‌‫‌‏‏‎‫‮.‭‎‌‌‍‫‬‪‎‎‮‬‭‮‏‬‎‍‏‪‍‏‌‭‪‭‮ (UnityEngine.Material )
    3. ‪‍‮‮‌‬‬‬‌‫‪‌‫‏‭‌‫‌‏‏‎‫‮.‮‬‪‏‪‫‬‭‪‏‎‎‌‪‬‏‌‬‏‭‎‌‮ ()
    4. ‪‍‮‮‌‬‬‬‌‫‪‌‫‏‭‌‫‌‏‏‎‫‮.‏‬‪‫‭‮‏‍‍‬‎‍‪‍‬‮‮‌‮ (System.String , Int32 )
    5. ‬‮‏‮‭‎‬‬‫‭‪‍‫‪‪‫‮‬‭‫‌‎‮.OnGUI ()
    6. 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)
    7. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    8. 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:232)
    9. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    10. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295)
    11. UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288)
    12. UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:255)
    13.  
    Fortunately there is the workaround which I need to apply just once every time I start Unity, but still it would be cool if it worked, because your asset is seriously top quality :D

    EDIT: I just checked, the same issue happens in Unity 2018.1.1f1
     
    Last edited: Jun 5, 2018
    zwcloud likes this.
  48. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    Thanks for your reply. I will try to reproduce the issues and fix them. I totally understand that they are really annoying!:(

    UPDATE:
    In case you didn't know, MTE free can only edit the first two meshes in the scene. So if the filter tag/layer is not specified, it is quite possible that two random small meshes will be regarded as editing targets, just like what happened in the first picture.

    I'm looking into the
    NullReferenceException
    error when the filter refresh button is clicked.

    MTE issue tracker item
     
    Last edited: Jun 6, 2018
    pasza89 likes this.
  49. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    313
    @pasza89 I have solved the
    NullReferenceException
    issue, below is the new MTE.dll file, just replace the old MTE.dll with this one in
    MTE/Plugins/MTE/Editor/MTE.dll
    . Please try if it works for you.:)

    I have reproduced the vertices color issue (that doesn't happen on Unity 5.6.5 so I might overlook it.) It will be fixed tomorrow if possible.
     

    Attached Files:

    Last edited: Jun 6, 2018
    pasza89 likes this.
  50. pasza89

    pasza89

    Joined:
    Mar 27, 2014
    Posts:
    12
    Hey, thanks! I didn't expect such quick action - I've tested the fix, NullReferenceException disappeared, and it works!
    Although I need to say that the same issue happens unless certain conditions are met

    I've got just 2 terrains in the level, and when I need to edit Terrain 1, I need to do these actions in order:
    - disable most other objects and Terrain 2 (preferably all), leaving only Terrain 1 active
    - select Terrain 2 in hierarchy
    - enter Window -> MTE -> Editor
    - verify that I can edit Terrain 1
    - reenable everything else while still having MTE window open
    - edit terrain to my liking

    Not disabling other objects results in the same issue as before - MTE allows me to edit those 2 small objects.
    Not disabling the other terrain, sometimes makes MTE edit that terrain instead of the one selected in hierarchy.

    Still, it works now and I probably won't need to repaint the terrains every day anymore :D
    Vertex colors not automatically loading is a very minor issue, so no big deal as long as they are stored in the background.
    Not sure how to thank you, except a huge THANKS, I posted a review for MTE, and I am pretty sure I'll buy pro version of MTE very soon :)
     
    zwcloud likes this.