Creating an ACES Workflow for Realistic Lighting with 3D
Learn how to improve your 3D renders by using ACES to build a linear workflow. (Also, an explainer: What exactly is ACES?)
ACES. What is it? Let’s ease into it with an entry-level description: ACES is considered to be the industry standard for color. It’s used in filmmaking, CG Animation, and VFX. Now, let’s go all in.
ACES stands for Academy Color Encoding System. It’s thought to be a standard for interchanging image files, and it’s a way to create better lighting in 3D. Additionally, and more generally, it’s a set of rules for encoding data and managing a color workflow.
In this article, we’ll talk about the ACES workflow for 3D renders and, for the occasion, we’ll consider a specific color space called ACEScg.
But, let’s take it one step at a time. What’s a color space?
What Is a Color Space?
Simply put, a color space describes the colors available in a particular subset—referred to as the standard CIELAB—and also represents a color profile for digital media.
A color gamut contains all the colors that a device can produce, and when a monitor is manufactured and calibrated to use sRGB, for instance, its colors are mapped to the sRGB color space coordinates. The gamut can also be smaller than the current color space or encompass it. In this last case, we say that the monitor is 100% sRGB.
Also, the majority of images from the internet (JPG, PNG, etc.) come with a saved color profile which is sRGB, and that preserves a standard in file interchanging.
The most common color spaces are sRBG, AdobeRGB, DCI-P3, and Rec.2020, just to name a few, with sRGB being the smallest color space on the list. Many monitors rely on it to represent the images.
8-bits per channel is sufficient to cover the sRGB color space but—if we wanted to extend the dynamic range, for instance, with a DCI-P3 color space—we need at least 10-bits per channel. Think about the HDRI. Nowadays, monitors and TV need to have the capabilities to deal with them.
What Is a Linear Workflow?
Before introducing ACES, we still need to know what a linear workflow is and why it’s extremely important while rendering.
When we open an sRGB image on a calibrated monitor using sRGB, we see it correctly because the gamma correction applied to the saved image (0.45) is combined with the monitor gamma of 2.2 to give a linear response, and that’s what we want.
If images weren’t gamma corrected, the monitor would show a darker image, which isn’t good.
The reason behind monitor gamma 2.2 is historical; it comes from the old CRT monitors, where there was no linear response between the light intensity and the electron gun voltage. Even if the LCDs and newer monitors don’t suffer from this problem now, gamma 2.2 has been maintained to preserve the compatibility with the old CRT monitors.
In 3D rendering, all the calculations need to be treated linearly, so that if we double the light intensity in our scene, we also have to double the color values of textures and shaders. This is how light works in reality.
Here’s a typical example of linear workflow with inputs, calculations, output, and the final gamma correction applied to the output (sRGB LUT), in order to have a correct image on the monitor.
sRGB images need to be linearized, as well as the colors. If something is already linear, like float images (HDRI), we leave them as they are—bump, displacement, normal maps, etc. don’t need to be linearized.
The render output is linear but the monitor gamma, as we saw, is 2.2. We then need an sRGB LUT to correct the rendered image and make it linear to the viewer.
Without a proper sRGB LUT or a correct way to linearize our inputs, we wouldn’t be able to obtain a correct representation of the rendered scenes.
On the other hand, by following this workflow, we’re sure that the calculations are accurate and we obtain a physically correct result. Autodesk Maya, for instance, utilizes this linear workflow.
That’s terrific for a correct and standard workflow. However, we can do even better in terms of quality of our rendered scenes. Here comes ACES!
The ACES Workflow
Having introduced the concepts of color space and linear workflow, we’re ready to talk about how ACES can improve our renders.
Let’s see what ACES can offer:
- Wider color space: In 3D rendering, we use ACEScg, which is much bigger than the common sRGB.
- Linear workflow as in sRGB, but with different rules to encode, calculate, and decode data, in order to have a better color output
- More natural appearance of highlights, with color desaturation as light intensity increases. ACEScg avoids the presence of overexposed or burnt areas when a strong light intensity hits them.
- Richer color representation, as operating in a wider color space, the calculations utilize more hues and variations.
Let’s see the ACES workflow in depth:
- The inputs (textures, colors, linear image, ACEScg renders) are converted into the ACEScg color space by an IDT (input device transform). This function linearizes the inputs (if needed) and maps the values to a wider color space (ACEScg).
- All the calculations happen in ACEScg, thus, we have more dynamic range to work with.
- The ODT (output device transform) takes the result of the render and, before applying the transformation for a specific device, uses an RRT function to remap the values to a specific color space.
If we wanted to look at the result on an sRGB monitor, we should map the high dynamic values (ACEScg) to the low dynamic values (sRGB). This operation is called tone mapping and is performed by the aforementioned RRT function.
As a final step, if we have a 2.2 monitor gamma, the ODT also applies a gamma correction as explained above.
Furthermore, the ODT depends on the purpose of the ACES workflow. We could also convert the result for archiving in an ACES 2065-1 color space, rather than sRGB or Rec.709.
A Practical Example and Considerations with ACES
In this part, I want to introduce an example scene that I quickly made in Maya, where I employed the ACES workflow.
In the indoor scene, I would like to focus on some lighting details that makes ACES better than sRGB. For our purpose, I introduced a directional light through the window and some reflective balls.
Working with a larger color space at render time, ACEScg is able to preserve certain details that, otherwise, would be cut, due to the lower sRGB color space. This effect is more noticeable in areas with strong luminosity.
You can see that the wood details are retained and the color is desaturated. This is exactly what happens in reality!
The light on the carpet, likewise, desaturates its pinkish color but preserves some details without any drastic clipping effect.
But, if the calculation works with more values in ACEScg, how can we see the result on monitor where the gamut is much smaller?
This is where the Reference Render Transform (RRT) comes in handy. It practically performs a tone mapping of the ACEScg color values to the device gamut (in this case sRGB). This function approximates the appearance of the color in a device that has a much lower dynamic range.
Now, let’s create the same render in sRGB color space and see the differences.
At first glance, it looks quite similar, but there are some differences.
The quality of the directional light on the floor is the first thing that you notice. In sRGB, the wood part doesn’t retain all of the details, and the colors are over-saturated. Similarly, the diffuse color on the carpet is burnt by the directional light. That’s because working with a lower dynamic range causes clipping at high light intensity.
Again, the sphere hit by the directional light appears completely white in sRGB, whereas the same in ACEScg, despite the strong lighting, preserves a more desaturated, realistic look.
The reflection of the window on the floor is clipped in sRGB too. ACEScg, instead, works much better.
Finally, the overall look in ACEScg is also better in terms of colors. Working with a higher dynamic range, we have more colors to deal with. As such, during the tone mapping to an sRGB monitor, the RRT will approximate the look by preserving the right contrast and by making the result more vibrant and vivid.
Generally, colors pop up better.
Setting up ACES in Autodesk Maya
In this last part, we’ll be talking about how you can easily set up your ACES workflow in Autodesk Maya. Every software has its own window to configure a linear workflow—for Maya we have to access:
Windows > Settings/Preferences > Preferences
Under Color Management, there’s a tab named Color Management Preferences:
By default, the Color Management is enabled and the Color Transform Preferences option has the following configuration:
- Rendering Space (IDT): Scene-linear Rec. 709/sRGB
- View Transform (ODT): sRGB gamma
That’s the setting corresponding to the linear workflow that we explained above.
To load ACES, you first need to:
- Clone the whole library to your disk from the following Github repository: ACES library
- Once cloned, consider the folder called aces_1.2
- Look for a file named config.ocio in the folder aces_1.2
- Copy the entire path of the config.ocio file from your disk to the OCIO Config Path that you find in Color Management Preferences
- Enable the option called Use OCIO Configuration and you’re done!
Now, we have a different IDT and ODT. They are respectively ACES – ACEScg and sRGB(ACES). The latter includes the tone mapping and the 2.2 gamma correction for sRGB devices.
Last, but not least, the Input Color Space Rules tab allows for defining a set of rules for the inputs (images, HDRI, etc.). The default rule in the previous screenshot says that, for any input image, Maya automatically assigns an sRGB color space called Utility – sRGB – Texture. We can set different rules for other image formats.
In case we don’t want to define any other rule, remember to manually set a color space for every image in your project.
In particular, assign these color spaces for the following textures:
- Textures like diffuse, base color, spec, etc. -> Utility – sRGB -Texture color profile (default rule)
- Linear textures like HDR -> Utility – linear – sRGB color profile
- Bump, normal, roughness, metallic, displacement maps, etc. -> Utility -Raw color profile
Now, you’re ready to experiment with your own ACES workflow! Have fun with it!
A few more design articles for you:
Studionics The Best Media Production house in Coimbatore
Category: Photography, Production House