Jump to content

Guide: Custom LUT creation with ReShade and Gimp 4.10


Arse22

Recommended Posts

Custom LUT creation with ReShade and Gimp 4.10

By arse22 on Oct 30,2020

 

 

Intro

 

First I will cover some basics, for those who don’t know what a LUT is and why you would want to use it as part of your Hook/ReShade setup.

A LUT is a .png file which contains color information used by the game. Using a ReShade shader we can change the default and override with our own settings, creating changes we want in-game without any cost to FPS. In fact, the strain on your system is greatly reduced on account of the fact that only the color itself is changed and color-related shaders do not need to be loaded at all. You can of course, load some to make further tweaks, but personally I prefer to make such edits afterwards and in another program.

Why would you want to do this? Besides saving you FPS, the power it offers you is easy to underestimate. In truth, everything is color, even shadow and light are created by color and modify color that produces any image. The color changes that can be made are fairly complex and remain uniform, saving you time to have to mess with the settings in-game. Essentially you will create a ‘preset’ of color in your favorite image or photo editing software and apply it directly in game, while giving you performance boost.

 

Pre-Requisite

 

-Image/Photo editing software such as GIMP or Photoshop. I am using Gimp 4.10.
-Latest Hook and ReShade installed and working. I am using H5free and ReShade 4.8.1.

 

Basic LUT

 

LUTs can come in different configurations and sizes, but the most common is 32x 32x32. That is 32 tiles of 32x32 pixels.

For this tutorial I will provide and use 64x 64x64 LUT and show how to configure the shader to use it.

Here is the default LUT we will be using. I don’t know the technical details but 64 creates a nice 4k LUT and I read that any higher is supposedly ineffective in current games.

LUT.thumb.png.69d7e673501b56bcf83da85ec8d8d2ee.png

 

This is a basic LUT, when you enable the shader that applies it, no change will be made because it’s the default colors. It is a good idea to test this in your game.

So, download LUT.png above and place it into your reshade-shaders/Textures folder. Make sure the LUT you downloaded is 4096x64 dimensions.

Backup and overwrite the existing one if you already have one in there.

0_dir.jpg.5534bd48d2f72a073aad018ead806e79.jpg

 

Then, make sure that in your reshade-shaders/Shaders folder, you have a shader named “LUTTools.fx” and if you don't have such a shader, search the Shaders folder that ReShade installed and move it in.

This puts it into the active shaders to be loaded by the game and this is the shader we will be using.

In my version, it was originally installed into a sub-folder called Fubax.

If you still can’t find it, you can probably download it through Google, directly from the author.

1_dir.jpg.4853d34714af8c2cdbb6cc522cc87a44.jpg

 

Open the file LUTTools with a good text editor like Notepad++, because it’s hard to see in Notepad.

This is the changes we need to make, so that the shader reads our LUT file as 64 tiles.

Change the name and both instance of 32 to 64.

2a_LUTname.jpg.3ac2839616af421f6227f4aed11ef150.jpg

lutsize_edited.jpg.8de5ca1b4fedc9518770b30b8bc658b0.jpg

 

After you made these changes, save the file.

You are ready to load the game.

 

 

Loading LUT with ReShade

 

Once it is loaded, hit F5 or whatever you have configured your ReShade window key-binding to be.

Then create a new ReShade preset or just turn everything off in your current one if you don’t care about it.

You will see two options for [LUTTools.fx] :

‘Display LUT [LUTTools.fx]’ and ‘Apply LUT [LUTTools.fx]

You can safely ignore ‘Display LUT’ because that is used to create LUTs through the shader and this tutorial uses a different method and we will not be using it at all.

Enable ‘Apply LUT [LUTTools.fx]’ instead.

3_shader.jpg.abb8d1c84b911fd57ba4acefb516ad29.jpg

 

You won’t see any change and that’s good, as I previously explained, the LUT provided is a ‘default’ one that you will want to make a backup of if you don’t want to rename the one you will apply into game.

