8 min read

A Brief Affair with ACEScg

Testing the ACEScg Working Color Space in Unreal Engine
A Brief Affair with ACEScg

In my last post about color management, I had decided to export my renders from Unreal Engine in the ACEScg color space. To be honest, I didn't have a good reason for doing that. The UE working color space is sRGB/Rec 709, so why not export in that color space, and save a conversion step? It's not like I'm part of a VFX team that wants their files in ACEScg.

Is there a visual benefit to exporting ACEScg from the sRGB Linear working color space? I am not sure. The differences would likely only be visible towards the ends of the color gamut. Here are two William Faucher videos that illustrate this:

In the first video (the link should go to timecode 14:03), he compares two images exported from UE, both from the sRGB Linear working color space, but one of them is converted to ACEScg. This image includes pure green and pure red objects, and there are differences in the shade of green produced by ACEScg vs sRGB Linear.

But, in the second video (linked to timecode 9:32), he does the same comparison with a more realistic scene, and there is no visual difference between the two color spaces. These videos were made a few years apart, and in the first video he is converting with the ACES 1.2 config, while in the second video he is using ACES 1.3. It's possible that the colors match better in the second video because the 1.3 config does a better conversion, but my guess is that the differences between ACEScg and sRGB Linear are less noticeable in a scene with real-world colors, like the temple scene used in the second video.

So, maybe I wouldn't benefit from exporting ACEScg if I am working with sRGB Linear in Unreal Engine. But, what if I worked in ACEScg? There is the option to change the working color space:

I decided to experiment with this. However, switching the working color space in UE is not as simple as flipping the project setting. I knew that all the albedo textures in the project were most likely authored in sRGB and would need to be set to display properly in ACEScg. I also had a hunch that there would be other, unanticipated problems (there were).

Why was I so interested in making this ACEScg thing happen? Well, look:

It has more colors. Why wouldn't you want more colors???

Actually, it's open to debate. Christophe Brejon has a detailed discussion of ACES in his CG Cinematography book:

I understand a solid 30% of what is written on that page, but this part stood out to me:

You can also check Scott Dyer's answer from the same thread. From my personal experience, I can share that rendering in ACEScg:

  • Is not "better” than rendering in Linear – sRGB. It is just different and you should test by yourself to see if Wide Gamut Rendering fits your needs.
  • Gives a result which is closer to Spectral Rendering, but this not necessarily suitable for all projects, especially in Full CG.
  • Does not give access to more bright and saturated colors. That is the biggest misconception about it. These values do not make it to the display !

So yeah, Wide Gamut rendering has both pros and cons. And as always, you should test for yourself.

Test it, I would. If I could work in the ACEScg color space without any serious headaches, why not go for it? I could at least learn something in the process. It seemed like the right time to make the switch. I had recently migrated my movie production to a fresh UE 5.5 project and did a lot of uncluttering in the process, so the number of textures I would need to convert was low.

sRGB Textures in ACEScg

First, I duplicated my project. Then, I switched the working color space to ACES AP1 / ACEScg, and after UE restarted and recompiled all the shaders, I set about switching my textures so they would look right in ACEScg. This process is explained here:

Basically, there is a setting in the texture asset that tells UE "This texture is not in the working color space and needs to be converted from... (in my case, sRGB/Rec 709)"

One problem was that only the textures with color data needed to be converted this way, and most of the textures in my project were not color, but scalar data. So, I couldn't just batch convert all my textures.

In Unreal Engine it is easy to filter for textures, but there is no simple way to filter out color textures, so I had to hunt them down myself. These search strings were helpful:

color
diffuse
albedo
_B
_C
_D

I'm not positive I found every color texture in the project, but I made sure to at least cover all the objects I had placed in my scene.

I also found that, in addition to the MetaHuman face and body textures, their eyes and teeth had color textures that needed conversion:

5.5 MetaHuman Color Textures (all of them, I hope)

For editing a batch of textures, the Property Matrix was a big help.

I could select and right click the batch, then go to Asset Actions > Edit Selection in Property Matrix. From there, I searched the "Pinned Columns" window for "Color Space," clicked the pin button to add it to the table of editable settings, and switched them in bulk.

One set of textures I ignored were the ones on the procedurally generated rack computer. The design for this prop is temporary, and the meshes and Materials are a complete mess. Since I will be replacing them anyway, I left them alone.

Test Renders

I used one of my storyboard sequences and did an export from both the sRGB Linear project and the ACEScg project. For the export from sRGB Linear, I used OCIO to convert to ACEScg. For the ACEScg project, I simply disabled the tone curve:

In DaVinci Resolve, I used the following ACES Transform on both shots:

I also did some minor adjustments to the exposure and contrast. I expected to see some color differences on the rack computer, and nowhere else. Not quite:

Most of the differences appeared in the red tones. The rack computer components changed like I expected, especially in the red/pink accents. But, the hair color of both MetaHumans and the T-shirt color of the male MetaHuman are noticeably redder. They slipped through because their hair color and the color of the man's shirt are determined not by a texture, but by the RGB color picker.

So, now I had to find all the Materials in my scene that used the color picker and change the sRGB red, green, and blue values to the ACEScg equivalents. With this website I was able to find the correct values. For example, this is the conversion for the color of the male MetaHuman's T-shirt:

This brought the T-shirt in line:

What about the hair? Well, MetaHuman hair isn't determined by a RGB value. They use melanin and redness (among other settings) to create naturally occurring hair colors:

I don't know how to convert the hair color to an ACEScg appropriate value. I could eyeball it, but if the melanin and redness values are meant to correspond to sRGB colors, eyeballing them in ACEScg seems dangerous. There might be a solution for cleanly converting them, but I haven't found it.

This is where my ACEScg party ended. It was fun, I learned a lot, but I reached the point where I felt out of my depth and that the work required outweighed any benefits. For the foreseeable future, I'm a sRGB Linear man.

Since I am already using ACES for my display transform Unreal Engine, it makes sense to use ACES color management in Resolve, as well.

So, my color workflow is:

  • Unreal Engine working and export color space: sRGB Linear
  • DaVinci Resolve input color space: sRGB Linear
  • DaVinci Resolve working color space: ACEScct
  • Display color space for both UE and Resolve: Rec 709

The Subsurface Anomaly

While all the reds were getting redder, the red glow of the MetaHuman's subsurface scattering went the opposite way. In the ACEScg working color space, subsurface scattering appeared less intense than in sRGB Linear. Here, it is visible in the ears:

I think ACEScg might look better? I always felt that the subsurface scattering in my UE scenes was a bit intense, and I've looked for ways to mitigate it. It is interesting to see that working in ACEScg might help with that.

But, I don't know the reason behind the difference, so I can't say for sure that it's an improvement. The MetaHuman subsurface profile also uses some color picker values, so I used the same website as before to convert them to ACEScg:

This made a tiny difference, but the renders still didn't match. So, I was stumped. In any case, I had already decided to stick with the sRGB Linear working color space, so it was time to move on. I'm supposed to be working on a movie, and I have a set to build.