Hi all, I thought I post this guide with the help of Chatgpt. Like or loath it, I didn’t have much time to tidy it up though I wanted too, but i think you should catch the drift of it
In the recent thread everyone was adamant that you must NOT work in AP0, I agreed it’s not recommended , but sometimes in flame you can get clipping. So here is my copy paste for you for discussion or as a guide. Keep in mind the ACES docs posted in the other thread were mostly based on Nuke at 32 bit, .. but some of these statements have been drawn from Autodesk Flame docs, so I think its usefull to know as dont think none of this have been mentioned before.
CLIPPING IN FLAME WORKING IN AP1
If you’re clipping the whites when converting back to ACES AP0 (ACES2065-1) after working in ACEScg (AP1), it’s likely due to gamut mapping or color space misalignment. Here’s a more detailed breakdown of what’s happening and how to avoid clipping when going back to AP0.
The Issue: Clipping When Going Back to AP0
When you’re converting from ACEScg (AP1) back to ACES AP0, you may encounter issues with out-of-gamut values. The primary issue is that ACEScg (AP1) has a more bounded color space compared to ACES AP0, which is far wider. AP0 can represent more color information than AP1 can store, leading to clipping when converting back to AP0, especially in highlights or extreme colors.
⸻
How to Prevent Clipping in Flame
Here’s a potential approach to mitigate clipping when converting from ACEScg (AP1) back to ACES AP0:
1. Ensure Proper Color Management Settings
• Working Space: Confirm that you’re working in ACEScg (AP1) as the working space for compositing.
• Linear Workflow: Make sure that all your operations in ACEScg (AP1) are in a linear space. Non-linear workflows can distort the relationship between colors, making the clipping issue more pronounced when converting back to AP0.
2. Use a High Dynamic Range (HDR) Workflow for Highlights
• HDR Consideration: If you’re working with HDR content or high-intensity light sources, try to ensure that your output from ACEScg (AP1) is not overexposed when you are approaching clipping points. You may need to manually compress or tone-map the highlights in a way that reduces extreme overexposure before the conversion.
• Highlight Compression: Apply highlight compression to reduce extreme values in your comp before converting back to AP0.
3. Manual Gamut Mapping
• Sometimes, directly converting between color spaces doesn’t handle the out-of-gamut values well, and they get clipped. Flame supports gamut mapping to help in these situations.
• You can manually apply a gamut compression or mapping step before outputting back to AP0 to avoid out-of-gamut values.
• This can help prevent the clipping of highlights, especially when you have out-of-gamut colors that can’t be represented in AP1.
4. Output Transform and Soft Clipping
• ODT (Output Transform): Ensure that when you’re converting back to AP0, you’re using the proper ODT that doesn’t result in clipping. You might need to apply a soft clip in the output transform process, which allows for values beyond the normal display gamut to compress smoothly rather than clip abruptly.
• Some ODTs, like Rec.709, may not be well-suited for high dynamic range images. Consider using an ODT that supports the range you’re working with (e.g., Rec.2020 for HDR).
5. Check Output Pipeline Settings
• Output Space: When you’re converting from ACEScg (AP1) back to ACES AP0, double-check the output pipeline settings in Flame. Ensure that the output transform is not causing a loss of detail in the highlights. In some cases, applying a tone-mapping or gamut compression can solve the clipping issue.
• Tone-Mapping: You might need to use a tone-mapping operator if you’re working with very high-intensity values or HDR material. This compresses the image dynamically while preserving details in both highlights and shadows.
6. Review OCIO Configurations (if applicable)
• If you’re using an OCIO config to handle the color space transforms, ensure it’s correctly set up to handle the gamut conversion between AP0 and AP1.
• Check if your OCIO config uses proper gamut compression when converting from ACEScg (AP1) to ACES 2065-1 (AP0), as mismatched transforms can easily cause clipping in the highlights.
⸻
Summary of Steps to Avoid Clipping:
Step Action
1. Linear Workflow Ensure you’re working in linear space in ACEScg for accurate blending and color operations.
2. Apply Highlight Compression Reduce extreme brightness levels in highlights before converting.
3. Gamut Compression Manually apply gamut compression before going back to AP0.
4. Use Soft Clipping in ODT Ensure the output transform allows soft clipping for highlights.
5. OCIO Config Adjustments Make sure OCIO configurations handle gamut correctly.
⸻
Conclusion
If you’re seeing clipping in the highlights when converting from ACEScg (AP1) back to ACES AP0 (ACES2065-1) in Flame, the problem likely lies in the conversion process, especially with out-of-gamut values. Adjusting highlight compression, using soft clipping during the ODT process, and applying gamut compression should help reduce clipping and preserve highlight detail.
———
OTHERWAYS
Using soft clipping and gamut compression during the Output Transform (ODT) process in Flame requires a few steps to make sure that extreme values (especially in highlights) don’t get clipped when converting from ACEScg (AP1) to ACES AP0 (ACES2065-1). Below is a breakdown of how you can apply both methods in Flame.
⸻
1. Soft Clipping During the ODT Process
Soft clipping is a way to compress extreme values in your image (usually in the highlights) to prevent hard clipping. This is particularly useful for HDR or very bright areas in your scene.
Steps to Apply Soft Clipping in Flame:
- Apply the Output Transform (ODT):
• In the Color Management settings of Flame, ensure you’re using an Output Transform to convert from ACEScg (AP1) to your desired output color space, such as Rec. 709, Rec. 2020, or another target space.
• If you’re working in a high-dynamic-range space (HDR), select an ODT that supports HDR, like Rec. 2020 PQ or another suitable HDR ODT.
- Enable Soft Clipping (if available):
• Flame does not always offer a direct “soft clipping” option in the ODT, but soft clipping typically means applying a tonal compression curve to the image to avoid hard clipping. If you’re using an HDR ODT (like PQ or Rec. 2020), it will typically do this automatically.
• You can manually apply a clipping curve by using the Curves tool in Flame:
• Go to the Color Grading panel.
• Use the Curves tool to apply a gentle roll-off in the highlights. This curve should compress values in the brightest areas to prevent them from hard-clipping.
• You can soften the curve at the top to gently reduce extreme light intensities while keeping detail in the highlights.
- Check Highlight Compression in ODT (if applicable):
• In some cases, certain HDR ODTs (e.g., Rec. 2020 PQ) will have built-in soft clipping or highlight compression to prevent clipping in the extreme highlights (for HDR content).
• If the ODT you’re using does not automatically include soft clipping, manually apply the highlight roll-off in the grading or comp stage as mentioned above.
⸻
2. Gamut Compression
Gamut compression helps prevent colors from falling outside the target color space (in this case, AP0) by compressing or “shrinking” the range of out-of-gamut values before they are rendered or displayed. This ensures that the data stays within a manageable range and doesn’t result in clipping.
Steps to Apply Gamut Compression in Flame:
- Apply the Output Transform (ODT):
• First, apply the ODT from ACEScg (AP1) to your target color space. If you’re targeting an HDR output, use the appropriate HDR ODT (e.g., Rec. 2020 PQ).
- Use the Gamut Compression Node or Effect:
• In Flame, you can apply gamut compression in a few different ways, depending on the specific tools and settings available.
• You can use the Gamut Compression node in the ColorFX section. This node is designed to compress out-of-gamut values and bring them into the target color space without clipping.
• If you don’t see a specific “Gamut Compression” node, you can manually compress the gamut in the following ways:
• Use a Color Corrector or Hue/Saturation effect to gently reduce overly saturated colors in the out-of-gamut regions.
• Another option is using a LUT (Look-Up Table) that performs gamut compression when applied. Some ACES ODT LUTs include built-in gamut compression for this purpose.
- Adjust Gamut Mapping Settings (if needed):
• In Flame, go to the Color Management settings and look for any gamut mapping options. These are typically available if you’re using a third-party OCIO config or a built-in config that supports it.
• If you’re using an OCIO configuration that supports ACES workflows, ensure that gamut mapping is enabled during the transform process, which should prevent clipping of out-of-gamut colors when converting from ACEScg (AP1) to ACES AP0.
- Fine-Tune the Compression:
• After applying gamut compression, fine-tune the effect until you achieve the desired balance. You don’t want to over-compress, which could result in a loss of detail, but you do want to ensure that any out-of-gamut values are contained within the target color space.
• Adjust the compression curve to ensure that highlight areas are properly compressed and do not lead to clipping.
⸻
Additional Tips:
• Monitor the Clipping with Scopes: Always check the Waveform Monitor or Histogram to ensure that the highlight values are not clipping. Look specifically for clipping in the red, green, and blue channels in the upper end of the waveform.
• Use Soft Roll-Off for Overexposed Areas: If you’re dealing with highlights that seem overexposed, applying a soft roll-off curve (like a S-curve) can compress those values without introducing harsh clipping.
⸻
Summary of Steps:
Step Action
1. Apply ODT Apply an Output Transform (ODT) to convert to your target space.
2. Enable Soft Clipping Use Curves to apply a soft roll-off in highlights or use HDR ODTs.
3. Apply Gamut Compression Use gamut compression nodes or ColorFX tools to compress out-of-gamut values.
4. Adjust Settings Fine-tune compression and highlight adjustments to balance detail.
⸻
Conclusion
To prevent clipping when converting from ACEScg (AP1) to ACES AP0, applying soft clipping and gamut compression can help ensure that you retain highlight details and prevent color distortion. By using highlight compression with Curves and incorporating gamut compression techniques, you can avoid clipping while maintaining image integrity.
IF YOU HAVE TO WORK IN AP0 because of clipping or HDR workflow, or whatever reason you can.
How to be 100% sure your plates have no issues in AP0 using Difference Matting
If the difference matte is black (showing no differences) and positive (showing no negative results), then that would indeed confirm that the source and the comp match exactly.
When the matte is showing no discrepancies in terms of pixel values, meaning that your comp is a perfect match to the source, and everything should be 100% aligned in terms of color, geometry, and exposure.
So, in this specific scenario, if you’re seeing a clean, black result with no positive or negative values, that would be a reliable way to confirm that the two are identical.
However, just to clarify, this only holds true under these conditions:
• Color management: Both the source and comp must be in the same color space and tone-mapped similarly.
• Pixel accuracy: The difference matte works best for pixel-level accuracy. If there’s any subtle difference (due to compression artifacts or minor tonal variations), the difference might still show a tiny result, though this would typically be minimal.
As long as those factors are properly controlled, a black and positive result in the difference matte would indeed mean a perfect match.
Thanks for reading like I said before I’ve worked in AP0 on request, always using a difference matt for 100% confidence. I have had no issues , but remember it’s not recommended. But there is no clipping