ACEScg for Animation feature and further questions

lmt
workflow
vfx
ocio
Tags: #<Tag:0x00007f3c5dbc90d0> #<Tag:0x00007f3c5dbc8f90> #<Tag:0x00007f3c5dbc8e50> #<Tag:0x00007f3c5dbc8d10>

(Thomas Mansencal) #21

Hi @ChrisBrejon,

Keep in mind that Unreal Engine 4 ACES fitting applies a 1.45 gain, i.e., it is over-exposed compared to ACES reference implementation. This is an aesthetic choice done so that artists at Epic Games had an easier transition to ACES compared to a simple Gamma 2.2/sRGB OETF or a tonemapper keeping brightness in the ballpark.

Given the LUT exhibited in your link roughly matches Unreal Engine 4, I’m assuming the author applied exposure compensation.

If you aim at matching ACES in Substance Painter and don’t care about UE4, I would suggest that you create yourself a LUT in Nuke for that purpose and not use the one you linked.

Cheers,

Thomas


(Christophe Brejon) #22

Thanks @Thomas_Mansencal I did not know about the 1.45 gain! I’ll keep an eye on it and try to generate my own lut! Chris


(Nick Shaw) #23

Or, since (if I understand correctly) Substance Painter uses a transformed EXR file of a CMS pattern as a LUT, you could just run ctlrender on the linear_to_linear.exr file, applying the relevant CTL transforms.

Since the linear_to_linear.exr file covers only the 0-1 range, the resulting LUT will only cover input in that range. In order to correctly process values >1, you need to pre-transform the data before the LUT, and take account of this in your LUT baking. The Substance painter documentation says that the Tone Mapping function can be used to apply a lin to log transform, for example, although I don’t see any information on what the log function used is.

I must be clear that I am not specifically familiar with Substance Painter, so my advice here is from theory, not practical experience.

EDIT: Looking that the comparisons of UE4 and the LUT on the page you linked to, it would appear that their LUT does not use a pre-transform. The speculars look clipped in the Painter versions of the images, and properly rolled off in the UE4 ones.


(Christophe Brejon) #24

Thanks Nick for your input. I am waiting to hear from my students to know how they feel about this Substance/ACES workflow.

So far we are trying to do this:

1- Students will paint in Substance Painter using the exr (provided by Brian Leleux) as a display LUT. It means that our students will paint in an sRGB colorspace with a display lut to get closer to an ACEScg look. The export will be done in sRGB for the albedo and in linear for the grayscale maps (roughness, displace, bump…)

2- Then in Guerilla, we will switch the ‘Project Gamma’ to ‘ACES-ACEScg’.
image
Therefore all our maps (albedo + grayscale) willbe loaded in this colorspace.

3- Then, we have a material override to fix the load of the albedo maps into Guerilla.
image

4- We can use this setup to generate the tex files during the lookdev validation. We want to generate the tex files only once, when the assets are approved.

Hope that makes sense!..

This is the recommanded load for the textures in Maya:

  • Color maps - Utility-SRGB texture
  • Spec/Roughness/Height/Normal - Utility Raw
  • HDRI - Utility- Linear- SRGB

(Brian Leleux) #25

Thanks for sharing my Painter LUT. I check the latest tab quite a bit, can’t believe I missed this.

I was originally making it to resemble UE4, since that’s where I have experience, but I realized how many VFX artists asked for OCIO support/ACES specifically which is why the download includes one version with changes eyeballed based on a color chart for UE4 and one version straight from Nuke.

However, as pointed out, the LUT still leaves a bit to be desired especially in the highlights. I felt like the whites were clipped pretty quickly, but wasn’t sure if it was the LUT or something with Painter.

I’d like to improve both LUTs if you guys have any other input. I see Thomas shared the gain value that separates UE4’s implementation from the reference, which I was fairly close just from eyeballing it at 1.65, but I reduced the gamma a bit as well. I’ll try it out with just the gain, but UE4 also has the “electric blue” correction after the transforms and a fake wide-gamut that shifts the colors a bit. I don’t know how much I’ll be able to replicate in Nuke.

