Open Lodemor opened 2 months ago
I'm not sure how much it would actually help.
Each texture used would require its own material to be created. MiEx creates a mesh per material. It's possible to combine them all into a single mesh with multiple materials assigned to it. However, this could become a disadvantage. Render engines and viewports cannot natively render out meshes with multiple materials assigned to it and will under the hood separate out the mesh into individual meshes per material. Plus, the software now also has to keep track which face has which material assigned to it, which increases memory usage. So combining meshes might help, but it could also make no practical difference.
Each object does carry overhead and thus reducing object count does help. But, that's assuming that all of the objects have the same material. In MiEx that wouldn't be the case.
Object count is still an issue though. Larger export chunks can help reduce object count, but it can also make managing the set more difficult and MiEx parallelises based on export chunks, so the less export chunks the fewer threads MiEx will end up using. The real issue, is the amount of unique textures. All of these textures cause a bunch of materials to be created and thus also a bunch of mesh objects. So, the solution is more likely to be combining the textures into atlases.
MiEx has an Atlas Creator tool which allows you create atlases for resource packs, so that the total amount of materials are drastically reduced and therefore the object count as well. https://github.com/BramStoutProductions/MiEx/wiki/4.-Resource-Packs#atlas-creator-tool
I'm not turning this down just yet. I'm open to the idea, but there currently is no support for per-face material assignments in the code of MiEx and adding it in, in order to support an option to export out as a single mesh, would take quite a bit of work. An amount of work that I'd rather not do, unless it provides significant impact. Just not sure about how big the impact will be, especially with the ability to use atlases
Quick and to the point, export option for exporting as single mesh instead of every block on its own.
Advantages: Less mesh objects in the scene, drastically increases both importing time and overall performance as there is only 1 mesh compared to tens or hundreds, possibly thousands when exporting with chunks on. This also means even larger worlds can be imported without crashes on lower end systems.
Although BG chunks can be hidden on import, it only takes a few visible chunks to start seeing some impact on performance. Of course scene complexity and amount of unique block types also paly a role.
Disadvantages: Trying to edit the mesh would be more difficult the larger the world is, as you would have to preview all vertices when editing.