Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Mesh Combine Studio 2 (Boost Performance)

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

  1. lolclol

    lolclol

    Joined:
    Jan 24, 2013
    Posts:
    212
    GPU instancer is a great tool for pc and open gl 3+.
     
  2. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    I've used this without problem honestly... It seemed very straightforward. A lack of support is a big problem for any asset, but I don't think this is broken in any way? More commonly I use SimpleLOD, but for a bigger combine I did I found MCS to work fine.
     
    SirTwistedStorm likes this.
  3. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    126
    Can anyone tell me if Mesh Combine Studio works can combine skinned meshes?

    Thanks!!!!
     
  4. Carterryan1990

    Carterryan1990

    Joined:
    Dec 29, 2016
    Posts:
    79
    Ive tried using mesh combine studio in 3 different projects and each time it has either destroyed my scene or not worked at all. Literally my entire scene disappeared.
     
    lolclol and Endi24 like this.
  5. GreeniPeach

    GreeniPeach

    Joined:
    Sep 4, 2017
    Posts:
    7
    Hi,

    I currently, work on a student project. We are facing the problem of enormous fps drops, caused by trees we have on the map. The trees need to be dynamic as they can be destroyed, and have scripts. Could MCS help with this?
    As it is a student project we can´t just buy a 30€ asset and hope it helps :/

    Would be great if someone can help! Thanks.
     
  6. Carterryan1990

    Carterryan1990

    Joined:
    Dec 29, 2016
    Posts:
    79
    I would avoid using this asset. Hours trying to get it to work only for it to fail
     
    Endi24 likes this.
  7. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    755
    I am not sure 100% but i don"t think you can have moving objects or shader with MCS. SO if you need your trees to react with wind it's another question to ask...if someone can answer?
    ;)

    as it seems unsupported i would advice you to find another solution
     
  8. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    For trees, this would not be a good choice. Better off with something built for trees, like VegetationStudio or Critias, etc.
     
  9. GreeniPeach

    GreeniPeach

    Joined:
    Sep 4, 2017
    Posts:
    7
    Okay thanks! Well we will see how to get it somehow working VegetationStudio is to expensive for this project and purpose
     
  10. CodePoKE

    CodePoKE

    Joined:
    May 6, 2015
    Posts:
    23
    There is still a bug in the Asset Store version to do with vertex colors.

    This happens if you have meshes which can be combined (same material) but in which one mesh uses vertex colors, and the other one does not use vertex colors. A quick example would be to manually create a quad with vertex colors and add in Unity's quad, which doesn't have vertex colors.

    Any shader operating on them will assume that any vertex colors not set will have the color White.
    However, MCS will fill the vertex colors with black (default Color32 struct values).

    This can be fixed in `NewMeshObject.HasArray<T>`, by setting a proper default value for all newly instantiated values.
    Then updating the caller on `NewMeshObject.Combine()` on l655 where the color array is forwarded.

    HasArray fix:

    Code (CSharp):
    1.  
    2. void HasArray<T>(ref bool hasNewArray, bool hasArray, ref T[] newArray, Array array, int vertexCount, int totalVertices, Optional<T> @default = default(Optional<T>))
    3.             {
    4.                 if (hasArray)
    5.                 {
    6.                     if (!hasNewArray)
    7.                     {
    8.                         if (newArray == null) {
    9.                             newArray = new T[65534];
    10.  
    11.                             if (@default.IsSet)
    12.                                 newArray.Fill(@default.Value);
    13.                         }
    14.                         else {
    15.                             if(!@default.IsSet)
    16.                                 Array.Clear(newArray, 0, totalVertices);
    17.                             else
    18.                                 newArray.FillOffset(new[] {@default.Value}, 0, totalVertices);
    19.                         }
    20.                     }
    21.                     hasNewArray = true;
    22.                 }
    23.                 else if (hasNewArray) {
    24.                     if(!@default.IsSet)
    25.                         Array.Clear(newArray, totalVertices, vertexCount);
    26.                     else {
    27.                         newArray.FillOffset(new []{@default.Value}, totalVertices, vertexCount);
    28.                     }
    29.                 }
    30.             }
    31.  

    Callee:
    Code (CSharp):
    1. HasArray(ref newMeshCache.hasColors, subMeshCache.hasColors, ref newMeshCache.colors32, colors32, vertexCount, totalVertices, new Color32(255,255,255,255));
     
  11. amit-chai

    amit-chai

    Joined:
    Jul 2, 2012
    Posts:
    80
    Hello, I am interested in your Mesh Combine Studio asset. I am developing for VR so it can be very useful.
    I have a question though, My game is using WRLD3D Asset which generates meshes on runtime. I can see that your asset combine the meshes on runtime, so what will happen in runtime when the new meshes are loaded through streaming..? This WRLD3D Asset is reading and removing meshes automatically on the run, will it collide with your asset or will it work together?
    Thanks!
     
  12. Drown

    Drown

    Joined:
    Feb 5, 2017
    Posts:
    11
    Do not bother with this asset . While I certainly believe it might be helpful to some people it is not a solution that works as advertised. I really tried to get it to do its job in different projects but it was never reliable or predictable. This does not give superior performance compared to other batching solutions or at least I could not measure them.

    Worst part is that the author abandoned this asset because he has several other projects running at the moment. While I get that life is hard and doing multiple jobs at once is time and nerve consuming I simply do not care. As harsh as it sounds, i understand when someone says "Guys there will be a support break" because of personal or business related issues.

    What I do not get is that someone keeps selling the product he cant support while still not delivering on promises made months ago (video tutorials) . The people who trust in you product have bills to pay as well and (I will speak for me, but I guess there are alot of people out there) alot of time consuming projects. Thats why we bought your project, dropping promised support features therefor is an absolute disrespectful move, do not say stuff you cannot keep up with. This is no free to use code snippet. This is a commercial product that costs quite some money.

    Yeah, I'm quite unhappy with the purchase.
     
    recon0303, Endi24 and Quique-Martinez like this.
  13. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    @eagle555 6 months is a long time without a post.
     
  14. Endi24

    Endi24

    Joined:
    May 6, 2015
    Posts:
    50
    I even bought it when it came out, that's what hurts the most. The dev used to be around here, but never got around me. Simply ignored all my mail.
     
    Quique-Martinez likes this.
  15. stationTime

    stationTime

    Joined:
    Sep 17, 2013
    Posts:
    18
    New update out yesterday. I done some tests and get good results. Was there a way to remove a gameobject at runtime and have the mesh be updated?
     
  16. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    I am aware that this is an abandoned asset, but I am asking anyway.
    In the build of a project I get the error
    "No matching GameObjects with chosen search options are found for combining."
    whereas no such error appears within the Unity Editor itself.

    Anyone with the same problem?
     
  17. aler_buffon

    aler_buffon

    Joined:
    Dec 9, 2015
    Posts:
    22
    Hello!

    This is very attractive package with interesting features, the only thing that stops from its acquisition is the lack of creating textural atlases. Does the future have any plans for creating texture atlases for sintered geometry?
     
    DragonsanStudios likes this.
  18. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    630
    I used it once, I am considering asking for a refund.. I got this around the time just before they did the
    DRONE .. I dont see them ever coming back ...
     
  19. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    its not that he don't care, I understand your upset and rightfully so... The issue is, he is taking on way to much.... three assets and a new game.....I believe he is the only programmer for his game....Bad idea, to make assets and a game, that is why I don't sell my assets, as support for one would suffer. So I think one day he will be back, because when he was around for years, HE gave amazing support...I been a supporter of his for many years....

    Sucks this happens, but he has dreams to... I just wish he hired someone to do his support for him here..
     
    Mark_01 and twobob like this.
  20. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    He did plan to, but as of right now , sadly the asset developer has disappeared due to his new game Drone, so I wouldn't expect it soon.. One day he will be back, I assume. as he was around for years..but who knows.
     
    twobob likes this.
  21. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    sounds like a set up issue, like your not selecting the right game objects, that your trying to combine, based on the actually error, check your set up.. and check what game objects your selecting and trying to combine...
     
  22. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    755
    MCS definitely a ROBBERY, cause the tool came out, then the author disappeared!

    Cheers
     
    Quique-Martinez, Endi24 and Mark_01 like this.
  23. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    630
    Yeah I bought the tool like a week before, and I think it was approved as they were on their way out.

    I wish them well on Drone, but, that kind of left a bad taste for buying anything now.
    But it was good because now i am way more careful.
     
    eaque likes this.
  24. anpd03

    anpd03

    Joined:
    Aug 7, 2013
    Posts:
    65
    Any interest in adding new features ourselves? I currently need support for removing meshes and support for an interface that doesn't require prefabs, just send in a mesh to be added and that can be removed in runtime. Anyone modded those features in that would be willing to share? I will see what I can do and share with any that would be interested.
     
  25. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    @eagle555

    How / Can this be used with WorldStreamer? I bought it a while back but have not tried it yet and I was about to give it a go.

    ------ Edit, I see that you said it can work with WorldStreamer, but I am having issue getting it to work. MCS keeps saying there needs to be a parent object in which everything needs to be under, but when WS loads its scenes, they, of course, load as their own scenes in the hierarchy and I don't think they can load under a parent so I am not sure how to have MCS stop throwing the error of needing a parent and then be able to find the things it needs to combine within those additive scenes.
     
    Last edited: Sep 2, 2018
  26. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    I made a script that seems like it is in the right direction to get this working with world streamer as seen below. I just need to figure out a better way to make it all come together and also allow MCS to disable anything it needs to disable from the originals since when WorldStreamer loads its scenes and what not they load additively to the existing scene, so the items are not simply in the original scene hierarchy, so I am not sure MCS is able to disable them or what all exactly it needs to do.

    If anyone has used MCS with World Streamer (or if you have a better way to go about doing what I did in the script below as I am no expert, lol), I would greatly appreciate your input!

    ---- EDIT : After looking through the MCS code some more, I changed my script from calling meshCombiner.AddObjectsAutomatically(); to meshCombiner.CombineAll(); hopefully that helps.

    Code (CSharp):
    1.     public class ObjectListManager : MonoBehaviour
    2.     {
    3.         public MeshCombiner meshCombiner;
    4.         public List<LODGroup> lodGroup;
    5.         public List<Transform> transform;
    6.         public List<GameObject> objects;
    7.      
    8.         private void Start()
    9.         {
    10.             Streamer.loadingComplete += LoadingCompleted;
    11.         }
    12.  
    13.         private void LoadingCompleted()
    14.         {
    15.             lodGroup = new List<LODGroup>();
    16.             transform = new List<Transform>();
    17.             objects = new List<GameObject>();
    18.          
    19.             Debug.LogFormat("Received Event");
    20.             if (SceneManager.sceneCount > 0)
    21.             {
    22.                 for (var n = 0; n < SceneManager.sceneCount; ++n)
    23.                 {
    24.                     var scene = SceneManager.GetSceneAt(n);
    25.                     var temp = scene.GetRootGameObjects();
    26.                     foreach (GameObject gameObject in temp)
    27.                     {
    28.                         objects.Add(gameObject);
    29.                     }
    30.                 }
    31.              
    32.                 foreach(GameObject gameObject in objects)
    33.                 {
    34.                     var lod = gameObject.GetComponentsInChildren<LODGroup>();
    35.                     var transforms = gameObject.GetComponentsInChildren<Transform>();
    36.                     foreach (var t in lod)
    37.                     {
    38.                         lodGroup.Add(t);
    39.                     }
    40.                  
    41.                     foreach (var t in transforms)
    42.                     {
    43.                         transform.Add(t);
    44.                     }
    45.                 }
    46.             }
    47.             meshCombiner.CombineAll();
    48.         }
    49.     }
    I also made a small modification to the MeshCombiner script of MCS as seen here :

    Code (CSharp):
    1.  
    2. private ObjectListManager objectListManager;
    3.         public void AddObjectsFromSearchParent()
    4.         {
    5.             if (searchOptions.parent == null)
    6.             {
    7.                 Debug.Log("You need to assign a 'Parent' GameObject in which meshes will be searched");
    8.                 return;
    9.             }
    10.          
    11.             //LODGroup[] lodGroups = searchOptions.parent.GetComponentsInChildren<LODGroup>(true);
    12.             LODGroup[] lodGroups = searchOptions.parent.GetComponentInChildren<ObjectListManager>(true).lodGroup.ToArray();
    13.             AddLodGroups(lodGroups);
    14.          
    15.             //Transform[] transforms = searchOptions.parent.GetComponentsInChildren<Transform>(true);
    16.             Transform[] transforms = searchOptions.parent.GetComponentInChildren<ObjectListManager>(true).transform.ToArray();
    17.             AddTransforms(transforms);
    18.         }
     
    Last edited: Sep 4, 2018
    AdxOrg and Mark_01 like this.
  27. barcode802

    barcode802

    Joined:
    Apr 6, 2014
    Posts:
    36
    Its a shame that this product is not seeing the support it needs. I actually was able to just use it fairly effectively to get a VR project environments to our target frame rate without too many errors. I purchased it when it came out but had never fully understood the asset until this project since I didn't have a specific need for it until now. The main issues I found was that I have to save my original asset layout for nav mesh baking and if I want to do fine tuning of positions of individual props. Some assets had to be re-positioned in one part of my scene after using MCS but that error was not that frequent. Also after running MCS I saw some objects flickering and not culling properly - I'm not sure if MCS caused this - but I just had to disabled dynamic culling on those objects to solve it. Over all though this asset saved me a bunch of time on this specific project.
     
    Last edited: Sep 29, 2018
    hopeful likes this.
  28. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    Thanks for your answer but as I said, the problem does only occur in the build, so there is no setup issue.
    It happens in every build I make, even in other projects. Might it be, that people don't recognize that the
    system doesn't work for them? I only recognized it, when I randomly stumbled over the error in the dev build log.
     
  29. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    Got you. interesting. wish I could help, I use a very modded version of this.
     
  30. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    187
    Is this asset dead? Seems like it is a trend recently
     
  31. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Anway to get an update if this asset is dead. Would like to know before I make a purchase.
     
  32. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    I think that for at least a while yet it is basically dead. My apologies to the dev if I am wrong.

    Have you seen this? Unity AutoLOD
     
  33. MoribitoMT

    MoribitoMT

    Joined:
    Jun 1, 2013
    Posts:
    301
    I love the idea of this asset, bud it is worst purchase I made recently... No support, No update, No plan.. Lots of bugs.. Still hoping developer get back on it.. We paid for this, and get no value at all..
     
    eaque, magique, Endi24 and 1 other person like this.
  34. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    427
    Doesn't anyone know if it's possible to enable and disable static batching on a per scene basis?

    I've personally found MCS to work great on some scenes, but in others not. Since it requires Static Batching to be turned off (in project settings) I'm wondering if it's possible to change this setting at runtime through scripting.

    Any help would be much appreciated

    *EDIT... I'm being daft (although an answer would still be useful)
    - turning off static batching is only a requirement if you're combining at runtime, which I'm not. Phew! Good to go :)
     
  35. Quique-Martinez

    Quique-Martinez

    Joined:
    Oct 1, 2013
    Posts:
    141
    You can write a report in the asset store. This asset was part of the Cyber Monday sale and it shouldn't.
     
    MoribitoMT and eaque like this.
  36. bourriquet

    bourriquet

    Joined:
    Jul 17, 2012
    Posts:
    181
    Obviously this is an abandoned package so I won't be buying that. Does anyone know of any similar tool for combining meshes (including subtractive if possible) ?
     
  37. ChinChiaYeh

    ChinChiaYeh

    Joined:
    Sep 14, 2016
    Posts:
    23
  38. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    671
  39. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    755
    I never thought Gpu instancing could be used for that...I use VS so Spawning an entire city was not an idea for me..
    Gonna ask on that forum!
    :)
     
  40. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hey everyone,

    Sorry for my long absence, you might have read that I've returned since 2.5 weeks on the TerrainComposer forum:
    https://forum.unity.com/threads/ter...red-terrain-tool.151365/page-129#post-4316662

    So I'm back giving good support and updating my Assets with fixes, new features, tutorials, etc like I used to do for +5 years.

    Now that WorldComposer and TerrainComposer2 are updated, I'm continuing with MeshCombineStudio. I think MCS is a very good tool which can help to optimize in many cases.

    We recently started using it ourselves on our pre-made arenas (rocks and terrain mesh, before we were using the combine tech, but was hard-coded in our Arena Editor). I'm working for an update for MCS, fixing the reported issues and finishing a new feature to remove overlapping geometry, which happens a lot with e.g. rock placement.

    With the new MCS we can remove around 67% of the rock geometry:
    * We only need to render 33-35% so that's about 3x faster by itself.
    * 3x less memory used compared to normal combing and Unity's static batching.
    * Cell combining reduces draw calls from 500 to only like 50, so major performance improvement.
    * Way less overdraw which gives another major performance improvement.
    * Only using 33-35% of the before used texture space for lightmapping, so GPU ram and performance save.
    * We can skip Lods and have no popping. Instead of having to use lods with lightmapping texture size increase 3x because of the lods.

    I also added the feature to remove geometry below surface that has no collider. I will finish the update and then make tutorial videos (explaining how we use it on our arena) as the first step towards recovering this Asset. And of course giving good support...

    So as a summary of the posts. MeshCombineStudio is good to use as a replacement for Unity's static batching. In most cases it's faster to a lot faster, than static batching. But there's a sweet spot, based on how big and how many meshes there are. So it can be used for static objects that don't move and can be used for Lods.

    Nathaniel
     
    Last edited: Apr 4, 2019
    MostHated, tapawafo, Mark_01 and 13 others like this.
  41. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    427
    @eagle555 Great to have you back. I'm a huge fan of MCS and regularly recommend it. I think some people just expect it to be a one click 'fix my game' solution which is unrealistic. It's not always the right tool for the job but for levels made up from modular asset packs it's just great. Looking forward to the updates and improvements.
     
    eagle555 likes this.
  42. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,476
    Welcome back Nathaniel :) As a customer of all three products you mention I am happy. The MCS updates sounds rather good. Is that available currently?

    For terraincomposer (2), can I make a suggestion (I'll admit I have not used it for a year or so, so maybe thisis included), can you consider making presets, so all textures/settings etc have already been set, all the developer/user needs to do is select a terrain preset type (sandy beach, rocky, mountains, tropical, moon etc) and everything is generated automatically. I am thinking to make it super easy to use, but if you want to go into details you can.
     
    eagle555 likes this.
  43. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    I'm glad you like MCS. Yes indeed I agree, it's also great for geometry removal.

    Thanks for welcoming me back :) The MCS update is not ready yet, still working on it.

    Presets on various levels are included in TC2 from the beginning:
    http://www.terraincomposer.com/terraincomposer2-documentation/#presets


    Because TC2 is using real GameObjects for the nodes on every level you can use a preset (select nodes, mask nodes, layers, layer groups), which are prefabs. Currently I have the presets grouped per output (Height/Texturing/Trees/Grass/Objects). Also there's a whole procedural noise library in TC2 with presets as well for each noise.

    Nathaniel
     
    lolclol and khos like this.
  44. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,476
    Very cool thanks for the info Nathaniel
     
  45. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    MCS is actually taking the original normals and rotates them according to the rotation of the object inside the combined mesh, so wondering what's going wrong here. Can someone DM me a mesh that has this issue of becoming black after combining? I'd like to reproduce and fix this issue.

    Nathaniel
     
  46. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    This happens when you combine a negatively scaled object
     
  47. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Thanks a lot for reporting and DMing me the solution, I have it fixed now for the update I'm working on.
     
    punk and Mark_01 like this.
  48. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    You actually don't need to disable Static Batching. What is important is that `batching static` shouldn't be enabled on any of the MCS meshes otherwise Unity will Static Batch them which it shouldn't. However it's turned off by default, so should be fine. In the update I added `Layer` and `Static` setting as output option. So you can select on which layer and which static settings (batching static cannot be chosen) the combined GameObjects will have.

    I'll make this more clear in the documentation.
     
    Last edited: Apr 4, 2019
    hopeful likes this.
  49. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hey Everyone,

    Here's the new MeshCombineStudio 1.3 update:

    Features:
    * Added `Layer` to output settings.
    * Added `Static` to output settings.
    * Added option to add MeshColliders within a box range.

    Improvements:
    * Displays total amount of found objects.
    * Added boost stats to combined results GUI

    Fixes:
    * LodGroup individual renderer search issues
    * Included inactive MeshRenderers
    * Readme duplicate class conflict with TerrainComposer2
    * Flipped normals issue for negative scaled GameObjects.

    I submitted it to the Asset Store.

    I'm still working on the new overlapping geometry removal feature and below surface removal feature without colliders. Let me know if there's still any bugs left.

    Nathaniel
     

    Attached Files:

    Last edited: Apr 4, 2019
  50. CliffCawley

    CliffCawley

    Joined:
    Mar 30, 2009
    Posts:
    22
    @eagle555 Thanks for the updates! I just tried the latest as I also suffer from the blackness issue, but for me it hasn't helped.

    I've emailed your hotmail address with an initial email and then a followup with a link to download the test scene to reproduce the issue.

    Let me know if you need anything else :)