Material parameters made easier

Hi,

So I had this idea of making it easier to structure material parameters. As a scenario, say we have a material where we need these input parameters:

  • AlbedoControls: vec3
  • Specularity: float
  • Tint: vec3
  • NormalStrength: float
  • RoughnessStrength: float

As of now, we need to add them all separately in the material graph. But perhaps it could be useful to be able to create a data type as a sort of “template”, to quickly generate parameters for a material. I would then do this:

  1. Create a Material Parameter Group from the above-mentioned
  2. Add this group to my custom material
  3. Create a material instance and override as needed

For number 3 especially we could benefit from:

  • automatic sorting priority!
  • automatic sub-grouping!

Especially for creating landscape materials where layers share many parameters, the current workflow can be quite tedious. And we need Tint_A, Tint_B, Tint_C, etc., for each of the landscape layers. I would argue it better to place it in a struct and have the struct bear the name “A”. Then, an automatic sub-grouping system would make sure to distinguish between A->Tint and B->Tint.

Fortunately I’m really new to Unreal engine, so I have a pair of untrained eyes and my intuition as a software developer.

============
I just tried the MaterialParameterCollection, and it “kind of” does what I was imagining. But I’m still missing some things:

  • More precisely specify types, like float2, float3, texture (would be particularly useful), etc.
  • Give names to channels in a texture, e.g. making a vec3 “AlbedoControls” and being able to write R=Saturation, G=Brightness, B=Contrast.
  • Drag it into a material graph and get an output pin FOR EACH of the parameters, instead of just choosing which one (not strictly needed, but it would be nice to have that option).
  • BIG ONE: When I create a material instance for the material, the parameters are not shown, which imo. defeats the purpose of having such a type.
    ============

I hope my inputs are useful. Have a nice day!