This is my pipeline, perhaps I missed something since I’m new to Nuke and color transforms…

  • Change Color Management to OCIO with ACES_1.0.3 and a working space of ACEScg
  • Import Linear to Linear.exe, set Read to Utility - Linear - sRGB(Linear Gamma, sRGB primaries? But it uses Rec709 primaries, why are they both available?)
  • Add OCIODisplay node, input ACEScg, display ACES, view transform to sRGB
  • Write out Utility - Raw

I guess based on this thread, which I need to go back through, I’m getting the ODT but on an image outside of 0-1?


(Nick Shaw) #26

That will still only produce a LUT which covers input in the 0-1 range, so will clip highlights. Do you know what the lin-to-log function is that Substance uses when selected as a tone map? If so, you could apply its inverse to the linear data before the OCIODisplay node when generating the LUT, and thus generate a LUT which expects log data, and so handles highlights properly.


(Brian Leleux) #27

Yeah, that’s just what I did for LUT already. Does that seem like the correct workflow then, aside from the clipped highlights? I didn’t expect the LUT to be as popular as it is, so I definitely want to get a closer match to the reference if possible. It’s been bugging me for awhile.

I’m not familiar with the tonemapping options Painter supports natively, at least not what the underlying math is. There are Log LUTs that come with the software. I can compare them later on this evening to see if we can get a rough idea if it’s based on any of the popular Log formats.


(Brian Leleux) #28

I can’t post images since I’m new, but here’s a Imgur gallery with two screenshots. One for a LUT and one for the tonemapping function https://imgur.com/a/vcnfMRD

Looking at the LUTs that come with Painter, they appear to have the same issue. The “alexav3logc” LUT lifts shadows and reduces the highlights as expected, but the highlights are clamped. There’s a “white point” slider but it’s not the white point I’d expect with color. Instead it acts identically to the exposure input for the camera.

The Log function has a smooth rolloff in the highlights, but the bottom range looks untouched with values still around 0. That doesn’t seem right to me, based on the Log formats I see generally used with film.

Do these help at all?


(Jose L.) #29

I think I managed to make it, basically reverse engineered Painter’s lin2log and wrote the LUT. If you apply it along the log tonemapper you get the same result as your LUT but without clamped highlights. Funny fact, if you don’t apply the tonemapper it’s basically the same than the film_noir lut but with color.

Now for me it’s not clear that with this you have to change the color space workflow, the lut’s only visible in the 3D view in Material mode.

Here’s the file if you want to test.

Uploaded to gumroad with instructions so everything is in one place.


(Brian Leleux) #30

Thanks for looking into it Jose. I took a look at yours and I’m not sure if I’m meant to use it along with Painter’s built-in Log tonemapper? With just the LUT, it appears that the highlights clamp quicker for me. My colors were clamped before the ODT, so my whites never get white, but yours clamp after. Did you convert the linear .exr to log first? That’s what I’m missing in mine I think

I do know that the LUT being visible only in the material view/IRay render is as expected. The channel views will continue to show the textures themselves without any LUT or post-process influence.

Left to right: Default(no LUT), mine(without UE4 adjustments), ACESFilm(Jose’s)


(Jose L.) #31

Yes, you have to use it with the log tonemapper, your last example looks like the tonemapper is not applied. If you want to compare it to yours leave tonemapper’s gamma and exposure at default values although if you are not comparing I like to raise gamma to have more “ambient” light so it doesn’t burn highlights.
I had to convert the exr to log before converting the lut. I think I could even have used Reinhard which was mathematically exact but I like the fact that with log the ACESFilm matches the builtin film_noir lut, it’s like a color version of it.


(Christophe Brejon) #32

Thanks Jose! We just gave it a try with one of my student at ENSI. Highlights really look better. :wink: Congratulations and thanks for your effort! Much appreciated! Chris