Today I was in deep-thinking mode about the material system in the engine, the flow goes like this:
At the root of all evil lies the shader program (pixel & vertex & other, like compute shader), then for a shader you have a shader preset which is basically a set of shader constants values, as an example: for a ‘Plastic’ shader, you have ‘ShinyRedPlastic’, ‘BluePlastic’, ‘GreenPlastic’ shader presets with their specific shader constant values. All the presets are kept in a ‘*.shader.xml’ file, and the HLSL or GLSL code is linked from that xml. Then we have a higher layer for surface materials, kept in a centralised Material Library, a material being composed of info about: shader, shader preset, hit sounds, physical material (for physics computations). Until here all good, but when I for example create a mesh in 3D Studio Max, I will export it to COLLADA file format, and from there it will be loaded into the editor’s Model tool, naked, without shaders or materials, and from there, you will drag and drop materials (with shader/sounds/physics set) onto the mesh’s submeshes, dressing up the model. It is a natural flow, for example you make a soldier, bring it into the ModelEditor, and start dropping materials onto its component parts, ‘TheSoldier/Helmet’ material goes on its helmet, the ‘TheSoldier/Head’ goes on its head, ‘TheSoldier/Pants’ goes on its pants, until you dress it all up and save it as a *.model.xml file, which is referencing the *.mesh (binary file produced from the COLLADA file, containing only the geometry), and the materials assigned to each submesh, the model being ready to be used. The problem is when the mesh is modified in 3D Studio Max, maybe you add more submeshes (elements) or delete some, export it in COLLADA format, and reload it into the ModelEditor, the material assignments to the submeshes will not match anymore, you’ll have to reassign some materials to their submeshes, but I think this is not such a big issue, the mesh file will not be changed so often in many cases. So, this way you can use whatever modelling package (which supports COLLADA export, and most of them do) you want to create your ‘clay’ mesh and dress it up in the engine’s editor. Maybe I could find a way to assign materials in the 3D Studio Max directly, but it is not a priority, model the mesh there, texture it there for testing how it looks, and export the raw mesh, to be dressed up in the engine, using the materials authored in the NytroStudio, with the MaterialEditor.

Some monster using the material central library