Importing grey scale image or just looking at the alpha (or any channel ) is the incorrect value in engine.

Importing grey scale image or just looking at the alpha (or any channel ) is the incorrect value in engine.

For example… if the alpha grey scale value is supposed to be around .5 of the color…
it ends up being R= .144 B = .144 G= .144… added together for a full value if .432 … which is not .5… very problematic if you need very specific exact ranges. Any idea why???

Try enabling or disabling SRGB in the texture options inside UE4 :slight_smile:

I beleive I tried that already… even tried importing it as grey scale… or HDR… just for the hell of it… still the values are always off per channel. My guess its some sort of bug that everyone overlooked and no one ever noticed. Hopefully someone lets me know if im right.

Unreal to Photoshop

0 = 0,
.122 = .25,
.147 = .50,
.418 = .75,
1 = 1,

Why is this???

Hi Kurylo3d -

Textures are corrected in the engine by default from a straight linear color (0=black to 1 =white) to a gamma corrected color to allow for the color gamut to correct display on most monitors. So what this means is that if you were to pull the float3 information will be getting values which account for the gamma correction done to the engine.

There are two ways around this which will give you the straight linear values from the texture. One is to “un-correct” the gamma by taking the texture and raising it to the power of (1/2.2), where 2.2 is the approximate amount of gamma correction applied to the texture. This would result in a value equivalent to the linear color of the texture.

The second way to get the linear color value is to make sure that the gamma correction does not occur, which means you will want to go into the texture and uncheck sRGB as Luos mentioned above. This will result in outputting values entirely in a linear nature.

In both examples it should be noted that Float Point Precision will come into effect and the numbers output by the texture will be calculated and may be within a modest range, so .25 may come out to 0.2498 or 0.262. The precision will be more affected by the extra math needed in the first method.

I have attached a sample project showing the setups I am referring below.

Thank You

Eric Ketchum

Test Project 4.10.4

Hey eric, i have tried making the texture HDR and unchecking sRGB… what that deos is give me the correct values for RGB but Alpha is still messed up.

If the texture is normally compressed and i uncheck sRGB it does nothing.

Hi -

I have updated my test project with a HDR Texture with information in the Alpha channel and am still getting expected results.

Test Project 4.10.4

Dont know what to tell you… i am not getting expected results. im using 4.10… i will try out your project soon, but as for my textures and project… simply is not happing. I check with the eyedropper tool inside the texture window to see what the color values actually are when viewing 1 channel at a time.

After trying your project… the color values are also incorrect. Try using the color picker for example when u click on padding color use that eyedropper on the screen and watch your values are all incorrect for all of your texture… srgb or not. like the 25 per grey goes out to be “0.522”

The only time your texture values are correct is when you switch them to HDR compression. Though they are also reversed, 25 = .75 … but thats just naming them wrong i guess. Again though without them being set to HDR… the values are incorrect… and HDR doesnt with srgb off doesnt help the alpha channel itself.

Anothing thing i dont have substance plugin, im just testing straight up from the textures u have in the project and the texture editor/importer window.

And unfortunately the material editor sees them with the values i see them at when it comes to setting up a range of greyscale value to create a mask from.

Hey Eric, Here is a screenshot as proof of what I am seeing. Your 25 value is not 25.

Hey Eric, Have you ever encountered anything like this at all? As i said… the sRGB option does not change the appearance or color value at all for me… Switch from normal map to default does change the appearance, but obviously srgb does nothing on its own… or as a mask … or as default…

So… is this being documented as a bug? Or are we just ignoring this problem and hope if we dont respond long enough it will go away…??

any update on this? still doesnt work to uncheck sRGB…

That flag does not apply to alpha channel

Since you’re getting ignored on this thread I asked the same question myself on the link below, check out Daniels answer, it is correct :slight_smile:
https://udn.unrealengine.com/questions/455187/alpha-channels-broken-forced-gamma.html

<_< that link only works if someone has access to UDN, and not everyone has access to UDN.
So that is kind of pointless.

yea i dont have access to that link either

Oh weird, I had marked the thread as visible for public. Anyway the answer is to turn on sGray in photoshop settings, it’s actually photoshop that is applying the weird gamma to the alpha when you copy your texture over to the alpha channel