MCS Documentation

1.Requirements

  • Currently needs Unity5.5 and up, but next update will probably support from Unity5.2 and up.
  • Supports all platforms.
  • Can be used on the fly in runtime.

2.Demos

Mesh Combine Studio works great on modular and as a replacement for Unity’s static batching.
Here is a demo build of an example Scene from a popular modular Asset called Dungeon Architect. MCS boosts performance about 2170%! (from 37 to 805 fps) on my Nvidia 980TI compared to Unity’s batching:
https://www.dropbox.com/s/0y0zgnbolbytpbt/MeshCombineStudioTest.rar?dl=0

More demo’s from several Asset Store assets will be added soon.

 

3.How does it work?

MCS

Simply drag and drop the MeshCombineStudio prefab into your Scene. You can use multiple MCS prefabs for different settings in the same Scene. if you use MCS in runtime, make sure you disable Unity’s static batching or disable ‘static’ on the MCS to combine GameObjects. Otherwise Unity static batching will combine the meshes instead.

MCS is completely automated like Unity’s static batching and you don’t need to do tedious manual combining. MCS works with a clever octree cell based combining technique which is optimal for culling and z-sorting. What is unique about MCS is that it support LOD meshes as well. Unity’s LOD group is replaced by an octree LOD switcher, which switches an entire LOD for a cell. This gives even more performance and as a bonus gives less LOD popping artifact.

The MCS script Inspector is divided into three parts: Search Options, Output Settings and Runtime.

 

Search Options

With the search options you can filter which GameObject with meshes MCS will combine.

Search box square
The first filter option is the search box, only GameObjects within this box will be combined. In the next update an automatic bound detection will be added, so it wouldn’t be necessary to use the search box.

Parent
The GameObject parent in which the meshes in the children will be included and combined. In the next update the possibility for multiple parents will be added.

LayerMask
Only include GameObjects with from selected Layers.

Use Tag
Only include GameObjects with from selected Tags.

Only Static
Only include static marked GameObjects. Make sure you disable Unity’s static batching if you use this option at runtime.

User Vertex Input Limit
Only combine meshes that don’t exceed a vertex limit. MCS works best on small and medium meshes. Combining takes more memory than without, so having a good balance with only combining the necessary meshes is important. I recommend to use a vertex input limit of around 5000.

Name Contains
Only filter out GameObjects with a specific name to be combined.

 

Output Settings

Cell Size
The size of the cells in which meshes will be combined into one mesh.

Lod Amount
The amount of LOD that the meshes have. At the moment you can only use one MCS prefab for meshes with the same amount of LODs. So you can’t include meshes with 3 and 4 lods, in this case you need to use 2 MCS prefabs. In the next version this will be done automatically.

Add Mesh Colliders
Adds mesh colliders to the combined Meshes. Only use this options if you don’t have primitive colliders. Otherwiser disable the renderes on your old GameObjects. Doing this automatically without combining in runtime will be added in the next update.

Use Vertex Output Limit
Limit the maximum vertices for combined meshes. This can be disabled.

 

Runtime

Combine in Runtime
Combine meshes that meet the Search Option conditions in runtime.

Combine on Start
Combine meshes automatically on Start or call the Combine method yourself from another script.

Use Combine swap key
Switch between MCS and original GameObjects to see performance difference.

Original Objects
What needs to be done with the original objects in runtime? (Disable Renderers, GameObject, Parent GameObject, etc).

Original Objects LOD Group
What needs to be done with the orginal LOD Groups? (Disable or Delete).

Suggest Edit

Comments are closed.