I created a material using a simple battery image as the texture (see image below), with the image going to both the diffuse and opacity map, creating a white symbol and see through background (for a HUD). When I place an image in a widget and make the image the material, my battery symbol goes from white to black. Everything is default, and if I put the texture in, the colors are correct, but whenever I put in the material it swaps the color. How can I get it to display correctly?
Post a screenshot of the blueprint so I can answer you more contextually. I had the same issue with a material I made for an item pickup and it was just an issue with how I had the channels hooked up.
What I would do is open a copy of your battery image in your image editor and make all the white space red (RGB, 255,0,0) and the black space blue (RGB, 0,0,255).
Save it as a separate file, import into unreal, drag into material. Use Blue channel as opacity mask. Let me know if you try it.
I did what you said (made a red/blue version for the opacity mask and hooked it up) but if I use the blue channel it does it in reverse. And when I switched to the red channel, the opacity worked but the end result in the widget is still black when it should be white.
My material looks like this (I did flatten it just for show):
I have no idea but the brush in the widget is black. Darn you technology
I’ve looked at more materials, and I think I can safely conclude that you need an emissive map to see anything. Materials with no emissive map always appeared as black squares (even default engine content).
Yep, I added an emissive map and everything working fine now. Matter’s closed I suppose.