Improve on Actor Merging

To best explain I brought you an example:

7822a5e6f93043549ee0c65d062c4557310df02e.jpeg

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

18f0bd5b2b09e7044c734702fc746cbbb1dcdca1.jpeg

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

83f5c0ebfeee42ee964e5a9e811fec1d901b28b5.jpeg

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)