I´m fairly new to Materials and stumbled over that Topic.
I want to do a Cooldown Overlay for my Inventory Slots.
I can Show and Hide the Overlay, the Overlay has an Image Covering the whole Slot, and a Text Widget, that shows the remaining seconds of the cooldown.
This is how i created the Material Instance in the UMG Graph:
At first, it all works as expected. But only, if i set the Color to white… or any other Bright Color…
This is the result:
The problem:
I want the White Part to be black, and the Black part to be fully transparent.
And over all, i want the whole Material to blend with the Parameter Opacity
Like this (Affinity Montage… Text is missing here):
Can someone push me in the right direction to achive the wanted effect?
In the first “IF” you have 0 and 1, which are respectively black and white. Use 0 instead of 1, and any color you want instead of 0, and additionally multiply your opacity by the result of IF.
To add a Custom Node, simply rightclick and search in the Context Browser for Custom
Add three Fields to the Input Array in the Details Panel and give them the exact Names: UV, Percentage and CCC
Make sure the Output Type is CMOT Float 3
You can rename the Node with the “Description” Field of the Details Panel.
Into the “Code” Line of the Details Panel (which is a multiline Textbox), you simply Copy & paste this inside: