Material Merging
Material merging is a key feature in Simplygon’s suite of tools, aimed at enhancing asset optimization by consolidating multiple materials into one.
The material merging process uses a Mapping Image to project each point of the optimized geometry back to the original model’s geometry. The mapping image is created using the Surface Mapper. Then you can create UVs using either the Chart Aggregator, which consolidates existing UV charts into one atlas, or the Parameterizer, which unwraps new UV charts. You can adjust UV packing, texture resolution, padding, and texture space allocation priorities to customize the process according to your project needs.
Once the mapping image is created, materials are merged into a unified texture atlas using various material casters:
- Color Casters: The color casters are used to transfer color information from the source to the destination texture.
- Vertex Color Casters: Vertex color casters embed texture data into vertex colors, making them ideal for simpler shader rendering of distant LODs.
- Compute Casters: The compute caster allows for the use of custom shaders.
- Opacity Casters: The opacity caster offers baking of transparency data.
- Normal Casters: Normal caster transfers removed geometrical detail into the normal map.
Material merging is crucial for reducing the number of draw calls, which optimizes rendering efficiency for individual assets, clusters, or entire scenes. This process is often integrated with other Simplygon features to achieve optimal results. This includes combining material merging with processes like Object Aggregation and Geometry Culling to retain essential texture parts visible in-game. Additionally, it can enhance LOD chains with material baking to minimize draw calls for detailed LODs.
If you are interested in using Simplygon’s capabilities to optimize draw calls and increase performance in your game, contact us for an evaluation.
Learn more
Video Tutorial - Aggregation
Documentation - MaterialLOD
Blog Post - Aggregation with multiple output materials
Blog Post - Keep original materials during aggregation
Blog Post - How to find correct settings for a scripted aggregation pipeline
Video Tutorial - Cast textures into vertex colors in Blender