I prefer to name my LUTs different things and change the name inside LUTTools.fx.

When you make changes to the shader .fx in this way in text, all you have to do to apply the changes in-game is hit reload at the bottom of the ReShade window.

3a_reload.jpg.8ebd5996ece1d3755bb52b4f8536c33a.jpg

 

Finally, what you want to do is take a picture or two with ReShade shaders turned off, just some screencaps of your game with just your basic Hook settings and no other shaders, as we will be using it to create a new LUT in the next section.

 

 

Creating a New LUT

 

Open the screenshot in your favorite image editor in its own layer and place the LUT.png you downloaded earlier into another layer.

Adjust the screenshot so the LUT is at the top if you want (I did this in the pictures,) but it doesn’t matter, whatever is convenient for you.

Then make a copy of the LUT layer.

4a_copies.jpg.819512948520b09994b9a9f1e0faad72.jpg

 

Now merge the LUT layer with your screenshot and hide the copy.

4b_behind.jpg.577c0f4f3c6bddb20c90ddb15f569f99.jpg

 

You are ready to make changes to your LUT and you will use the screenshot as reference.

Remember, only COLOR changes can be made, that means no blurring or outlines or any other such effects will work and may potentially mess up the LUT.

So, only change colors and saturation and settings of the sort until the picture looks good to you or what you want to achieve with your LUT.

4c_change.jpg.d46c177e7d31bcc1150d327d179f54de.jpg

 

Now that the LUT has been changed, we are ready to crop it out. In GIMP I used Magic Tool on the hidden copied layer to get the exact size and then selected “Image->Fit Canvas To Selection”

4d_magic.jpg.297bef9fcd3ae3c32dde9fde0b8dcfec.jpg

4e_fit.jpg.e7a165f73dbd19e240cf16c9d9fd73bd.jpg

 

Finally, you are ready to “File->Export” the LUT and name it.

When you are exporting you want to make sure you export as .PNG and that there is NO compression of any kind.

Name it “LUT_new.png” and export into the reshade-shaders/Textures folder.

4f_export.jpg.faeb18fa7d3b81751c65c6a3c9c89caa.jpg

 

Make sure the LUT is 4096x64 png and in the proper location.

Here is the LUT that I created in the pictures of this tutorial:

 

LUT_new.thumb.png.38ed1b4f2c44c2a461c2c635dba36557.png

 

 

Loading the New LUT

 

Just in case, here again is where you would change the name in the LUTTools.fx to have the shader load it, instead of the one we changed it to in the beginning of this tutorial.

5a_lutname.jpg.18559afc69922ca166a753956093270f.jpg

 

When you apply the new LUT, your UI will change color too, this is normal.

And here is an example of how it looks applied in-game.

5b_ingame.jpg.d06f9a865378d516bdbd85e0f5738706.jpg

 

It is never 100% exact for me, I’m not a pro, because the LUT is very sensitive and applies every change and even the slightest changes by the saving process or something like that.

The changes the coloring of the LUT are relative to the image used, so any difference between the screenshot and the game will be reflected in the applied LUT.

In the case of the example picture, the lighting I used is darker, the actual LUT worked perfectly because I only did some basic steps to turn everything blue.

This aside, we can see the potential power of using this method to apply LUT. Graphical changes straight from your GIMP or image editing program, directly into game through only color.

 

Tips

 

Not every LUT needs to be as dramatic as the one in this tutorial. I only did this to make things more clear.

When you use a screenshot to compare while you color the LUT like we did in this tutorial, it's good idea to use a collage of multiple screenshots, preferably from various settings and Hook lighting setups. Hook and backgrounds can add color too, so it has to be taken account.

The more extreme the LUT, the more likely it will not work in every scene, causing color errors and if you have multiple picture for reference while you’re making changes and be able to detect the problem.  

