Blog

LUT - Unity HDRP and URP

LUTs are a very popular technique for applying color grading in production, including video games.

LUT color grading examples in Unity

I have to say that using LUTs in Unity, especially in HDRP, is not as user-friendly compared to Unreal, where it's much simpler and more intuitive. However, URP offers a similar behavior to Unreal, as we will explore next.

LUT – HDRP

Unity provides a helpful document (Link: Authoring lookup textures with Adobe Photoshop | High Definition RP | 10.8.1) that explains how to use LUTs with Photoshop and DaVinci Resolve, you will see that you need to use the HDR-32Bit image that Unity provide. However, in my opinion, there is a major drawback, when you enable the "External" mode in the Tone Mapping section, you lose ACES tonemapping. According to the document, Unity uses Alexa LogC to linear RGB space.

Unity HDRP External Tone Mapping mode

In my opinion, losing ACES tonemapping is significant because ACES handles areas with strong exposure very effectively. This can be challenging to replicate in Photoshop. Moreover, as an artist, I prefer not to waste time approximating ACES tonemapping, I just want to focus on color grading.

Strong exposure comparison with ACES tonemapping

After extensive research online, I found a link (https://help.autodesk.com/view/ARNOL/ENU/?guid=arnold_for_maya_rendering_am-ACEScg_Photoshop_html) providing ACESCg LUT compatible with Photoshop. This was extremely helpful as it allowed us to preserve ACES during color correction in Photoshop, enabling us to focus solely on the color grading process.

ACES LUT applied in Photoshop matching Unity

As you can see in the image, the ACES LUT applied in Photoshop closely matches the one in Unity.

Steps to Apply Color Grading in Photoshop While Preserving ACES

  1. Download the Neutral LUT file to use it in Photoshop.
    Neutral LUT file in Photoshop
  2. Follow Steps 1-3 outlined in Unity's documentation linked above. You should achieve the same visual result as Unity's "External" mode in Tone Mapping.
    Photoshop setup matching Unity External mode
  3. Download the ACES LUT file from the link above and apply it in Photoshop. This will ensure the look is very similar to ACES in Unity.
    Applying the ACES LUT in Photoshop
  4. From there, you can apply any color correction or use different LUT files to achieve your desired final look.
    Color correction layers on top of ACES in Photoshop
  5. Export the LUT file from Photoshop and import it into Unity.
    Exporting the LUT file from Photoshop
  6. Finally, apply the LUT file in Unity to recreate the same look you achieved in Photoshop.
    Final graded LUT applied in Unity HDRP

Steps to Apply Color Grading in DaVinci Resolve While Preserving ACES

  1. Follow Steps 1-3 outlined in Unity's documentation link (https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@17.0/manual/LUT-Authoring-Resolve.html). However additional to those file add this file (link https://eduardoroacg.com/downloads/general/UnityLog_And_ACES_Photoshop.CUBE) in the LUT folder in DaVinci. This LUT apply Unity Log To Linear + ACES.
  2. Adjust the project settings accordingly. Set the project settings to the specified value as required by the workflow.
    DaVinci Resolve project settings for Unity HDRP LUT workflow
  3. Modify Step 3 from Unity's documentation. Instead of using the “Unity Log To Linear r1” LUT file, use the “UnityLog_And_ACES_Photoshop” LUT. This ensures ACES is correctly applied.
  4. Apply your desired color corrections. Once ACES is active, proceed with your color grading and export the file as described in Unity's documentation.
  5. Important note on LUT size compatibility: DaVinci Resolve uses a different grading LUT size than Unity. Unity defaults to a size of 32, but DaVinci requires it to be set to 33 in your HDRP settings.
    HDRP Grading LUT size set to 33 for DaVinci Resolve

LUT – URP

Using a LUT in URP is simpler compared to HDRP. This is primarily because it is an independent post-processing feature and occurs after tonemapping, which means ACES is applied first. Additionally, unlike HDRP, URP operates in Low Dynamic Range, eliminating the need to export HDR 32-bit files as required in HDRP.

If you are familiar with Unreal, you will find that URP LUT functionality is quite similar to Unreal's.

Steps to Apply Color Grading in URP Using Photoshop:

  1. Get the neutral LUT file from this link (https://eduardoroacg.com/downloads/general/RGBTable_Neutral_Unity.png).
  2. Take various screenshots and compose them in Photoshop.
    Composing Unity URP screenshots in Photoshop
  3. Apply any desired color grading in Photoshop.
    Applying color grading adjustments in Photoshop
  4. Open the neutral LUT file, copy the applied color grading into it, and save the file.
    Copying color grading layers onto the neutral URP LUT strip
  5. Import the LUT file into Unity and assign it. here I leave the link (https://eduardoroacg.com/downloads/general/Lut_ColorGrading_Unity.png) to the LUT modified.
    Assigning the modified LUT in Unity URP Color Lookup

I hope that you find this article useful, best regards.

Eduardo R.