Possibly very stupid question(I’m programer, pls dont judge me). I’m attempting to create logic based on color masking. Problem is, when I import texture with specific colors, the colors change in some mysterious way. For example:
I would expect to see RGB values at least close to original [50,100,150] but that is not the case. Instead there are some pseudo-random numbers when I plug my texture into material. I tried to fiddle with compression setting and others but nothing seems to be close to the desired result. I’m doing something wrong or these is some UE4 RGB conversion magic?
The values you are seeing are RGB color values represented as values between 0 and 1 (they are Vector3 in UE4) instead of 0-255 which is what most image editors use.
The numbers you are getting are the RGB values divided by 255 so:
R - 50/255 = 0.196
G - 100/255 = 0.3921
B - 150/255 = 0.5882
Since your texture has sRGB unticked in the texture settings, this is the same as if you would make a Constant3Vector with the same values.
BaseColor textures should be set to sRGB in the texture settings if you want the same color as your image editor.
You can use hex values if you want the same colors between UE4 and your image editor