So far, here's how I'm organizing this:
Voxel Farm creates a structure composed of 3 arrays. Each array is its own structure. They are as follow:
MapStruct - (ParamName, Texture)
ScalarStruct - (ParamName, Float)
VectorStruct - (ParamName, LinearColorStructure)
Then the Vx Plugin creates a DataBase. The DB only fills MapStruct with 6 elements (Diffuse, Displacement, Emissive, Metallic, Normal, Roughness) for each DB item based on the materials that have been defined in Voxel Studio.
Whenever each cell receives its data, it'll fill in the "Mask" similar how you have it in the atlas, supplying it to the texture directly while all of the other information is drawn from the DataBase that was created.
After it sets everything up, I'll be able to go into UE4's material map for the cell, and add as many variables as I desire. All I will have to do from that point is add the information to the Database according to each corresponding structure, and only add data that is different from default values.
CellCreated-> VoxelDataReceived -> for each materialID supplied -> LookUpVoxelDB-> Sequence1(ForEachLoop(MapStruct)->SetTextureParam(ParamName, Texture))-> Sequence2(ForEachLoop(ScalarStruct)->SetTextureParam(ParamName, Float))-> Sequence3(ForEachLoop(VectorStruct)->SetTextureParam(ParamName, LinearColorStructure))
Of course I have yet to do the bit where the VoxelFarmWorldActor is keeping track of which 3 materials get put together, and I would also like to try to create a system where certain MaterialID's will use other instances of the CellMaterial that have special properties in them. I'm planning on having Gem Ores and Thick Ice utilize Subsurface Shading, and then not to mention potentially utilizing other ones such as glass and Thin Ice to use a MaterialInstance that is translucent rather than Opaque, but then I'll have to create a whole algorithm so that a material won't have the translucency issues based on the distance to itself, which will require me to play around with Unreal's Post Processing effects.
I'm still in the process of implementing all of this. Anyways, what do you guys think?