🌈Creating a LUT from scratch
A description of a streamlined, refined, accessible, and relatively easy system for creating Cyberpunk 2077 LUT mods from scratch.
This method is for LDR. Little to none is known about HDR LUT creation, so please, do not expect anything on HDR LUTs.
What is a LUT, really?
It's imperative to understand what LUT really is before starting. Often, beginners have a misconception caused by other software which often uses different formats for LUTs and different ways to apply them, such as ReShade.
Cyberpunk LUTs are distinctly different from ReShade LUTs due to two things:
They are 3D textures, not 2D textures with tiles describing different parts of the RGB cube, no, Cyberpunk LUTs are full-on 3D textures sampled with trilinear filtering.
They are applied with an input of ARRI LogC3 data with an sRGB color space. This means you can't go and use any ReShade LUTs, as they often do not expect LogC3 output. Along with this, many tools expect ARRI LogC3 data with an ARRI Wide Gamut 3 color space when generating your LUT. If you do not convert to it, you will end up with clipping colors.
But, aside from that, they are similar. Any LUT expects an input of a color, with an output of a new color. That's it. Cyberpunk's implementation is as simple as extracting the pixel out of the LUT texture that matches the input color, and if there isn't an exact match, it interpolates linearly to get a near-perfect approximation of the true output color.
If you're still confused, I recommend looking at this.
Prerequisites
You only need to complete this section once.
You can check out nullfractal's github template. It contains NVTT settings, DaVinci Resolve and WolvenKit projects along with LUT file templates to play around with.
You can't download the NVIDIA texture tools from the official website without an NVIDIA account that participates in the developer program. We've put a backup of the executable on the wiki's github repository — you need to decide which is the lesser evil, yet another account or downloading a random .exe from the internet.
Workflow
WolvenKit
Create a new project in WolvenKit and import the file base\weather\24h_basic\luts\cp2077_gen_lut_nge_v017.xbm
and export to a DDS, then rename it, removing the xbm
file extension. You should have a dummy name with a file path containing that same file in the "raw" folder. You can delete the file in there, we only need the folder set up correctly.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252Fmr6tbHj5KX57ycOtzPo5%252Fimage.png%3Falt%3Dmedia%26token%3Df2e88f89-0174-4231-984d-c708425b862b&width=768&dpr=4&quality=100&sign=580ce086&sv=1)
DaVinci Resolve
If you have issues getting Resolve to run for the first time, uninstall the panels program. It causes crashes if you don't have any DaVinci panels or sliders.
Create a Resolve project, and head straight over to the Fusion tab, without importing any media. Add a LUT Cube Creator node, change the type to vertical and size to 32, 48, or 64. Remember this number, as you will use it later. Select for the generated Media Out node to output to both sides of the preview by enabling both of the circles below it. On one of the sides, select Views>3D Histogram. You should now have a LUT cube present. If you'd like more accuracy, right click and go to 3D Histogram and select solid with 1:1 sampling.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FYNCu0xc8zAUo694U8oDI%252Fimage.png%3Falt%3Dmedia%26token%3D20b64227-0c98-46f5-9491-a39d191894e1&width=768&dpr=4&quality=100&sign=1766712b&sv=1)
Right after the LUT Cube Creator node, add a Color Space Transform node, and matching the fact that tools expect ARRI Wide Gamut 3 with ARRI LogC3 data, but the game outputs sRGB with ARRI LogC3 gamma, we need to go from sRGB color space with ARRI LogC3 gamma to an output color space of ARRI Wide Gamut 3 with output gamma of ARRI LogC3
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252F59n5X53LwgEZ0A56Zct0%252Fimage.png%3Falt%3Dmedia%26token%3Daedf7a64-35a2-42f1-b3ba-9dd771598fe5&width=768&dpr=4&quality=100&sign=250135cb&sv=1)
After this, we need to go from this LogC3 data to sRGB, which is what our display expects.
ACES method (recommended)
This is the method used by the original game to go from the input LogC3 to sRGB output, so it's what's recommended.
Add an ACES Transform node after the Color Space Transform node. Set the input transform to ARRI LogC3 with an output transform of sRGB and use ACES reference gamut compression.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252F2Tu3DBkz9fbKRKryhlH7%252Fimage.png%3Falt%3Dmedia%26token%3D4251740b-1915-4af1-a285-fd46d9ccd566&width=768&dpr=4&quality=100&sign=7cfc7bff&sv=1)
ARRI LogC3 method
This method uses LUTs from ARRI themselves, and as such gives us two options: LogC3 and LogC3 "classic". I encourage you to use the normal LogC3 LUT, but experiment with Classic and see if you like it. Though, this method requires a change in the settings that are described later.
In the link above, select LogC wide gamut as the source format and destination format as video. Select your preference of ARRI Classic 709 and ARRI 709 in the conversion parameter. The file type can be either Blackmagic Fusion or Blackmagic DaVinci Resolve, it really doesn't matter.
Add a serial File LUT node and point to your downloaded file.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FCvVXkd9nC3zpKBlzd4JP%252Fimage.png%3Falt%3Dmedia%26token%3D7fbf8425-7f6e-4629-b4d7-415d0e38f87b&width=768&dpr=4&quality=100&sign=db4e8e95&sv=1)
ARRI LogC4 method
It may share a name with the LogC3 method, but is distinct from it as it uses a more recent revision of the color science compared to the LogC3 method, but we will need to change things before and after this step if you decide to use this method.
Follow the same link described in the ARRI LogC3 method section until you reach this part. Download the "ARRI LogC4 LUT Package".
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FFreiuypss4uU90plKO44%252Fimage.png%3Falt%3Dmedia%26token%3Dcb0c2964-cbe6-402b-8f52-9f252d2f5a2e&width=768&dpr=4&quality=100&sign=4241ed2a&sv=1)
Once you have downloaded it, extract the Rec.709 Gamma 2.4 65-point .CUBE file from the zip file. Add a serial node after the Color Space Transform called File LUT and point the LUT file to your extracted .CUBE file.
We have to make some changes to the Color Space Transform node, change the output color space to ARRI Wide Gamut 4 (instead of 3) and then the output gamma to ARRI LogC4. Your LUT should now look correctly exposed.
You can mess with the Tone Mapping Method, but just select None as a good option.
We need to change an option afterward that will be described later for both the LogC3/4 methods.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FfYyr04vZLZU4qedDrj6h%252Fimage.png%3Falt%3Dmedia%26token%3Da2aef89d-67de-41d2-8a4a-0af57b5372d5&width=768&dpr=4&quality=100&sign=43272175&sv=1)
Resolve Color Managed method
This method uses DaVinci's integrated tone mappers to go from the LogC3 input to sRGB output. It produces a neutral and accurate output. It's also very minimal.
For this method to work, we just need to change the settings in the Color Space Transform.
Instead of having an output color space of ARRI Wide Gamut 3, set the color space to sRGB and gamma to sRGB as well. Then, change the tone mapping method to DaVinci, or some other method if you know what they mean.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252Fwl4r8r5RadmsGLixMOk6%252Fimage.png%3Falt%3Dmedia%26token%3D7ef23f9c-0d0b-4af2-8f8f-c159a9f133d9&width=768&dpr=4&quality=100&sign=4e9973d0&sv=1)
This method creates a color cube that is very "unbiased"--it has fidelity in all directions, which, while creating a good representation of true color, can result in unnatural saturation. To account for this, the saturation compression gamut compression method can be selected.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FgUPcx5mVIKUN4y1gDbgB%252Fimage.png%3Falt%3Dmedia%26token%3D143dfcb0-ddea-4bbb-89fe-d447abf38043&width=768&dpr=4&quality=100&sign=f9bc1d77&sv=1)
After you have used your preferred method, you need to apply gamma correction. If you do not do this, you end up with incorrect gamma, which can mainly be seen on skin tones.
For the ACES method, you need to add another Color Space Transform node, with input color space and gamma of sRGB, with the output color space of sRGB but output gamma of linear.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252F5JsHmJZ6649Vx9Tx4WHa%252Fimage.png%3Falt%3Dmedia%26token%3D4f6a9c67-dd64-4f31-aad6-07d107a8420d&width=768&dpr=4&quality=100&sign=7a86913d&sv=1)
For both ARRI methods, nearly the exact same steps are taken as the ACES method, but, instead of sRGB input color space and gamma, we use an input color space of Rec.709, but input gamma of Gamma 2.4. Keep the output color space at sRGB and output gamma at linear.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FweoaUrU69xwZyzhIcIXM%252Fimage.png%3Falt%3Dmedia%26token%3Dd2127c16-3873-4966-b6da-b7e7758ead25&width=768&dpr=4&quality=100&sign=caba7a42&sv=1)
For the Resolve Color Managed method, simply change the output gamma in the color space transform to linear, but turn on Apply Forward OOTF.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252Ffp3ly6HEnmiBUYVTBizb%252Fimage.png%3Falt%3Dmedia%26token%3D56447ef0-f85f-4384-b812-61bad49f76d1&width=768&dpr=4&quality=100&sign=f07ca4df&sv=1)
This is the final stage. We now just need to output to an image, and use the right format. To do this, use a Resolve FX Transform>Transform node (not any other transform node) and switch on "Flip Vertical" to correctly output.
Right click on the LUT picture and save your image as a TGA or PNG file.
NVIDIA Texture Tools
Drag on your exported file onto the NVTT window and tick off "Generate Mipmaps" and select format as 32x4f. Tick off KTX2 compression and tick on DXT10 header as well turn on Highest compression quality.
Turn on "Extract From Atlas" and set "Depth of Volume" to the exact size of your LUT that you set up when first creating it. To verify you got it right, you should see a Z slider on the top right of the NVTT interface. Drag it and see if there is any vertical shift in the texture. If there is not, you got it right.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252F9qtSOLxCW9KOs0pIpYXT%252Fimage.png%3Falt%3Dmedia%26token%3D33b48fc2-4349-46f3-804d-f63e10163b49&width=768&dpr=4&quality=100&sign=d1e8c116&sv=1)
Save as a DDS file (only DDS) and put it in the folder that was generated after you exported the XBM file at the start of the article.
WolvenKit again
You should now see it in the import tool in WolvenKit. Change its TextureGroup property to TEXG_Generic_LUT
, turn off IsGamma, VFlip, GenerateMipMaps, IsStreamable, and PremultiplyAlpha. Set compression to TCM_None
. If your file doesn't have RawFormat as TRF_HDRFloat
, then something in the DDS importing went wrong, and you need to re-set the format as 32x4f in NVTT.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FIc3qTmOdB6YDLHGjpAAz%252Fimage.png%3Falt%3Dmedia%26token%3Db1fcec41-db91-4e87-aa39-3966ff8eda97&width=768&dpr=4&quality=100&sign=d6a67215&sv=1)
Import the DDS. We need to tell the file it is actually a 3D texture in the header (even if the 3D data is already there), so go to renderTextureResource>renderResourceBlobPC>header>textureInfo>type
and change it from TEXTYPE_2D
to TEXTYPE_3D
.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FpLNKMuIAxDtY9nXeoFQS%252Fimage.png%3Falt%3Dmedia%26token%3D11086278-2358-4126-a388-22ef0f23b0cd&width=768&dpr=4&quality=100&sign=473d9432&sv=1)
Make a copy of the XBM file and rename it to cp2077_gen_lut_nge_v017
. Our dummy file there is for being able to quickly copy the filename, so, select your LUT XBM, C-c, C-v, select the dummy file, F2, C-c, select your LUT copy XBM, F2, C-v.
Your LUT is now correctly set up. You can install and launch now!
Results
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FnybZ5BZyN4yHzN0gPboA%252F1.png%3Falt%3Dmedia%26token%3D047c1c0e-cf8e-475a-b12c-4b36d67b112c&width=768&dpr=4&quality=100&sign=17805246&sv=1)
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252Fd6b4n0LSELN3eUMqvjbO%252F2.png%3Falt%3Dmedia%26token%3D51e60f61-69cf-4c88-9398-31e2816bba93&width=768&dpr=4&quality=100&sign=f870c020&sv=1)
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FIfA5EcwWYiOjN4xy198Y%252F3.png%3Falt%3Dmedia%26token%3D489c36a3-d2af-4c58-93ef-bf8e2a027f4a&width=768&dpr=4&quality=100&sign=aba997dd&sv=1)
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FFD5lmVziTdsDaXjWjANr%252F4.png%3Falt%3Dmedia%26token%3Db5971bca-be20-4ef9-bc00-396f6387e129&width=768&dpr=4&quality=100&sign=9e89f7e1&sv=1)
Last updated