Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[RELEASED] Mesh Combine Studio 2 (Boost Performance)

Discussion in 'Assets and Asset Store' started by eagle555, Oct 24, 2017.

  1. Disastorm

    Disastorm

    Joined:
    Jun 16, 2013
    Posts:
    102
    ok i made sure all my LOD Groups had the same CrossFade and animate settings and it successfully transferred over to the Cell's LOD Group, so it looks like its working, thanks.
     
  2. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Oki good to hear it works now :)
     
  3. Wulf-Games

    Wulf-Games

    Joined:
    Apr 5, 2016
    Posts:
    7

    Hi Nathaniel,

    I totally missed this, I'm sorry! That is impressive. Your are doing an amazing job with the game! Do you have other services? maybe consultancy? really curious about the decals system! and the other processes you are implementing for performance!

    I have a question right now with a problem we are having with the baked light maps and the mesh combine.


    Here's two images the first one with the normal objects and the second one with the objects combined:

    RuinasSinCombinar.png RuinasCombinado.png


    We are using the copy baked lightning, we tried using the rebake but it takes way too long and when it finished it somehow got deleted.


    Also, there's a problem when deactivating objects and activating them back:
    Here's also 2 images with combined meshes:

    Rocas_Combinadas.png
    Rocas_Combinadas_Activadas.png

    The problem you see above happens when we deactivate the JungleSkull zone and activate it back in.

    And here's the same zone without combined meshes:
    Rocas_SinCombinar.png

    As you can see this one looks different, the combined is darker.


    Any thoughts on why all this is happening?
    Thanks a lot
     
  4. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Hi,

    What we're implementing for performance I'm putting in MeshCombineStudio ;)

    Hmm that all doesn't work like it should, maybe you can come on Discord? I would be able to help you a lot faster with this with instant chatting:
    https://discord.gg/HhepjD9
     
  5. Wulf-Games

    Wulf-Games

    Joined:
    Apr 5, 2016
    Posts:
    7
    Great!

    Thanks Nathaniel, I'm on Discord as WulfGames#0734 let me know when can we have a chat this week.


    Best!
    Juan David
     
  6. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Hi Juan, I contacted you on Discord...
     
  7. anseyder

    anseyder

    Joined:
    Feb 5, 2018
    Posts:
    20
    Hi, I just installed Mesh Combine 2, and using the default settings clicked "combine" and received the following error: (MeshCombineStudio) => No matching GameObjects with chosen search options are found for combining. ALSO when I installed Mesh Combine it caused errors with Gaia: NullReferenceException: Object reference not set to an instance of an object (which didn't happen before).

    I am struggling with discord (I am not a fan) so please don't ask me to go to discord
     
  8. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Thanks for contacting. Can you show me a screenshot of the error with Gaia? Did you assign a GameObject parent? If you did, probably it's because `Only Static` is enabled as a search option and your objects are not marked as static.
     
  9. anseyder

    anseyder

    Joined:
    Feb 5, 2018
    Posts:
    20
    I have hundreds of static objects, and I created an empty game object called MCSObject0 as the game object parent. I didn't change any of the default conditions and just pressed "combine". Almost every object in the scene is static.
    upload_2020-9-14_22-6-11.png upload_2020-9-14_22-6-11.png
     
  10. anseyder

    anseyder

    Joined:
    Feb 5, 2018
    Posts:
    20
    Also, I got onto discord my name there is anseyder
     
  11. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Hi, thanks for reporting. I'm able to help you on Discord faster but if it's not possible (link is in the top of MCS Inspector). I need to see a screenshot of the search conditions, which don't show in your screenshots.
     
  12. bobAZ2019

    bobAZ2019

    Joined:
    Mar 28, 2019
    Posts:
    24
    hi,

    i'm in the same boat as ANSEYDER.
    using MCS2 for the first time, click on the COMBINE button and voila!
    error in the console:
    (MeshCombineStudio) => No matching GameObjects with chosen search options are found for combining.

    my setup is the exact samething as ANSEYDER.
    i created an EMPTY GAMEOBJECT (let's called it GameObject1) and added a bunch of static gameObjects.

    i read your user's manual top to bottom.
    try to change some settings according to the user's manual.
    same error.

    all my gameObjects started with "MY_xxxx".
    i'm attaching 3 screenshots.
    i'm using Unity 2019.4.10f1 and MCS 2.97
     

    Attached Files:

  13. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Hi, thanks for contacting and the detailed screenshots. You only need to change the `search Conditions` settings if you want to filter objects out. So if you want to combine all that is in your parent, just use the default MCS prefab with the default search conditions. I recommend to do that (delete this one and add the MCS prefab again), and if it still doesn't find any object then your objects aren't marked as static. Either mark them static or disable the 'Static Only` option.
     
  14. bobAZ2019

    bobAZ2019

    Joined:
    Mar 28, 2019
    Posts:
    24
    i tried your suggestions.
    1-delete the old prefab and add the new one
    2-tried the "static" option; it was disable as default
    3-everything else left untouched per your suggestion

    same result as before (see new screenshot).
     

    Attached Files:

  15. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    upload_2020-9-16_9-57-10.png

    Disable the static only setting (not on the MCS prefab as that does nothing). Maybe you can come to Discord? I will be able to help you faster there with instant chat:
    https://discord.gg/HhepjD9
     

    Attached Files:

  16. bobAZ2019

    bobAZ2019

    Joined:
    Mar 28, 2019
    Posts:
    24

    hi, i like the forum more than the chat as it can help others with the same issues.

    as to our problems, i tried your suggestion but got a new problem.
    right after i click on COMBINE, i got a flashing red button "MAKE MESHES READABLE"

    also, an error in the console below:
    (MeshCombineStudio) => Read/Write is disabled on the mesh on GameObject MY_BOX and can't be combined. Click the 'Make Meshes Readable' in the MCS Inspector to make it automatically readable in the mesh import settings.

    then, i click on the Make Meshes Readable.
    now, it produces a new console error below:

    InvalidCastException: Specified cast is not valid.
    MeshCombineStudio.MeshCombinerEditor.MakeMeshesReadableInImportSettings () (at Assets/MeshCombineStudio/Editor/MeshCombinerEditor.cs:1712)

     
  17. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Oki no prob, but the chat in Discord also stays there forever so people can scroll and search through that too.

    Which Unity version are you using? Also can you show me a screenshot of the mesh on `GameObject MY_BOX` in the project window? (So need to click on it in the project so I can see the import settings in the Inspector).
     
  18. bobAZ2019

    bobAZ2019

    Joined:
    Mar 28, 2019
    Posts:
    24
    Unity 2019.4.10f1
    MCS 2.98

    no luck.
    i did all the steps per your suggestions in the previous post.
    see all 5 screenshots.
    1 more screenshot shows the error console after this post since this forum only allows 5 max.
     

    Attached Files:

  19. bobAZ2019

    bobAZ2019

    Joined:
    Mar 28, 2019
    Posts:
    24
    error sceenshot (see attachment).
     

    Attached Files:

  20. Monil

    Monil

    Joined:
    Apr 24, 2012
    Posts:
    83
    Hi,

    have you enabled "Read/Write Enabled" in the model import settings?

    MeshImportRW.jpg
     
  21. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Yes I need to see the Inspector of the model. With that error it means that it's not a model import but an Unity mesh.asset which doesn't have any import settings. But need to see a screenshot to make sure, like this:

    upload_2020-9-18_10-23-6.png
     
  22. GameHourStudio

    GameHourStudio

    Joined:
    Apr 17, 2020
    Posts:
    37
    Hi, I am already used Mesh Baker in my project but I had an eye on your tool MCS and Caves and Overhangs tool since weeks and last day I got it in humble bundle package. Thanks for that. My only question is about combining meshes with multiple materials having same shader, with auto UV remapping. This is what I am getting with Mesh baker. What I expect with your tool is we specify cell size along with some filters, and it combines all the objects falling in a cell matching filters regardless of their materials and combine all objects in a single material. This will truely reduce my drawcalls. I don't know if I am expecting much but till now I find no big difference in mesh baker and your tool If I need to assign parent of the object each time just to combine meshes having same material. So introducing texture atlassing atleast, if not texture arrays, will give boost to your tool. Thanks.
     
  23. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Hi thanks for your message. What MCS does is splitting everything in cells and it can remove geometry which Mesh Baker can't do. Also you can separately combine all shadows into 1 material and for a static directional light remove all back faces (see example Scene). As for material atlassing/texture arrays yes indeed this will further boost my tool. I have this planned for MCS 3 pro and I will start to work on this very soon.
     
    GameHourStudio likes this.
  24. GameHourStudio

    GameHourStudio

    Joined:
    Apr 17, 2020
    Posts:
    37
    Thanks for your quick response. 2 Questions and a request.

    Question 1) Will we be able to upgrade to MCS 3 free of cost?

    Question 2) When should we expect MCS 3? I mean in few weeks, or in few months or what timeline your propose?

    Request) I find it tough to understand what each option does just by reading tutorial page. So it would be really better if you would make video tutorial covering all the inspector options and buttons while optimizing some demo project. By all the options I mean, each and every option available + all the different things we can do with MCS. It could be a series of videos as well.

    Thanks.
     
  25. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Thanks for the questions:

    1) MCS 3 will be free, but MCS 3 pro that will contain texture atlas/arrays will have some upgrade cost. As it will make MCS the most feature rich mesh combiner on the Asset Store.
    2) A matter of a few months.

    Yes I'm planning to do that, but since I'm planning for MCS 3/Pro I would have to redo so I like to do it when I release those. Can you explain in more detail which options you find hard to understand? I can update the manual for those...
     
    docsavage and GameHourStudio like this.
  26. GameHourStudio

    GameHourStudio

    Joined:
    Apr 17, 2020
    Posts:
    37
    Sounds logical for upgrade cost and I will be waiting for MCS3 pro launch. And regarding my questions about manual, I will go through again manual and will report you my confusion. Thanks for your time so far.
     
  27. RaventurnPatrick

    RaventurnPatrick

    Joined:
    Aug 9, 2011
    Posts:
    53
    Hey first of all: You wrote an eye opening plugin. In my initial tests this is way better than Unitys Static batching in terms of draw calls (3-4x less) :) Now some questions/findings:

    What is the best way to batch game objects that are added at runtime (i.e. by the players)?

    At the moment I think I would put all dynamically instantiated objects in a common parent game object. Every time a threshhold of "new" objects is reached, I would manually call MeshCombiner.CombineAll() - with the common parent as "search game object".
    Is this the correct (supported) way to do this?

    Also I found a few smaller bugs (maybe you could fix them):
    • When calling CombineAll() using jobs, the game objects get disabled before the combined mesh is enabled - thus a flicker occurs (increases if combine per frame setting is reduced). When only using the main thread it works
    • When combining meshes i.e. at edit time and grid cell ends up with a single object, the isReadable flag does not get removed. Thus the mesh is actually loaded in the RAM which is not ideal
    A small missing feature:
    • There is no option to Upload (thus deallocate) the original meshes that are batched at runtime
     
  28. RaventurnPatrick

    RaventurnPatrick

    Joined:
    Aug 9, 2011
    Posts:
    53
    Another bug I just found:
    • When combining meshes with lod groups, single meshes get placed inside the lods but don't get added to the lodgroup component, so both versions of the single meshes are rendererd. Workaround: Exclude Single Meshes (not ideal because they have different lod switching distances in that case)
     
  29. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Sorry I missed this post notification in my email. Yes that would be the correct way. As for your bug reports:
    1). I will fix this now.
    2). That's because it uses the original mesh, so not a bug.
    3). I will also fix this now.
     
    RaventurnPatrick and hopeful like this.
  30. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    13,213
    Just updated to the latest version and I'm getting this error (and no combined meshes) when attempting a combine:
    Code (csharp):
    1.  
    2. (MeshCombineStudio) => System.IndexOutOfRangeException: Index was outside the bounds of the array.
    3.   at MeshCombineStudio.FastList`1[T].Add (T item) [0x00014] in C:\Workspace\ProjectName_20.1\ProjectName\Assets\MeshCombineStudio\Scripts\Misc\FastList.cs:148
    4.   at MeshCombineStudio.MeshCombineJobManager+NewMeshObject.CreateMesh () [0x0042d] in C:\Workspace\ProjectName_20.1\ProjectName\Assets\MeshCombineStudio\Scripts\Mesh\MeshCombineJobManager.cs:1226
    5.   at MeshCombineStudio.MeshCombineJobManager.CombineMeshesDone (MeshCombineStudio.MeshCombineJobManager+MeshCombineJobsThread meshCombineJobThread) [0x00050] in C:\Workspace\ProjectName_20.1\ProjectName\Assets\MeshCombineStudio\Scripts\Mesh\MeshCombineJobManager.cs:470
    6. UnityEngine.Debug:LogError(Object)
    7. MeshCombineStudio.MeshCombineJobManager:CombineMeshesDone(MeshCombineJobsThread) (at Assets/MeshCombineStudio/Scripts/Mesh/MeshCombineJobManager.cs:480)
    8. MeshCombineStudio.MeshCombineJobManager:ExecuteJobs() (at Assets/MeshCombineStudio/Scripts/Mesh/MeshCombineJobManager.cs:435)
    9. MeshCombineStudio.MeshCombiner:CombineAll() (at Assets/MeshCombineStudio/Scripts/Mesh/MeshCombiner.cs:593)
    10. MeshCombineStudio.MeshCombinerEditor:DrawCombining() (at Assets/MeshCombineStudio/Editor/MeshCombinerEditor.cs:1178)
    11. MeshCombineStudio.MeshCombinerEditor:DrawInspectorGUI() (at Assets/MeshCombineStudio/Editor/MeshCombinerEditor.cs:682)
    12. MeshCombineStudio.MeshCombinerEditor:OnInspectorGUI() (at Assets/MeshCombineStudio/Editor/MeshCombinerEditor.cs:645)
    13. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
     
  31. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    13,213
    Update: Restarting the editor cleared this up.
     
    eagle555 likes this.
  32. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Great to hear that fixed it :)
     
  33. corjn

    corjn

    Joined:
    Feb 6, 2014
    Posts:
    149
    Hey @eagle555

    When I combine my rocks that all have all the exact same material "main_material", it creates multiples objects in the same cell :

    Casfsdfpture.PNG

    Is this normal ? MCS2 aleardy has a huge positive performance impact on my game, but I think it could be even better if 1 cell = one mesh

    I'm using Unity 2019.4.12 with the last version of both MCS2 and Cave Overhangs.

    And my settings :

    Capturhgfhje.PNG Captdrgfbure.PNG

    Thanks for you time :)
     
  34. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Thanks for reporting. It's probably because those combined meshes exceed >64k. Maybe you can join my Discord server:
    https://discord.gg/HhepjD9
    I'm able to help you faster there with instant support when I'm online.
     
  35. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,160
    Hi. I've just upgraded from a previous release, and noticed that the checkbox option on Output for not combining by Cell is gone. I was getting better drawcall reduction with not combining by cell previously. Or am I missing something?
     
  36. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Thanks for reporting. If you want to combine everything into 1 cell, just make the cell size very big.
     
    julianr likes this.
  37. Berir

    Berir

    Joined:
    Mar 23, 2013
    Posts:
    47
    Hey I am creating a map out of terrain tiles each size 24 units in order to achieve board-game stylized look... I use tile generator for spawning terrain tiles ... I am curious if I can use mesh combine to combine my final map - terrain tiles into one big terrain tile,rather then having 30 of them .... is this possible? or does this only works with meshes? I do have another project using Hexagon mesh tiles , so would I be able to merge Hexagon mesh tiles into one mesh?Even if they use different textures, but have same vertices ...I am grateful for any advice, thanks
     
  38. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Hi, thanks for contacting. That's a good question. Mesh Combine Studio only works on meshes and not on the Unity terrain system. As the Unity terrain system has it's own optimization for the meshes it uses, they are constantly updated with different LODs based on camera distance.
     
  39. 1260073465

    1260073465

    Joined:
    Apr 8, 2018
    Posts:
    12
    Hello there
    The plug-in works well in the editor, but the improvement is not obvious on the phone. I found that after baking, a lot of Triangles were rendered compared to before baking, and the rendering components of the original model before baking were disabled. Can you give some suggestions?
     
    Last edited: Nov 17, 2020
  40. tahir_ali

    tahir_ali

    Joined:
    Jan 6, 2018
    Posts:
    95
    Hey,
    I am using MCS2 on synty studio Polygon Westen Pack Demo scene to see results. I am following the tutorial shared at asset store MCS2. Here are issues!

    1. Overlapping vertices option is not there anymore.
    2. Due to above Option is missing. Combining meshes increase its tris count from 2.7M to 5+M.

    Kindly Help me!
     
  41. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Thanks for contacting. Yes triangle count shouldn't increase too much. I explain it here:
    http://www.terraincomposer.com/mcs-documentation/#combining-caveats

    Feel free to join my Discord server where I try to give instant support when I'm online:
    https://discord.gg/HhepjD9
     
  42. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Hi, thanks for reporting. I've also tested MCS2 with that Asset and got good results:

    1). That option is available with the extension MCS Caves & Overhangs, but you don't need it for this Asset.
    2). About tris count increase I explain it here: http://www.terraincomposer.com/mcs-documentation/#combining-caveats
    The demo Scene has 3 point lights with realtime shadows that increase the tris count. All light shadows (including directional light) can be baked if you don't plan to move the Sun. The double tris count is fine and on my side the performance gets a lot faster.

    upload_2020-11-18_10-42-40.png

    upload_2020-11-18_10-43-10.png

    Feel free to join my Discord server where I try to give instant support when I'm online:
    https://discord.gg/HhepjD9
     
    Last edited: Nov 18, 2020
    tahir_ali likes this.
  43. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,160
    Hi. This could be a bug. I've upgraded to the latest version from 2.74.0 version, but when I try enable my original renderers and lod groups from the combine options, it doesn't do it. So I've reverted back to the version that worked. Any ideas? I removed the previous version completely before updating it.
     
    Last edited: Nov 19, 2020
  44. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Hi, thanks for reporting. The package manager has some issues with downloading the latest Asset versions. What you can do to make sure is download it from the Asset Store and then import it manually in U2020.

    Try deleting the combined meshes first with your current version so it switches back to original. Then import the update and combine again. Let me know if that works...
     
    julianr likes this.
  45. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,160
    Got it working. I had to remove the Mesh Combiner script from the Combined GameObject, and re-add it as it was still referencing the old values and didn't update to the New one.
     
    eagle555 likes this.
  46. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Oki great to hear you got it working now :)
     
    julianr likes this.
  47. Berir

    Berir

    Joined:
    Mar 23, 2013
    Posts:
    47
    Thank you for the reply, what about Microsplat Mesh Terrain ? would mesh combine be able to work with that, and get good results? thanks
     
  48. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,689
    Mesh terrains would be tiles of bigger meshes which shouldn't be combined as it would break the camera frustum culling.
     
  49. Berir

    Berir

    Joined:
    Mar 23, 2013
    Posts:
    47
    Thank you for a quick reply, It is a tile based map, each 40 x 40 units... and if zoomed out you can see connections, ... It is a good advice regarding frustum I guess I should hide connections with other objects such as trees and stones..thanks
     
    eagle555 likes this.
unityunity