1.Requirements(需求)

  • Support >Unity 5.1, Unity 2017.x, Unity 2018.x and Unity 2019.x.
  • 支持unity 5.1 2017.x 2018.x 2019.x 以上版本
  • Supports all platforms (PC, Mac, Linux, Android, IOS, WebGL, etc).
  • 支持全平台(PC, Mac, Linux, Android, IOS, WebGL, 等等)
  • Can be used on the in Editor and/or Runtime.
  • 能够在编辑模式和运行模式下使用

2.Demos(Demo)

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:

这里是一个发布后的Demo案例场景来自于一个比较常见的资源叫做Dungeon Architect.MCS可以提高性能达到2170%(从37帧提高到805帧)在我的电脑上基于Nvidia 980TI显卡,相对于Unity的批处理,下面是Demo地址
MCS Dungeon Architect demo

Another demo with MCS used in Modular City Allay Pack:

另外一个Demo使用MCS在Modular City Allay Pack:中
MCS Modular City Allay pack demo

3.How does it work?它是如何工作的?

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 ‘batching static’ on the MCS to combine GameObjects. Otherwise Unity static batching will combine the meshes instead and MCS won’t work.

简单的拖动MeshCombineStudio预设物到你的场景中。你能够使用多个MCS预设物做不同的设置在同一个场景中。如果你在运行的时候使用MCS,确保你已经关闭了Unity自身的静态批处理或者MCS组件上的静态批处理(batching static)选项。否则,Unity静态批处理将改为合并网格,而MCS将不起作用。

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, z-sorting and LOD switching. What is unique about MCS is that it support LOD meshes and that MCS is able to remove geometry that is never visible for the camera. E.g. triangles that are under a terrain/mesh, and/or backface triangles on background terrain or on a sideway scroller or top down game. LODs are combined per cell and switching is done per cell. This gives even more performance and as a bonus gives less LOD popping artifact.

MCS完全自动化,就像Unity的静态批处理一样,您无需进行繁琐的手动合并。 MCS与基于巧妙的八叉树单元的结合技术一起工作,该技术最适合于剔除,z排序和LOD切换。 MCS的独特之处在于它支持LOD网格,并且MCS能够删除相机无法看到的几何图形。例如。地形/网格下的三角形和/或背景地形上或侧面滚动条或自上而下游戏中的背面三角形。 LOD按每个单元组合,并且按每个单元进行切换。这样可以提供更高的性能,而额外的好处是可以减少LOD弹出失真。

The MCS script Inspector is divided into seven parts: Unity’s settings, Search Options, Output Settings, Job Settings, Runtime, Execute Buttons and Stats.

MCS脚本检查器分为七个部分:Unity的设置,搜索选项,输出设置,作业设置,运行时,执行按钮和统计信息。

3.1.Unity's Settings

These are Unity settings from Unity Menu (Player and Quality Settings) to quickly access them.

这些是Unity菜单中的Unity设置(玩家设置和质量设置),可以快速访问它们。

Static Batching(静态批处理)
Enable/Disable Unity’s static batching (same setting as in Player Settings). More info on Unity’s batching can be found in the Unity Manual here.

启用/禁用Unity的静态批处理(与“玩家设置”中的设置相同)。可在此处的Unity手册中找到有关Unity批处理的更多信息。

Dynamic Batching(动态批处理)
Enable/Disable Unity’s dynamic batching (same setting as in Player Settings).

启用/禁用Unity的动态批处理(与“玩家设置”中的设置相同)。

