Improve on Actor Merging

To best explain I brought you an example:


This model is a single static mesh with 10 materials. If I merge materials (with texture binning), I get this atlas:


If I import the same model separated by their materials (10 static meshes with 1 material each), I get this atlas:


It’s obvious that the second atlas makes much better use of the available texture space but it would be nice, if I could get the same results in the first scenario (1 mesh with multiple materials). This could help make much better Hierarchical LODs where merging materials in the distance is used.

Having 1 mesh with multiple materials makes a lot of sense because it reduces drawcalls in the earlyZ pass and with dynamic shadows. (As long as each material has opaque blend mode)