Search Unity

[RELEASED] Mesh Combine Studio 2 (Boost Performance)

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

  1. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,704
    Good question. As far as I understand, you can use the URP batcher on top of MCS2 combining because URP batcher optimizes how Material changes (SetPass calls) are processed on the CPU and being submitted to the GPU.
     
  2. yeagob

    yeagob

    Joined:
    Jan 27, 2014
    Posts:
    18
    Hello, we can not find more than one mesh. We want to combine 2 meshes (a lot more, but first this two), but no matther what option i choose, your system only found one mesh...

    What can we do??

    upload_2020-12-22_18-46-23.png
     
  3. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,704
    Hi, I see you asked the same question on my Discord server. I answered you there...
     
  4. lzardo2012

    lzardo2012

    Joined:
    Apr 11, 2013
    Posts:
    54
    Hi, I´m trying and use your asset in my game, but, so far, using it only resulted in a DROP in the frame rate, actually, it´s dropping my FPS in HALF

    It´s happening EVEN using the example scenes

    I´m using URP, perhaps it does have smowthing to do with it?

    Thanks for your attention
     
  5. lzardo2012

    lzardo2012

    Joined:
    Apr 11, 2013
    Posts:
    54
    Update

    I updated the materials in your examples to URP compatible ones and now your examples work

    But My scene is still dropping framerate...

    But not all of your scenes, for example:

    shadow combining have a MUCH higher frame rate with no combining at all

    and Static example also works somewhat better with MCS disabled.
     
  6. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,704
    Hi thanks for contacting and reporting this. That is strange. Which Unity version are you using? It could be caused by the Unity Editor. Have you tried testing in a build?
     
  7. lzardo2012

    lzardo2012

    Joined:
    Apr 11, 2013
    Posts:
    54
    Hi

    No, not in build, I´m using 2019.4.15f1

    I tried atlasing the objects but it also did not help improve performance...

    and, actually, atlasing the objects actually also impacted negativelly the frame rate, so, perhaps (probably) it´s something wrong on my side.

    I´ll make a few more tests

    thanks for your help
     
  8. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,704
    Thanks for testing. Can you test the example Scenes in a build? Are they also slower combined?
     
  9. yeagob

    yeagob

    Joined:
    Jan 27, 2014
    Posts:
    18
    Please, we are wating for more than 10 days, can you answer here or by Discord???

    I dont want to put a bad comment in your asset, but is not working at all...
     
  10. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,704
    Hi, sorry for the delay. The Earth2 project I'm working on went viral. However I'm fully back with support now and try to answer very fast like I used to do. I answered you on Discord.
     
  11. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,679
    There's an error in 2.993 when trying to combine with default settings.

    Code (csharp):
    1. (MeshCombineStudio) => The `Custom Combined GameObject` is null. Make sure it's assigned in the 'Use Custom Combine GameObject` setting
     
  12. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,704
    Thanks for reporting. You have the `Use Custom Combine GameObject` enabled:
    upload_2021-1-19_12-29-47.png

    Then you need to make sure that is assigned or you need to disable that option.
     
  13. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,679
    It happens when it's disabled.
     
  14. D3m0n

    D3m0n

    Joined:
    Nov 11, 2014
    Posts:
    121
    Hi, I'm trying to merge about 10,000 trees into a scene with a cell size of 50. The merge is successful, but when I try to start the Unity scene it gives me an error due to the excessive weight of the scene. If I try to save, the scene weighs 8GB and gets corrupted. Where am I doing wrong? The number of trees cannot be reduced.

    Serialized file size of 8.28 GB (8892665443 bytes) exceeds maximum. File name: 'Assets/_Scenes/Main.unity'. Serialized files over 4.00 GB (4294967295 bytes) cannot be loaded by the player. Some likely ways to reduce this are utilizing asset bundles, re-balancing asset locations, or limiting their serialized size e.g. limiting the maximum texture sizes.
     
  15. Vaupell

    Vaupell

    Joined:
    Dec 2, 2013
    Posts:
    250
    Found a problem with MC2, when i bring it into a project, the project starts reimporting ALL ASSETS in the project.
    I have tested extensively on multiple assets, and MC2 is one of the assets calling a update/reimport when installed.

    Also tested by importing other assets before, no reimport, but after MC2 is added everytime i import something it calls this update..

    Also when clicking the "Make meshes readable" it then again reimports assets.. :(

    Please disable this, it's not good.


    upload_2021-4-6_9-41-10.png
     
  16. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,338
    This is Unity performing the reimport for assets that were altered.

    As far as I understand it, MCS only changes the assets for you. I'm not sure if there is a way to make Unity's reimport distinguish between mesh assets (there should be a way, but this is Unity we're talking about here), however the only way an asset can set something on existing assets in newer versions of Unity is by changing the setting and telling Unity that it needs to reimport all assets that were changed (i.e. the assets that have that particular "readable" flag).

    There may be more to it since Asset Databases, DOTS, etc., (I'm not as familiar with this as I need to be since DOTS was introduced), but I hope this helps clarify some of the default behavior behind things.

    One thing that could (always) help is specifying what version of Unity you're working with.
    I'm not the asset author, but a lot changes between versions, so I know how helpful that can be. Just my two-cents.
     
  17. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,704
    Thanks for reporting. That's very strange, which Unity version are you using?
     
  18. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,704
    Hi, thanks for reporting. That's probably because your trees are heavy meshes and combining them takes a lot of memory. For trees in general it's better to use GPU instancing.
     
    julianr likes this.
  19. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,338
    It might be nice to give a little insight about when MeshCombineStudio is better versus GPU Instancing, as the use-cases are pretty vague for most people it seems.

    i.e. How 'heavy' are we talking before our performance benefits (MCS vs. GPU instancing) outweigh our memory cost?

    Clearly this is game-specific, but some guidelines could be pretty useful.
     
  20. Vaupell

    Vaupell

    Joined:
    Dec 2, 2013
    Posts:
    250
    Sorry about that, 2020LTS..
     
  21. Venominus

    Venominus

    Joined:
    Sep 5, 2015
    Posts:
    24
    mesh combine stays in memory and with each loading of scene takes more and more memory and after several loading application runs out of allcoatable memory. meshcombinestudio.meshobject and meshcombinestudio.cachedgameobject first load 30 mb second load of scene 60 mb etc. Mesh combine isn't dontdestroyonload.
     

    Attached Files:

  22. hauwing

    hauwing

    Joined:
    Dec 13, 2017
    Posts:
    61
    hello, I used the static LOD group demo scene to replace the chair prefab to my own rock prefab, but it keeps complaining that's Read/Write is disabled. Pressing the red button did not help. But the model has already have the read/write enabled. Any idea? thx.
    upload_2021-4-24_12-40-59.png
    upload_2021-4-24_12-41-5.png
     
  23. TFGCo2

    TFGCo2

    Joined:
    Jun 10, 2017
    Posts:
    2
    Hey guys, i dont know if i'm missing something but i cant build the game, the assets seems to work on the scenes but everytime i try to build i got a lot of errtors but all very similar like tghis one Assets\MeshCombineStudio\Editor\CombinedLODManagerEditor.cs(9,45): error CS0246: The type or namespace name 'Editor' could not be found (are you missing a using directive or an assembly reference?)
     
  24. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,181
    do you have compile errors on any other scripts? As it may not be MeshCombineStudio, it just means it might not be able to compile from that point.
     
  25. JJ-Jabb

    JJ-Jabb

    Joined:
    Feb 6, 2015
    Posts:
    15
    Hi hauwing, are you still having problems with this? What version of unity and what rendering pipeline are you using?
     
    twobob likes this.
  26. hauwing

    hauwing

    Joined:
    Dec 13, 2017
    Posts:
    61
    I changed to not to combine in runtime and the problem is resolved (kind of)...
     
  27. Drown

    Drown

    Joined:
    Feb 5, 2017
    Posts:
    9
    Great job, developer seems to be MIA again...

    Edit : Sorry, did not see that there was a new person maintaining this thread. Great to see this asset being supported :)
     
    Last edited: Jul 1, 2021
    JJ-Jabb likes this.
  28. JJ-Jabb

    JJ-Jabb

    Joined:
    Feb 6, 2015
    Posts:
    15
    Hi Drown, I'm here working support... is there something I can help with?
     
  29. JJ-Jabb

    JJ-Jabb

    Joined:
    Feb 6, 2015
    Posts:
    15
    I haven't been able to reproduce this behavior - if you want to send me an model (FBX or OBJ) that is causing this problem I can take a look
     
  30. SBliznitsov

    SBliznitsov

    Joined:
    Mar 13, 2019
    Posts:
    17
    Hello.
    I get the error: "Mesh doesn't have a ModelImporter and is a mesh.asset, it's tricky to make readable."
    I have enabled the Read/Write manually in the model importer but the error remained.
    Does anyone know how to solve this problem?
    I will be grateful for any help!
     
  31. JJ-Jabb

    JJ-Jabb

    Joined:
    Feb 6, 2015
    Posts:
    15
    We spoke on Discord - we can continue discussing there or here, whichever is more convenient for you
     
  32. SBliznitsov

    SBliznitsov

    Joined:
    Mar 13, 2019
    Posts:
    17
    Your answer on Discord helped solve the problem. Thanks for the help!
     
  33. lzardo2012

    lzardo2012

    Joined:
    Apr 11, 2013
    Posts:
    54
    Hello

    I succesfully combined all the static objects in my game, it solved, at least, the problem I was having with the device overheating...

    But, I´m having a hard time to figure out how to combine the dynamic objects (everything else)

    I created an empty object named "pools" (using PoolManager to spawn game objects and reuse it)

    Created a new MeshCombineStudio and directed it to this empty object and set it to "combine per frame"

    I thought it would make a search per frame and combine objects, but it does nothing

    If I manually search and combine it does find some other objects, should I do it this way? not sure if it´s feasible...

    anyway, what´s the best way to combine objects as they are spawned?

    thanks in advance!
     
  34. JJ-Jabb

    JJ-Jabb

    Joined:
    Feb 6, 2015
    Posts:
    15
    Have you looked at the "Dynamic Object Example" scene under Assets/MeshCombineStudio/TestScenes? Take a look at the settings there, that might be a good starting point. If you are still having problems let me know, either here or on Discord at https://discord.gg/HhepjD9
     
  35. lzardo2012

    lzardo2012

    Joined:
    Apr 11, 2013
    Posts:
    54
    Hello

    Yes, I tried, but I just found the problem...

    skinned meshes...

    that´s why it wasn´t finding anything...
     
    JJ-Jabb likes this.
  36. dfarjoun

    dfarjoun

    Joined:
    Aug 6, 2017
    Posts:
    39
    Hi,
    Any idea why I keep getting scripts errors when trying to install from Package Manager?

    I've even already deleted the Library folder and keep getting this install errors:

    Assets/MeshCombineStudio/Scripts/Mesh/MeshCombiner.cs(253,17): error CS0103: The name 'CreateOverlapColliders' does not exist in the current context

    Assets/MeshCombineStudio/Scripts/Mesh/MeshCombiner.cs(457,17): error CS0103: The name 'CreateOverlapColliders' does not exist in the current context

    Assets/MeshCombineStudio/Scripts/Mesh/MeshCombiner.cs(636,13): error CS0103: The name 'RemoveOverlappingTris' does not exist in the current context

    Assets/MeshCombineStudio/Scripts/Mesh/MeshCombiner.cs(652,21): error CS0103: The name 'CreateOverlapColliders' does not exist in the current context

    Assets/MeshCombineStudio/Scripts/Mesh/MeshCombiner.cs(653,22): error CS0103: The name 'CreateOverlapColliders' does not exist in the current context

    Assets/MeshCombineStudio/Scripts/Mesh/MeshCombineJobManager.cs(1261,21): error CS0103: The name 'RemoveOverlappingTris' does not exist in the current context
     
unityunity