[4.7 P8][UMG] Material Parameter Collections break materials used in UMG

UMG widgets that use a Material that is itself using a Material Parameter Collection will not display correctly. It screws up whatever the parameter is ultimately plugged in (opacity, color, etc).

I noticed the problem on a fairly complex material but was able to reproduce it in even the most simple setup as shown below.

In the example, “TestScalar” has the same value as the 1 constant. If the constant is what is plugged into the Emissive, the material shows up correctly on my widget (white). If I plug in the MPC in the Emissive, the widget is completely black.

30620-2.png

30631-3.png

I have the exact same problem! I want to add that this problem occurs also with the latest stable release 4.6.1.

Hi everyone,

I was able to reproduce this on my end and have entered a bug report, UE-10566 to be assessed by the development staff.

Hi ,

is there any progress regarding this bug?

Hi XNAShaker,

Unfortunately this has been backlogged for now as our resources are currently dedicated elsewhere. I have bumped the community interest on this bug report, however I would not expect a fix for this error any time in the near future.

In my opinion, Epic should take more care of bugs of existing features and less churring out new ones.

This is a pretty big issue for our team at the moment too. Any word on it?

Hi HighlySpammable,

Unfortunately, as stated before this has been backlogged and probably won’t be addressed in the near future. I don’t have a timeframe of when this will be addressed, however I wouldn’t expect it in the next few months.

Hey, I’ve had the same problem, but for me setting the material to ‘unlit’ fixed the issue. Maybe that helps.

While this is still an issue, the following work around might help.

On the Event Construct node in the Widget blueprint, create a dynamic material instance for each material that needs to use a collection parameter. Replace the collection parameters in those materials with regular material parameters. Then, in the Event Tick node, you can call “Get Parameter” from the material parameter collection, and manually update the values in the dynamic material instances to match the value in the parameter collection.

It’s not pretty, but it allows you to use parameter collections to set the values, rather than direct references. The functionality is there, it’s just a little awkward to set up.

That said, it would be nice if Epic put some bug fixing and cleaning up work into the areas that really need it, such as UMG widgets.

Another workaround if you’re just using it for changing a couple UMG colors at once (not for runtime changes). You can replace all your collection params or vector params with a material function that contains your default values as preview. Then just change the default values in the MF when you want to adjust globally. That’s what I did to drive things like button background color and button border color in my project.

I think I have the same problem. I have materials for all HUD marker types, deriving from one base material which uses a Material Parameter Collection for picking different colors if color blind mode is enabled. The routine that draws the markers is in C++ where I draw them with DrawMaterial(). Changing parameter values in the collection does not have any impact. The changes do not arrive in the material instances used.

If this is the same bug and obviously reproducable, then I wonder why it is marked as “resolved” and “unable to reproduce”:

Hi HCK,

  • Does this occur in a clean, blank project with no additional content?
  • What engine version are you currently using?
  • What steps can I take to recreate this on my end?

Hi! Thanks for the fast reply.

Yes, it occurs in a clean, blank project.
I’m currently using Unreal Engine 4.12.3.

Here is a very lightweight project I created to demonstrate it:

https://www.dropbox.com/s/1yzz2tgsucv8nbc/MPC.?dl=0

I did some further digging and found that the “No repro” comes from our internal testing, which is on a later build than 4.13. This may be fixed in a later engine version but was fixed by a separate change, not something direct.

Tried that with 4.13.1 and it’s still not working.

Hi HCK,

The no repro was in 4.14, not 4.13. It may be fixed by the next release. If it is not fixed within that release, please let me know and I’ll be happy to take another look.

Ah, ok. Thanks again.

Hi! Wanted to let you know that it’s still not fixed in 4.14.3.

Hey HCK,

Since this issue is a little outdated, and the bug entered has been marked as resolved. For tracking purposes, would you mind creating a new answerhub post with all the details of your specific issue and how we can reproduce it in a new blank project?

This allows us to better manage the issue as a whole, and if these are possibly unrelated. Just respond with the link to your newly created post and either myself or another team member will assist you.

Thanks,