Merge Parts By Regions
Description
Merge Parts By Regions approach is different from other automatic parts merging functions (Scene menu), which rely on the hierarchical organization.
Indeed, Merge Parts By Regions enables you to merge parts together (assemble a collection of parts into a single resulting part), based on their physical proximity in the scene, meaning by region.
With this algorithm, the user can quickly merge groups of parts gathered by region, without needing to manually select them through the viewer or the hierarchy (Product Structure), which can be tedious, especially with very large models.
For that matter, the Merge Parts By Regions function is particularly fit with large AEC models, coming from Revit, AutoCAD, Navisworks or RVM files.
Usage strategies
Merge Parts By Regions can be very powerful with real-time 3D engines like Unity.
For example, this merging strategy can be used as a starting point to generate HLODs, by creating regions before combining materials region by region (using ProxyMesh + Bake or Combine Meshes for example).
Also, it can help take advantage of occlusion culling capabilities: merging lowers the number of draw calls while benefiting from Unity's frustum culling (contrary to other Merge functions that do not merge by location/region but by hierarchy). This is particularly interesting with large AEC buildings where the user is more likely to be inside a model than outside, thus culling the invisible outer pieces. One drawback though is that merging like this generally destroys instances.
How To
To use this function:
Go to the Scene menu, and select Merge Parts By Regions
Then, choose how the segmentation is guided:
- Number Of Regions: sets how many resulting regions will be created
- Size of Regions: defines the number of region by a predefined region size
Finally choose a merging strategy:
- Merge Parts: for each computed region, all parts included in this region are merged together as one unique resulting part
- Merge By Materials: for each computed region, all parts included in this region are merged together based on their material (can result in multiple parts, depending on the number of materials of the model)
Scripting
This function can also be used in a Python script (see here):
scene.mergeByRegions([1], ["NumberOfRegions",10], 0)