Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Texture RGB values

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:

alt text alt text alt text

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?

Product Version: UE 4.19
colorcreation.png (145.1 kB)
textureue.png (61.8 kB)
materialresult.png (134.4 kB)
more ▼

asked Mar 30 '18 at 03:20 PM in Rendering

avatar image

57 8 10 15

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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

Hope this helps :)

more ▼

answered Mar 30 '18 at 05:17 PM

avatar image

51 5 3

avatar image SerzaNT Mar 30 '18 at 06:00 PM

Omg, i'm dummy... This makes sense. I was just assuming that they will use the values in vector as 0 -0.255. Thanks!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question