Is the next build of Xmesh going to come with material support? How are the materials being handled when combining meshes? If I was going to make a script that combines my materials into one master multi-sub how can I figure the new objects id, material correlation. Thanks for the help.
The automated material handling is indeed next on the list, but before that you might get the update that saves PFlows correctly. I tested the build this morning and fixed some bugs in the scripted part of the exporter, but otherwise it seems to work as expected. So the next update might not have the material stuff yet, but the one after it should.
Our plan is to use a similar approach to what FROST does when referencing multiple custom geometry objects with different materials or submaterials.
A new Multi-Material will be created and saved to a MAT file in the output directory. The face Material IDs of all objects baked to a single XMesh will be incremented internally to match the new Multi-Material’s slots. When you create an XMesh Loader, assigning the material from that library will produce the desired result.
For this to work as simple as possible, we will probably add an option to the XMesh Loader to search for and assign to itself that material automatically whenever you pick the XMesh file. We could also store info in the XMesh file’s metadata to point at the correct material library and material within it.
There is some support for creating and saving combined materials in XMesh Saver 0.2.0. Please let us know if you’d like any changes.