Multiple Dynamic Material Logic Help Needed - Color and Fade

In hopes of being as clear as possible:

  • I have a character mesh that as 17 separate materials.
  • 6 of the 17 have Player Controlled Vector Parameter Color being fed into them. It is the same structure fed color for all 6 materials. (material parameter collections aren’t working since they are global not per actor)
  • All 17 have an “Opacity Dissolve” Scalar Parameter to control a fade out/in of the mesh. It is the same Scalar Parameter being fed into each of them always.

What I think I need to do:

  • Make 17 separate dynamic material instances for each material so I can control the parameters inside when I wish.
  • Set Material (node) for each? This is confusing since it seems to work without setting each.

What I hoping I can do:

  • Have some sort of Material Function I can call in on each material to only do it once - but how do I made a material function dynamic? or…
  • Have some sort of parent material that controls the parameters so I can just create a dynamic material for that one - ONCE and use it to drive the children materials. Not even sure if this is a thing?

Advice on a smarter way to do this?

It’s a thing, that should work for this:

A MaterialParameterCollection is an asset that stores an arbitrary set of scalar and vector parameters which can be referenced in any Material. It is a powerful tool that artists can use to get global data into many Materials at once.

I was under the impression that Material Parameter Collection are global variables? If a player changes those parameters do all other instances/children change as well? e.g. other players using the same pawn with the same materials.

If a material is using the MPC param, it will be affected, yes. I might have misunderstood the setup.

Yeah, all players will spawn in this BP, so looking for a way to get the parameter per instance, without having to set 17 variables each time.

Did you find an answer? I have a similar need with how to handle 5 Colors of Material instances or Dynamic instances.

I have modular armor.
Tops, Legs, Boots have a different texture set, thus a different Instance of a Master. Some use even different Masters for Panner sets. But they can all use the same Parameter named “Color1.”
I have the parts setup in a Data table. Each has an SK with the Material Instance already applied.

  1. But Im not sure the best way to handle multiple color variations, e.g. am I supposed to make 5 copies of each Mesh, then preassign a different colored Instance?
    And then make 5x rows of Tops, Legs, Boots in the Data Table, and each points to the different Pre-textured meshes?

  2. Or make 5x DT rows of Tops with now a White MI (with colorize-Mask zones), but a different Linear Color code for each, also in the DT row? (And the BP of the Armor Part Actor reads the Linear Color to set its Dynamic Material on BeginPlay/Construct?)

  3. Or is there a way to keep my DT small by making only 1 DT row of each unique Mesh design - with a White MI assigned (with colorize-Mask zones). Then somehow use another DT color table to apply the Linear Color to the Vector (Color) Parameter of the named Material? (This would work for random Armor Colors/Stats. But not sure how to assign Red armor to a specific Stat, also read in the DT row, yet be a different Stat-value than the Blue Armor (both using the same Mesh design). Or maybe combine a DT with 1 row of each Mesh design (using the default White MI), then somehow assign a color, and Stats come from a different DT.)

It seems for option 1, 2, or 3, I still have to make 5 Dynamic or Instance Materials. How did Fortnite handle the multiple color variations of the same weapon mesh?

Can the player wear different tops and legs, etc…from different texture sets?

Yes.
Some tops/legs use the same Material to match. Others can mix top1 with legs 2. Or there can be a colorized version blue top, red bottom of the same Mat, different Color Param.

Edit: PS I am able to save only 1 Mesh version of each armor part (instead of saving 5 color versions of an armor top). (I do a new method where every Mesh part has a White based Master material.) But I need the 5x Data Table entries to set each Color, and set the stats based on Color. E.g. Red for Fire bonus.

So back to my question, do I really need to make 5x DT rows (Colors) of every armor body part and unique mesh, just to have different Colors and stats? Because the total body parts per Armor set would be 6.

So to get 5 colors that would be 30 DT rows (5 colors X 6 body parts), per one unique Armor design (matching Meshes, but in 6 pieces).