V Sync Count(垂直同步计数
Enable/Disable Unity’s V Sync Count settings (same settings as in Quality Settings). Disable V Sync to measure true fps gain, otherwise Unity will cap to 60 fps.

启用/禁用Unity的垂直同步计数设置(与“质量设置”中的设置相同)。禁用垂直同步以测量真实的fps增益,否则Unity将限制为60 fps。

3.2.Search Options(查找选项)

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

使用搜索选项,您可以过滤将合并MCS的带有网格的GameObjects。

Parent(父级)
The GameObject parent in which the meshes in the children will be included and combined.

GameObject父级将包含并合并子级中的网格。

Object Center(物体中心点)
What position should be used to determine in which cell the mesh will be placed, the center of the mesh bounds in world space or the transform pivot.

应该使用哪个位置来确定将网格放置在哪个单元中,网格边界在世界空间中的中心或变换枢轴。

Draw Gizmos(绘制指南)
Draws the combine cells in the Scene window after objects are found for combining when clicking the ‘Search’ button.

单击“搜索”按钮后找到要合并的对象后,在“场景”窗口中绘制合并单元格。

Draw Mesh Bounds(绘制网格边界)
Draws the mesh bounds in the Scene window in world space.

在世界空间的“场景”窗口中绘制网格边界。

Only Active(仅活动
Only combine active GameObjects.

仅合并活动的GameObject

Only Static(只有静态
Only combine GameObjects that are marked as ‘Static’.

仅合并标记为“静态”的GameObject

Use Search Box(使用搜索框
Only combine meshes that are within the bounds of the search box.

仅合并在搜索框范围内的网格

Search Box Pivot/Size(搜索框枢轴/大小
The pivot position and the size of the search box.

枢轴位置和搜索框的大小。

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.

第一个过滤器选项是搜索框,仅此框中的GameObjects会被组合。在下一个更新中,将添加自动边界检测,因此无需使用搜索框

Use Max Bounds Factor(使用最大边界因子
Only include meshes which bounds are not bigger than x times the cell size. This option limits that too big objects are included which would make cell bounds too big for optimal culling.

仅包括边界不大于像元大小x的网格。此选项限制了包含太大的对象,这会使单元边界太大而无法实现最佳剔除

User Vertex Input Limit(用户顶点输入限制
Only combine meshes that don’t exceed this 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 smaller meshes is important. I recommend to use a vertex input limit of around 5000. Unity’s static batching doesn’t have such filter option and it would all need to be selected manually to save memory, which can be tedious.

仅合并不超过此顶点限制的网格。 MCS在中小型网格上效果最佳。合并要比没有合并花费更多的内存,因此仅合并必要的较小网格,取得良好的平衡非常重要。我建议使用大约5000个顶点输入限制。Unity的静态批处理没有此类过滤器选项,因此需要手动选择所有这些选项以节省内存,这可能很繁琐。

Use Vertex Input Limit LOD(使用顶点输入限制LOD
Only combines meshes that have this vertex limit for all LODS, so if LOD0 has a higher vertex count than the limit the entire object won’t be included for combining. For LODs the limit can be higher somewhere between 10.000 – 15.000.

仅合并所有LODS具有此顶点限制的网格,因此,如果LOD0的顶点数大于限制,则将不包括整个对象进行合并。对于LOD,该限制可能更高,介于10.000-15.000之间。

Use LayerMask(使用层遮罩)
Only combine GameObjects which Layer is in this LayerMask.

只合并选定的层的物体

Use Tag(标签使用)
Only combine GameObjects with this selected Tag.

只合并带有指定标签的物体

Use Components Filter(通过组件过滤器)
Only combine GameObjects with a certain component. And: Only include GameObjects that have all components.\nOr: Include GameObjects that have one of the components.

仅将GameObjects与某个组件结合在一起。并且:仅包括具有所有组件的游戏对象。\ n或:包括具有其中一种组件的游戏对象。

Use Name Contains(通过名字合并)
Only combine GameObjects with a certain name (similar to windows explorer file search). E.g. can use Rocks*Green and will include all GameObjects that contain the word ‘Rocks’ and ‘Green’.

仅将具有特定名称的GameObject组合在一起(类似于Windows资源管理器文件搜索)。例如。可以使用Rocks * Green,并将包含所有包含“ Rocks”和“ Green”一词的GameObject。

3.3.Output Settings(输出设置)

Use Cells(使用单元格
Combine cell based, only disable cells for combining parts for dynamic objects.

基于合并单元格,仅禁用用于合并动态对象零件的单元格

Cell Size(单元格大小)
The size of the cells in which meshes will be combined into one mesh.

基于当前选择将单元格内的物体合并到一个网格里面

Cell Offset(单元格偏离)
Offset position of the cells.

中心点的位置偏移

Remove Tris Below Surface(移除表面下方的三角面
Remove triangles that are below any surface (terrain and/or meshes). This works collider based. This also removes vertices/normals/tangents/uvs, etc to save memory.删除任何曲面(地形和/或网格)下方的三角形。这基于碰撞器。这也将删除顶点/法线/切线/ uvs等以节省内存。

Surface Layer Mask(表面层遮罩)
The layers on which the surface colliders are.

表面碰撞器所在的层

Raycast Height(射线高度)
This needs to be at least the maximum height of your surface. This is the height where the rays are cast from.

这必须至少是您表面的最大高度。这是投射光线的高度

Remove Backface Tris(移除背部三角面)
Removes triangles that will never be visible for the camera from with a certain box volume. E.g. if you have an inner area where the player cannot go beyond and outside of this area you placed objects (even big mountain meshes) you can remove the back part of those meshes as the player will never see them. This can also work for a top down game or side scroller game where the player is never able to see a certain angle. This also removes vertices/normals/tangents/uvs, etc to save memory.

从特定的盒子体积中删除相机永远看不见的三角形。例如。如果您有一个内部区域,玩家无法超出该区域,则在该区域之外放置了对象(甚至是大的山状网格),您可以删除这些网格的后部,因为玩家将永远看不到它们。这也可以用于自上而下的游戏或侧面滚动游戏,在这种情况下玩家永远无法看到某个角度。这也将删除顶点/法线/切线/ uvs等以节省内存。

Backface Mode(背部模式)
Box based: Case where Camera stays within the box volume.
Direction based: Case where Camera is orthogonal and doesn’t rotate.

基于包装盒:相机停留在包装盒内的情况。

基于方向:相机正交且不旋转的情况

Center/Size 中心点和尺寸
The center and size of the box volume.

盒子体积的中心和大小

Two Sided Shadows(双面阴影)
When using shadows this probably needs to be enabled to keep correct shadows, otherwise they will be cut-out because the backface triangles of the meshes are missing.

当使用阴影时,可能需要启用它以保持正确的阴影,否则由于缺少网格物体的背面三角形,将其切除。

Add Mesh Colliders(添加网格碰撞器)
Adds mesh colliders to the combined Meshes. Only use this options if you don’t have any colliders on the original GameObjects. It’s much faster to use primitive colliders on the original GameObjects. Can be a mix of primitive and mesh colliders, MCS will keep the original colliders and any other components working.

将网格碰撞器添加到组合的网格中。仅当原始GameObjects上没有任何碰撞器时,才使用此选项。在原始GameObjects上使用原始碰撞器要快得多。可以混合使用原始碰撞器和网格碰撞器,MCS将保持原始碰撞器和任何其他组件的正常运行

Make Meshes Unreadable(使网格不可读
Removes the copy of the mesh arrays from CPU memory, which saves CPU memory. Only disable this option if you need to read from the meshes.

从CPU内存中删除网格阵列的副本,从而节省了CPU内存。仅在需要从网格读取时才禁用此选项

Use Vertex Output Limit(使用节点输出限制)
Limit the maximum vertices for combined meshes. This can be disabled.

限制最大的合并网格节点,这个选项可以被关闭

Copy Baked Lighting(复制烘焙灯光)
The Lighting of the original meshes will be copied to the combined meshes. Copy baked lighting can result in more combined meshes (more draw calls than with rebaking) as the source objects need to have the same lightmap index. The advantage is that the Scene file size doesn’t increase when used with ‘Combine In Runtime’.

原始网格物体的光照将被复制到组合的网格物体。由于源对象需要具有相同的光照贴图索引,因此复制烘焙的光照可以导致更多的组合网格(与重新烘焙相比,绘制调用更多)。好处是与“在运行时合并”一起使用时,场景文件的大小不会增加

Rebake Lighting(重新烘焙灯光)
Rebake the lighting on the combines meshes.重新烘焙灯光在合并网格后

Scale in Lightmap(缩放烘焙贴图)
The scale of the combined meshes in the Lightmap, default value is 1 and a smaller value will create Lightmaps with less file size.

光照贴图中组合网格的比例,默认值为1,较小的值将创建文件尺寸较小的光照贴图

Output Layer(输出层)
The combined GameObjects will be on this layer.

合并后的物体将会在这个层上

3.4.Job Settings(作业设定)

These are the settings for the multi-threaded (optional) combine job manager. There’s one global job manager that handles all combine jobs, and there can be many MeshCombineStudio prefabs which all send the jobs to the job manager. The job manager is designed to have as low memory and garbage allocation as possible. Each mesh type is only cached once and new combined mesh arrays are reused with pooling. I made a special plugin to have mesh array assigning alloc free by re-using the arrays pool.

这些是多线程(可选)组合作业管理器的设置。有一个全球性的职位经理负责处理所有合并职位,并且可以有很多MeshCombineStudio预制件将职位发送给管理器。作业管理器被设计为具有尽可能低的内存和垃圾分配。每种网格类型仅被缓存一次,新的组合网格阵列可通过池重新使用。我做了一个特殊的插件,通过重用数组池使网格数组免费分配alloc

Combine Job Mode(合并作业模式)
Combine At Once: Use this options if you quickly want to combine all meshes where FPS doesn’t matter. E.g. Just after loading a level.
Combine Per Frame: Choose the amount of meshes that will be combined per frame to keep FPS up. This can be used for any runtime editing like players creating levels, etc. A runtime API is still in the making for this and will be released soon.

一次合并:如果您想快速合并FPS无关紧要的所有网格,请使用此选项。例如。刚加载一个关卡之后。

每帧合并:选择每帧合并以保持FPS增长的网格数量。可以将其用于任何运行时编辑,例如玩家创建关卡等。运行时API仍在开发中,将很快发布

Use Multi Threading(使用多线程)
The combine part itself can be done on multiple threads. This can speed up the combining linearly with the amount of cores/threads available.

合并部分本身可以在多个线程上完成。这样可以加快可用内核/线程数量的线性组合速度

Use Main Thread(使用主线程)
This option can be disabled when using multi threading. This will keep fps higher on the main thread. Still the assigning of the meshes can only be done on the main thread, since it needs to use the Unity API, which doesn’t allow any multi-threading. But the more compute intense combining itself can be done on the other threads.

使用多线程时可以禁用此选项。这将使主线程上的fps更高。网格的分配仍然只能在主线程上进行,因为它需要使用Unity API,该API不允许任何多线程。但是,更复杂的计算本身可以在其他线程上完成

Show Stats(状态显式)
Show the stats of the Job Manager. Amount of meshes cached, amount of pending jobs, etc.

显示作业管理器的统计信息。缓存的网格数量,挂起的作业数量等。

3.5.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 CombineAll() method yourself from another script.

在开始时自动合并网格,或者从另一个脚本中自己调用CombineAll()方法。

Original Mesh Renderers(原始网格渲染器
What needs to be done with the original MeshRenders? (Disable or Delete).

原始的MeshRenders需要做什么? (禁用或删除)。

Original LODGroups(原始LOD组
What needs to be done with the orginal LOD Groups? (Disable or Delete).

原始的LOD组需要做什么? (禁用或删除)

Use Combine swap key(使用组合交换密钥
Switch between MCS and original GameObjects to see the performance difference.

在MCS和原始GameObjects之间切换以查看性能差异

3.6.Execute Buttons(执行按钮)

Search(搜索)
Search and report the found GameObjects (based on Search Conditions) for combing.搜索并报告找到的GameObject(基于搜索条件)以进行梳理

Combine(合并)
Combine the found GameObjects into new combined meshes, the new GameObjects will be spawned as children of the MeshCombineStudio GameObject.

将找到的GameObjects组合成新的组合网格,新的GameObject将作为MeshCombineStudio GameObject的子代产生

Select Original(选择原始)
Multi select all the original GameObjects that were found with the ‘Search’ button. This can be useful to change a setting on e.g. the Mesh Renderer component.

多重选择通过“搜索”按钮找到的所有原始GameObject。这对于更改例如网格渲染器组件

Select Combined(选择合并)
Multi select the combined GameObjects that are created after combining. This can be useful to change a setting on e.g. the Mesh Renderer component.

多选择组合后创建的组合GameObject。这对于更改例如网格渲染器组件

Disable/Enable Original Renderers and LodGroups(关闭或者开启原始渲染或者LOD组)
Switches between rendering the original and combined Mesh Renderers.

在渲染原始网格渲染器和组合网格渲染器之间切换

Save Combined(保存合并)
Saves the combined meshes to a folder in the project so they can be used as prefabs.

将组合的网格保存到项目中的文件夹中,以便将它们用作预制件

Delete Combined(删除合并体)
Deletes the combined GameObjects, use this to reset to the original state. MCS will automatically re-enable the Mesh Renderers and LODGroups on the original meshes.

删除组合的GameObject,使用它重置为原始状态。 MCS将自动在原始网格上重新启用网格渲染器和LODGroup

Mesh Combine Studio 2 Documentation相关推荐

  1. core部署iis的 调试net_远程调试远程 IIS 计算机上的 ASP.NET Core - Visual Studio | Microsoft Docs...

    在 Visual Studio 中远程调试远程 IIS 计算机上的 ASP.NET CoreRemote Debug ASP.NET Core on a Remote IIS Computer in ...

  2. Use Visual Studio Code to create and run Transact-SQL scripts for SQL Server

    转载来源:https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-develop-use-vscode?view=sql-server- ...

  3. Unity Mesh网格合并

    Mesh网格合并通常是优化中常用的小手段,目的是为了减少drawcall,大量的drawcall会造成CPU的性能瓶颈.例如下图中船只里的钢材货物,由诸多钢材模型堆砌而成. 我们将其放在一个空场景里查 ...

  4. 图形图形处理方面的一位微软专家的主页,

    刚在Github上分享了一些不错的代码 http://hhoppe.com/ Hugues Hoppe   »DemosPublicationsTalksAcademicProfessionalMis ...

  5. 论技术领域学好英文的重要性

    OPCUASDKHelp 封页 Welcome to the UA SDK(欢迎使用UA SDK) //欢迎使用统一体系结构软件开发工具包 Welcome to the Unified Archite ...

  6. 英文VS2010安装中文版MSDN文档方法

    在2010年4月12号发布Visual Studio 2010 and .NET 4正式版.5月26日微软发布了Visual Studio 2010 and .NET 4 RTM中文版,我们还是喜欢使 ...

  7. 四种Sandcastle方法生成c#.net帮助类帮助文档

    阅读目录(Content) 方法一.Visual Studio新建documentation生成帮助文档 一.下载 二.安装 三.设置 五.生成 方法二.cmd生成帮助文档 方法三.Sandcastl ...

  8. (转载)VS2010/MFC编程入门之一(VS2010与MSDN安装过程图解)

    上一讲中鸡啄米对VC++和MFC做了一些简单介绍.在本套教程中鸡啄米将使用VS2010为大家讲解如何使用VC++和MFC进行编程,所以首先要安装VS2010. 一.下载VS2010 首先我们需要下载V ...

  9. 关于 MSDN 收藏夹

    1. 从 VS 2005 开始,MSDN 提供了独立的收藏夹.之前的版本是合并到 IE 收藏夹的. 当然"萝卜青菜各有所爱". 2. 假如同时安装了 VS 和 MSDN,那么他们分 ...

最新文章

  1. jupyter notebook配置
  2. 常见宽带错误解决方法
  3. 浅谈Javascript中的函数重载实现
  4. 什么叫做石英表_石英表 是什么意思??
  5. mysql相交_PHP-Mysql相交结果
  6. 纯新手DSP编程--5.30--任务的通信和同步
  7. AWG标准线径规格对照表 (2
  8. eclipse安装翻译插件(通用)
  9. tcp/udp 常用端口列表
  10. android retrofit实例,Retrofit使用步骤
  11. 2015年阿里巴巴校招面试经验汇总
  12. UOM Convertion Rate API
  13. 本科三本的计算机博士,读书中的我 从三本本科到985博士
  14. nginx uwsgi django部署
  15. 三国杀ol服务器维护时间 11月6日,三国杀ol11月6日更新一览 聚宝盆功能上线
  16. ROS学习笔记 程序简单示例一:发布者与订阅者(talker和listener)
  17. 天大青医堂第十期报告会之二
  18. 文墨绘学:习惯决定孩子命运—习惯培养的五大步骤
  19. 【DP】poj1671
  20. 8051/2单片机基础 实现开关,驱动2位的共阳极数码管显示小数,驱动喇叭播放音乐

热门文章

  1. NO 00004 iOS实现打砖块游戏 一 素材的制作
  2. linux断网过一段时间就好了,网络总是隔一段时间丢包或者不通,过10分钟就好了?求解决 - 思科技术论坛 - 51CTO技术论坛_中国领先的IT技术社区...
  3. Python绘制节点是饼状图的社交网络图(Plot network with pie chart)
  4. Angular 4入门教程系列:14:PrimeNG的使用方式
  5. 联想第一季度业绩超预期,增长势头强劲
  6. 【附源码】Python计算机毕业设计农田节水灌溉监测系统
  7. Maven项目右边依赖好多红色波浪线处理办法
  8. 天下难事必做于易 项目管理从简单做起(转)
  9. 最好用的mac免费PDF阅读器是什么?
  10. 使用keep-live组件无法销毁cesium的view