Is there any way to get the exact colors from textures for In-game Displays?
If I view the scene “Unlit”, UE shows the exact colors of the textures, but as soon as I switch back to “Lit”, the textures look totally different. Even if I change the shader to “Unlit”, the Material gets somehow affected - not by lighting but I suppose from tone mapping, exposure and other post processing stuff.
I tried to set up a post process material with custom stencils to color correct the textures to extract the original colors but my results don’t work yet…
Hmm, what you are trying to do is rather difficult and at the same time very simple. So if I may break it down perhaps you can find a proper outcome. Let’s start from the beginning:
The screen you are using will determine how many colors you can see. There is a huge difference in the color spectrum depending on the monitor and most often price. Here is a good breakdown on how screens work with colors: How Many Colors Can a Computer Display? | EIZO
If you want to create a texture in Adobe Photoshop, you will be able to chose from a whole lot of settings before you start working, and when it is time to export. The start settings you may chose can be anything from the resolution, to the gamma and color profiles. This will affect the colors in the image. When you then export the image, you can export the image with a color profile, alpha and select compression depending on the file extension you end up choosing.
When you import your texture to Unreal Engine, the texture will converted into the .dds format. Depending on how the colors and channels, Unreal Engine will automatically determine the compression and format. When you are at this stage, it is important to alter the format and compression to make sure it fits the texture purpose. Here you can read more about the different formats: Texture Compression Settings | Unreal Engine 4.27 Documentation
Most of the time textures use sRGB. If you disable this, your texture colors will often match the result you have in Adobe Photoshop. Unreal Engine also uses a pass inside of the post process settings, which will further alter texture colors. If you want the texture to be completely “reset” to the way it looks in Adobe Photoshop, you will need to render the scene with lit and disable the filmic tone mapping. I think that should do it, however there could be more things you need to account for.