It seems that there is a serious color difference in the orange color?

I’m a newbie. I’m not an expert in this area, but when I want to color my material, I always get a lighter render than I expected - especially orange:

I’ve seen some comments about setting the color space to linear, but I don’t see any setting for that in the engine,. What settings should I adjust?

More intuitive examples:

Maybe sRGB issue?

OK, so after learning about color space, I think I’ve figured out the issue.

So here’s the bottom line: I think the issue is that under Lit Shading, the Material’s Color value seems to be directly used as a Linear Color value without conversion.

That means, even if you create a color constant node, pick a color (which is in sRGB), and plug it into the Material’s Color, the shader just treats it as a linear color and uses it directly in calculations. Then, when calculations are done, it converts the final result from linear back to sRGB for display — this causes the color to be incorrectly double-mapped into the sRGB space, which makes the output color appear washed out and lighter than it should be.

I tested this in Unreal Engine. I first connected the sRGB texture to the Base Color input (which expects sRGB) in the standard way, and it worked fine:

Then, to reproduce the issue, I deliberately treated the sRGB color value as a linear value, and ran it through the sRGB conversion formula (so it’s “sRGB To sRGB” actually):


As you can see, the output turned into this funny yellow color,

which is pretty much identical to the result I got in the Flax Engine:

So, back in the Flax Engine, I applied the formula to convert the sRGB color to linear. Now, the output basically matches what I expected to see:

There is one thing need to note: in the Unlit View, the rendering result looks correct and colors appear as expected:



comparing:

Yes, I was just writing about my discovery :joy:

I think the sRGB option in the Import Settings is broken. I don’t see any difference whether it’s on or off.


Here is the texture I used :grinning:

Isn’t this just lighting setup?

Imported with sRGB and debug viewmode of Diffuse from GBuffer:

Maybe it’s sth different…

Yes, it looks fine in this view, but it looks different in Default Debug View, as you can see in the material thumbnail in your content:
image

Okay so I went over rendering pipeline with some debugging and there are couple of things:

  • default ACES tonemapping leaves colors washed out a little bit thus it should be countered with Color Grading (latest Flax Sample projects for upcoming 1.11 update have some tweaks to look even better),
  • Eye Adaptation can have significant effect on those colors too (somehow?),
  • there migh be some missing sRGB <-> Linear space conversion,
  • default lighting setup (esp. sun light) are a little bit yellow so they bump up this yellowish.

I haven’t found an immediate fix, since we’re just before 1.11 update I have to move to other things but I’m sure we will need to fix it at some point.

I don’t think the problem lays in texture data or material output but rather post-processing.

1 Like

@NeuromancerLeo Hello, I did more testing and you’re right, the sRGB import option on texture doesn’t work as it should. It changes storage format of GPU texture between sRGB or Linear but it maintains the input values while it should properly apply gamma instead.

I’m working on fixing this but it will be for 1.12 update as it’s a breaking change which will need more testing and some migration guide for existing projects.

1 Like

Fixed the color space issue for Flax 1.12 update (on branch 1.12). I added new Gamma Color Space option to Game Settings which controls old -vs-new logic. It’s in Gamma-old mode for now until we make it smooth and fully working but you can start using it now by switching to Linear color space. Then textures marked as sRGB (common color maps) are using proper encoding and output image is converted back to sRGB for display which makes it 1:1 like un UE5.

Thanks for bringing this issue up.

2 Likes