# UE5 LUT for Substance Painter

**URL:** <https://community.acescentral.com/t/ue5-lut-for-substance-painter/5143>\
**Category:** Video Games\
**Created:** [August 20, 2023, 8:48pm UTC](https://community.acescentral.com/t/ue5-lut-for-substance-painter/5143 "2023-08-20T20:48:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexandrealvesdb](https://community.acescentral.com/user_avatar/community.acescentral.com/alexandrealvesdb/32/9230_2.png) [@alexandrealvesdb](https://community.acescentral.com/u/alexandrealvesdb)\
**Post date:** [August 20, 2023, 8:48pm UTC](https://community.acescentral.com/t/ue5-lut-for-substance-painter/5143/1 "2023-08-20T20:48:43Z")

</div>

Hello all, I made a LUT to match UE5 in Substance Painter and I post it here as both use ACES and I saw people running into this viewport matching trouble, you can get it for free : here [UE5 LUT for Substance Painter](https://alexandrealvesdb.gumroad.com/l/ue5_lut)

No need for additional post-processing, you just put the exr as colorlut in Substance Painter !  
I also wrote a Medium article about it that explains how to get to that resultat and that talks about colorspaces, gamma, exposure, etc… So that people can understand how it works and how to make their own LUTs.

Here is the article : [https://medium.com/@alexandrealvesdb/how-to-match-substance-painter-viewport-with-ue5-2b022a624515](https://medium.com/@alexandrealvesdb/how-to-match-substance-painter-viewport-with-ue5-2b022a624515)  
And you can also get the color chart I made for the comparison here : [3D Color reference card](https://alexandrealvesdb.gumroad.com/l/colorchart)

 ![SubstanceUE_Comparaison](https://acescentral-discourse-uploads.sfo3.cdn.digitaloceanspaces.com/original/2X/2/22ff2c0500afc35f026a66bc552553bd85fbe9d5.jpeg)

---

<div class="post-metadata">

**Author:** ![Thomas\_Mansencal](https://community.acescentral.com/user_avatar/community.acescentral.com/thomas_mansencal/32/144_2.png) [@Thomas\_Mansencal](https://community.acescentral.com/u/Thomas_Mansencal)\
**Post date:** [August 24, 2023, 8:10am UTC](https://community.acescentral.com/t/ue5-lut-for-substance-painter/5143/2 "2023-08-24T08:10:48Z")

</div>

Hi @alexandrealvesdb and welcome!

For consistency, it would be recommended to use OpenColorIO with the ACES config. Here are more details: [Creating an OCIO view transform to match default Unreal 4 ACES viewport tonemapper - #8 by Anthony](https://community.acescentral.com/t/creating-an-ocio-view-transform-to-match-default-unreal-4-aces-viewport-tonemapper/2437/8)

Cheers,

Thomas

---

<div class="post-metadata">

**Author:** ![alexandrealvesdb](https://community.acescentral.com/user_avatar/community.acescentral.com/alexandrealvesdb/32/9230_2.png) [@alexandrealvesdb](https://community.acescentral.com/u/alexandrealvesdb)\
**Post date:** [August 24, 2023, 10:23am UTC](https://community.acescentral.com/t/ue5-lut-for-substance-painter/5143/3 "2023-08-24T10:23:25Z")

</div>

Thank you @Thomas_Mansencal for the welcome and the resource !  
I’m going to check in Substance the config you shared, it’s a shame most of the links especially the one for the UE engine are dead.

I tried with the LUT to make it easy for the users that want the current viewport of Unreal in Substance (more game-oriented than animation) and I know that using an OCIO config in Unreal would disable the tone curve that they currently use. Also I try to make all the modifications to be only on substance side so that UE is the “truth”.

EDIT : I found the link to the current repo that was private for UE source code so I can check now

---

<div class="post-metadata">

**Author:** ![alexandrealvesdb](https://community.acescentral.com/user_avatar/community.acescentral.com/alexandrealvesdb/32/9230_2.png) [@alexandrealvesdb](https://community.acescentral.com/u/alexandrealvesdb)\
**Post date:** [August 24, 2023, 11:06am UTC](https://community.acescentral.com/t/ue5-lut-for-substance-painter/5143/4 "2023-08-24T11:06:40Z")

</div>

Also I ran into this post in the forum : [Unreal Engine ACES recommended profile issue](https://community.acescentral.com/t/unreal-engine-aces-recommended-profile-issue/4212)

It seems like the profile from his tests are not matching the default viewport but I would have to make my own tests to confirm.

---

<div class="post-metadata">

**Author:** ![Thomas\_Mansencal](https://community.acescentral.com/user_avatar/community.acescentral.com/thomas_mansencal/32/144_2.png) [@Thomas\_Mansencal](https://community.acescentral.com/u/Thomas_Mansencal)\
**Post date:** [August 25, 2023, 5:35am UTC](https://community.acescentral.com/t/ue5-lut-for-substance-painter/5143/5 "2023-08-25T05:35:30Z")

</div>

The spaces I sent for OCIO should work, we are using them daily at work (a Display P3 variant to be exact), it is really the sRGB ODT with a gain. To get a good match in UE you would need to disable the Blue Highlight Fix and Expand Gamut “LMT”.

---

<div class="post-metadata">

**Author:** ![alexandrealvesdb](https://community.acescentral.com/user_avatar/community.acescentral.com/alexandrealvesdb/32/9230_2.png) [@alexandrealvesdb](https://community.acescentral.com/u/alexandrealvesdb)\
**Post date:** [August 25, 2023, 9:57am UTC](https://community.acescentral.com/t/ue5-lut-for-substance-painter/5143/6 "2023-08-25T09:57:45Z")

</div>

The thing is I’m trying to match as close as I can the default viewport so I want also the blue highlight fix and expand gamut.

I went through the code of the film tonemapper and here is the process they do :

Gamut expansion → Blue correct → « Linear » (AP1 primaries) → AP0 primaries → Added glow → Red modifier → AP1 primaries → Desaturate → Applies S-Curve ( ACES Settings) → Desaturate again → Returns positive AP1 values

(Then Gain of 2.2 before turning to sRGB)

Slope = 0.91;  
Toe = 0.53;  
Shoulder = 0.23;  
BlackClip = 0;  
WhiteClip = 0.035;

I couldn’t find the 1.45 gain and the thing is I didn’t find yet how the LUTs for the ACES sRGB ODT modify the colors to know if it matches

EDIT : But from what I see it just seems that it first maps the values between 0 and 1 and then transforms into sRGB but with no particular look transform  
2nd EDIT : Turns out the gain has changed to 2.22 and I found it in the function “ACESOutputTransformsRGBD65”  
3rd EDIT : I’m not sure but I think the gain is applied at the end since the functions returns sRGB and the input is ACES, the film tonemapper returns in ACES

Sorry to bother you with all this and thanks to have taken the time so far to answer

---

<div class="post-metadata">

**Author:** ![alexandrealvesdb](https://community.acescentral.com/user_avatar/community.acescentral.com/alexandrealvesdb/32/9230_2.png) [@alexandrealvesdb](https://community.acescentral.com/u/alexandrealvesdb)\
**Post date:** [August 25, 2023, 5:44pm UTC](https://community.acescentral.com/t/ue5-lut-for-substance-painter/5143/7 "2023-08-25T17:44:40Z")

</div>

> [@alexandrealvesdb](#):
>
> Gamut expansion → Blue correct → « Linear » (AP1 primaries) → AP0 primaries → Added glow → Red modifier → AP1 primaries → Desaturate → Applies S-Curve ( ACES Settings) → Desaturate again → Returns positive AP1 values
> 
> (Then Gain of 2.2 before turning to sRGB)

EDIT : To get the Blue correct, I would just need to apply this as a `MatrixTransform` inside the config and use the inverse after applying the tone curve

> [@Colour artefacts or breakup using ACES](https://community.acescentral.com/t/colour-artefacts-or-breakup-using-aces/520/8):
>
> [ 0.9404372683 -0.0183068787 0.0778696104;  
> 0.0083786969 0.8286599939 0.1629613092;  
> 0.0005471261 -0.0008833746 1.0003362486]

I guess Added Glow, Red modifier and Desaturate would be done by RRT ? (But I can’t find doc on the RRTs so I don’t know which one is the good one if there is a one)

Then it applies a piecewise power curve before desaturating again then it multiplies by 2.22 and turn the result to sRGB but this function is private. (Seems like there is a transfer function in this function because they say that’s why they do the 2.22 gain)

> // chosen such that outputTransform(0.18 \* Gain) / UE\_ACES\_SDR\_Y\_MAX = 0.18

---

<div class="post-metadata">

**Author:** ![Thomas\_Mansencal](https://community.acescentral.com/user_avatar/community.acescentral.com/thomas_mansencal/32/144_2.png) [@Thomas\_Mansencal](https://community.acescentral.com/u/Thomas_Mansencal)\
**Post date:** [August 28, 2023, 5:20am UTC](https://community.acescentral.com/t/ue5-lut-for-substance-painter/5143/8 "2023-08-28T05:20:04Z")

</div>

Hello,

The 1.45 exposure compensation gain is built into the tone curve parameters, it is not explicit but was added to the ACES reference before the tone curve was fitted so that to match a bit better the previous UE tonemapper.

The problem with the `Blue Light Artifact Fix` is that it is not correctly applied in Unreal Engine, so you won’t be able to emulate it with an ACES config. The ` Gamut Expansion` is certainly doable.

Cheers,

Thomas

---

<div class="post-metadata">

**Author:** ![joegen](https://community.acescentral.com/user_avatar/community.acescentral.com/joegen/32/9410_2.png) [@joegen](https://community.acescentral.com/u/joegen)\
**Post date:** [October 23, 2023, 4:32pm UTC](https://community.acescentral.com/t/ue5-lut-for-substance-painter/5143/9 "2023-10-23T16:32:28Z")

</div>

Here is an OCIO profile which goes 1 step further by matching the entire luminance range of UE and making it available in OCIO.

This matches the out-of-the-box default look of UE (including “extended gamut” and “minor” blue-artefact fix"

Should work with substance and other OCIO 2.0 compliant software.

 ![UEvsOCIO_comparison](https://acescentral-discourse-uploads.sfo3.cdn.digitaloceanspaces.com/original/2X/2/2162c0f48a7ba0294910b47908fdba7492c6af3b.jpeg)

github /Joegenco/PixelManager
