Linear RGB in UE4

Hi there,

Note: I searched all over the net for a solution to this but couldn’t find anything helpful really, so just opening this thread for those handful of people who search in google for the same issue. :slight_smile:

I’ve been having this issue for a while where I choose a color in a vector parameter in material editor, the color palette is in RGB but the output is in sRGB. Always giving you a whiter color output. For example, many of my materials need a flat normal color for a certain area. Due to 0.5, 0.5, 1 not giving me a correct 128,128,255 normal color I always used to use a FlatNormal_N.png in my projects. But I just figured out a very little trick to get exactly the colors you pick.

Hope this helps.


Oh my gosh. Wow. This is it! This totally fixed the “washed out” look we were getting.

No matter how many settings we changed to get the absolute most unlit scene possible (unlit materials, post processing, etc), the colors we chose were always being changed by some mysterious force. This completely fixed it in one step.

Thank you!

@UE4: I have seen this issue in the AnswerHub. Hope you’ll refer to this thread or trick, cause this really helps. I also wonder if this is color changing is a bug, or the result of an engine design choice? If a bug, is a fix being worked on? If not, can you explain the reasoning behind it (just curious). I love this engine, but this was definitely causing us, and I think is causing others, some frustration.

Isn’t that the same as enable Use Legacy Gamma in the Textures settings?

I think that is the same, but this enables you to do it on the material settings for certain color. Is there another way to do it Numbat?

Legacy Gamma didn’t fix my problem - but this did!

Another issue I had (sidetracking on the same washed out theme) was that my render target textures were coming out washed out.

This was fixed by setting them up a little more thoroughly:

RenderTexture = PCIP.CreateDefaultSubobject<UTextureRenderTarget2D>(this, TEXT("RenderTexture"));
RenderTexture->ClearColor = FLinearColor::Black;
RenderTexture->SRGB = false;
RenderTexture->bHDR = false;
RenderTexture->bNeedsTwoCopies = false;

Should be 2.2, but other than that, yeah, I have conversion functions to-and-from gamma space. It’s mega helpful.

Maximum-Dev i am facing the same problem
can you explain your solution?

3d widget washed out problem

Can someone explain exactly what the OP means in the solution?

Not sure why part of my post is not there.
But you can connect your color to a Power node with a value of 2.19. I know theoretically it should be 2.2 but 2.19 gives more accurate results at least in my case when I tested with color picking in photoshop.

1 Like

So found this post after trying to find a solution to my text render colour not matching some of the mock-ups used by our artists. Used 2.19/2.2 and it gave me reasonable results, but also found an article about the different forumals available.

For a cheaper method, you can use:
[FONT=Courier New]C_srgb_3 = 0.585122381 * sqrt(C_lin) +
[FONT=Courier New] 0.783140355 * sqrt(sqrt(C_lin)) -
[FONT=Courier New] 0.368262736 * sqrt(sqrt(sqrt(C_lin)));

Hello, this is the perfect example of the issue I’m facing, maybe you’re having the same one but haven’t noticed?

Hmmmm…not talking about looks here, but plugging 0.5/0.5/1 powered by 2.19 into the normals gives me wonky results sooo…not really sure about this :S

What results you getting?

On the right I’m seeing the same color I used to see on my CRT screen. Color picking it with MS-Paint also gives the same expected 128,128,255.


I just posted a question in the answer hub asking how to get a completely flat color. How to get a flat color - Rendering - Epic Developer Community Forums
Is this thread at all related? It looks like it, but I don’t understand or see what the solution is supposed to be.