just have to consider what you are doing, 1 static mesh, with multiple materials, and each material can set multiple parameters. What makes this easy? When using another node that I wrote to get all the materials, and all the parameters for those materials, it just returns them already set up for use, but the node that I mentioned, So what we have is this.
struct {
Material pointer;
Array of Scalar parms (with value, and name)
Array of Vector Parms (with value and name)
Array of Texture Parms (with value and name)
}
this struct is then in a array that is returned to the caller of the Get Materials node. The Set Materials portion of hte node that I mentioned, is set up to take that same structure, then just iterate over the arrays for the parameters, and of course iterate over the array of structures, for the given mesh, using a Dynamic Material Instance that it creates on the fly, and returns.
But in terms of Materials, all materials have the same base set of parameter types, Scalar, Vector and Texture (these are the only ones that Epic allows us to have access to, The Static Bool Switch parm type, we cannot touch, and it really sucks, because with that one, a person could flip on and off at will, entire subportions of a Material, that’s where the real power would start). Of course some people would want access to the Font Parameter type as well, but we don’t have access to that either.
The reason I really wrote this node, was in (shameless plug for my spline product, and the associated blueprint library i’ve talked about), I open up all the parameters of all the materials. So let’s say, a person wants to generate foilage, or generate stairs, or an escalator, or a road system. doesn’t matter. They have access to the material parms. So instead of creating Material Instances, they just use the product, to set the parameters. remembers em, and sets em and off they go. But it allows changing of them during game time as well, etc. continued…