I would like to make a crosshair which simply reverses the color underneath it, instead of overlaying a specific texture color. Is that possible?
Ultimately, I’m trying to make my crosshair always visible, but I have lots of bright colors, so no matter what I pick, it blends into something.
Suggestions?
unit23
(unit23)
January 4, 2017, 7:53am
2
I would like to make a crosshair which simply reverses the color underneath it, instead of overlaying a specific texture color. Is that possible?
Ultimately, I’m trying to make my crosshair always visible, but I have lots of bright colors, so no matter what I pick, it blends into something.
Suggestions?
Maybe put a 1 pixel border around the cross image, to have some sort of border?
Transparent material with scene color. Then just invert that color.
I will do that as a last resort. I really wanted a thin crosshair, and now matter how you slice it, a border makes it much thicker.
I don’t quite follow. Is there a way to tell a texture in a widget to “use inverse scene color”?
Take sceneColor node and then use oneMinus node.
@Kalle_H Okay, so I found the sceneColor node – it’s in the material editor. So I can make a material that is the opposite of the scene color.
How do I apply a material to an image widget? (is there some other widget I should use for the crosshair other than “Image”?)
From what I can tell there is nowhere to select a material for an Image widget:
&stc=1
Am I missing something obvious?
I figured out that you can select a Material for the target of a UMG Widget.
I tried using the SceneColor and OneMinus nodes, but I can’t quite get my material to work right.
This is my attempt that is just blank. How do I fix this?
&stc=1
This renders my normal crosshair:
&stc=1
This looks like it ought to work:
&stc=1
But it doesn’t. It appears SceneColor only works with Material Domain “Surface” and widgets only work with Material Domain “User Interface”.
&stc=1
No. I came to the conclusion that UE4 is really for large professional teams and abandoned it. There is not enough Epic/Community support for an individuals to get by, which this thread is just one great example of.
cullvox
(cullvox)
May 9, 2019, 10:56am
13
This is a year late but I have a better answer. Its possible to use a 2D Capture component as the scenes color. I put a capture component on my player charecters camera. Then I set the Capture Components material to a render texture material. After that I used the render texture material in a User Interface Material. I used a Widget with a picture and set the image to a material this material.
3 Likes