In particular I would try to use as many different shades of color that are usually in your most used settings, to try to adjust the LUT to fit as many of them as you can. This is not really a requirement, it’s just something to experiment with.

 

In general though, I would say it depends on what you are trying to achieve. Some LUTs can be used to create a nighttime effect, another for a de-saturated “mech” setting and yet another can be more general and work with most scenes, or an old photograph, or maybe you like the particular color errors you found and want a “glitched-out” effect for some pictures.

Ideally you have a LUT for every job, they allow your pictures to look uniform and unique in appearance without having to guess by hand every time since the color adjustments are applied with code.

 

Which brings me to the last thing:

Another powerful tool for GIMP is a filter suite called G’MIC, which can be downloaded free : https://gmic.eu/

It also includes a filter called “Simulate Film” which actually allows you to apply exact color presets from a wide variety of cameras, consumer to pro, rather than making changes by hand using this method. You can find the filter in G’MIC under Colors section, once you have it installed. The LUTs you create with it will give your screenshots a more professional quality.

6_film.jpg.bf57da899c2ba4c1061d5d5df8cbd272.jpg

 

Also it has other color-related filters, including various “color transfer” effects which allows mimicking the specific color scheme of any photo, screenshot or painting to some degree.

 

 

Things to Remember

 

  • When customizing a LUT, make sure to only use color settings and filters, many experienced users only use ‘Levels’ to make their LUTs and nothing else, but anything color-related is ok.
     
  • The LUT is PNG color data, it cannot record and interpret code of things like blur.
     
  • Color changes made to the LUT are relative, so if you change your screenshot a lot before using it as reference to the LUT, you may get unexpected results, without those exact settings in-game.
     
  • Rooms can have unique Hook lighting that apply color and potentially not work with a LUT if you didn’t use it as reference.
     
  • Other things like ReShade settings, such as ones that change color. As long as you are using it in the reference screenshot, you can make sure the LUT will work, but depending on the changes you made, it may not work that well without.
     
  • When creating a collage of screenshots to use for reference in creating new LUT, it is a good idea to include a variety of colors, lighting and maybe even shaders that you want to test out. This allows you to more easily see where the LUT can be best utilized and where it will have problems or won’t look good.
     
  • If you made a new LUT, don’t forget to change the name in the shader .fx file and hit reload in the ReShade window if you already opened the game.

 

 

Conclusion

 

I created this tutorial because I noticed that a lot of Hook presets do not have this shader included or any LUT shaders for that matter. There is a way to do it through H5 as well, but I prefer to use Reshade since that is the settings I work with most, I never touch my H5 settings at all. Hopefully it was helpful to someone who may not be familiar with the power of such a common and IMHO fundamental method of graphic enhancement.

 

 

Link to comment
Just now, _K17_ said:

Thank you for this very detail information on LUT.

Even if I don't use Hook personally, I find this very interesting.

I'm not entirely sure Hook is even needed. I bet you can run ReShade by itself with only this shader and get the benefit. However, don't take my word for it, I never tried.

 

If you manage to do it though, you will miss out on all the bells and whistles that Hook offers like placing objects and the like.

Link to comment
5 minutes ago, Arse22 said:

I'm not entirely sure Hook is even needed. I bet you can run ReShade by itself with only this shader and get the benefit. However, don't take my word for it, I never tried.

That is even more interesting, we will definitely need to look at this in the Future.

Link to comment

I use reshade with opengl and it works very well.Except of shadows it looks like hooked directx to me and its highly adjustable and there exist tons of shader files to make use of like technicolor,blurr,sharpen,tone(very interesting) and so on.In most cases i use rehade with opengl instead of any hook basic.

Link to comment
  • 2 months later...

Hello Arse22, I want to ask you something unrelated but I installed ReShade and I'm getting a pop up message at the top left that says to press "Home" to finish tutorial. Do you know how to go about fixing this? I pressed my Home button but nothing happens. I also tried Shift + F2 but nothing happened. Any advice is greatly appreciated. 

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use