What is Tone mapping ?
I have been thinking about making something like this for a while…
If you are not familiar with color grading, tone mapping and LUT files, this is a technique that allows you to change each color value of an image by a new one.
Basically you replace a neutral color palette (contained in an image called LUT file) by a new modified one.
This is used in movies, and in games, to set or change the mood of a scene :

Here is an example of a neutral LUT file for video games:
In this image, you have 16 values of each channel (RGB)
And here is a modified one:
My first tests…
Color grading is applied as post effect, but I was wondering if we could thing think of applying it directly to the textures, by adding a “tone mapping” substance to your graph.
It would not be as easy as a post effect, but it could be helpful in some low-end devices: not having to calculate a post effect for each frame could save some precious resources.
Furthermore you could use it directly on a picture.
Therefore I made some tests within Substance Designer, and I managed to get something interesting so far :
It works well, but I still have some artifacts, that I have hard time to remove (basically it is when the value is close to one of the small squares border).
As you may have guessed this effect is done with the Pixel processor node : I will do a tutorial about it as soon as I am able to fix the artifacts.
So far the only solution I see is to slightly offset the value if I am directly on the border. But it may be tricky, as I have to choose the correct “side”, or the value will be totally wrong.