The Smart Merge operation optimizes the scene by combining geometrically and materially similar meshes into single, larger static meshes. This process reduces the number of draw calls and simplifies the scene structure, which can significantly improve performance, especially in complex scenes.
Smart Merge analyzes the scene for groups of meshes with similar materials and geometries. It then intelligently merges these groups into single static meshes based on spatial proximity and material consistency. This operation is particularly beneficial for scenes with many small meshes, where draw calls become a performance bottleneck.
Dependencies
Run Smart Merge after Hierarchy Merge, Replace Duplicates and Create Instances. These operations ensure that the scene is cleaned up and organized before the merging process begins, allowing Smart Merge to work on the most optimized set of actors.
Best Practices
- Min Neighbors & Bounding Box Factor: Adjust the
MinNeighbors
and BoundingBoxExtentFactor
settings in the Smart Merge settings to control how aggressively meshes are merged.
- Material Groups: Ensure that meshes that should remain separate do not share identical materials, as Smart Merge uses material similarity as one of the primary criteria for merging.
- Batch Processing: For large scenes, consider breaking down the merge process into smaller batches (by levels or areas) to reduce the risk of excessive memory usage.
Considerations
- Performance Impact: While Smart Merge improves runtime performance, the merging process itself can be CPU-intensive, especially for large scenes. Ensure your system has adequate resources before running the operation.
- Material Merging: By default, Smart Merge attempts to merge materials. This can lead to material baking errors if complex materials are involved. Adjust settings accordingly if material merging is not required.
- Custom Merging Logic: The built-in UE5 merge function was modified to fix certain bugs. This custom logic ensures that the merge operation is reliable and efficient.
Asset Management
- Scene Actor: Merged actors replace original groups and are tagged as
MergedActor
.
- Uasset: Merged assets are saved under
Content/User/Meshes/PalatialMerged/LevelName
for easy access and reference.