Tsiky Posted May 20, 2021 Share Posted May 20, 2021 Hello guys! I know this has been asked several times here but unfortunately I couldn't find a clear answer. My goal is to display my ACESCG render correctly and export it to web as JPG - Right now the preview in the OCIO display transform is the correct look, but I know it won't look correct when I export it. - So I am trying to replicate that look with ICC display transform. What I am trying to avoid is to use manual adjustments like levels, curves, etc. The closest I've got was using OCIO node but still looks washed off and less contrasty. Am I missing something here? Thanks! Quote Link to comment Share on other sites More sharing options...
walt.farrell Posted May 20, 2021 Share Posted May 20, 2021 Have you watched the official Affinity OCIO-related tutorials? If not, they might help. https://affinity.serif.com/en-us/tutorials/photo/desktop/video/297059572/ https://affinity.serif.com/en-us/tutorials/photo/desktop/video/441014543/ Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. iPad: iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1 Link to comment Share on other sites More sharing options...
Tsiky Posted May 20, 2021 Author Share Posted May 20, 2021 Yes I have watched those video, and they were helpful. However it can't find the thing that I am looking for. As far as I know, the OCIO display transform does 3 things: Convert ACEScg to linear srgb Tonemap the linear srgb (RRT) Add view transform for monitor (ODT) The ICC display only enables me to do 1 and 3. How do I get the tonemapping coming from ACES? Quote Link to comment Share on other sites More sharing options...
kirkt Posted May 20, 2021 Share Posted May 20, 2021 Take a look a this tutorial by James Ritson: - although it is about using OCIO and LUTs in the context of Blender filmic tone mapping, it is probably directly relevant to what you are trying to do. Note in the video that you must enable ICC Display Transform in the Preview panel to get the transforms you apply in your layer stack to render the gamma-encoded output correctly to the output file (this is covered at about 9:00 in the video). kirk Quote Link to comment Share on other sites More sharing options...
kirkt Posted May 20, 2021 Share Posted May 20, 2021 @Tsiky - Here is an example, using the ACES command line utility called rawtoaces to make an ACES EXR file - rawtoaces converts a raw camera image file (like a .CR2 or .NEF file) to an ACEScg linear EXR file. The actual raw file I converted is an HDR raw file created with some interesting computational merging techniques similar to the Adobe Camera Raw HDR DNG. In other words, it is a true HDR file, not just an EXR made from one raw exposure. see: https://github.com/ampas/rawtoaces for more info on rawtoaces. In this example, I simply opened the EXR file that comes out of rawtoaces in AP - in my Preferences, I have designated ACEScg as my 32bit working color space in AP, and sRGB as my RGB working color space. I added an Exposure adjustment layer to adjust the unbounded exposure of the data prior to the OCIO transform. I also added a Curves adjustment layer to adjust the White Balance - if you simply drag the highlight end of a channel's curve downward, it is like decreasing the exposure of that channel - the curve just has to remain linear in shape (no other adjustment points on the curve except for the two endpoints) for it to act like an exposure adjustment - at least this is how Photoshop works. Then I applied the OCIO transform of ACEScg to sRGB. This tone maps the image using the ACEScg to sRGB transform. Now the file's numbers are in sRGB. To get things to output properly to gamma-encoded output like a JPEG you need to do two things: 1) The working RGB color space specified in your preferences needs to be sRGB. 2) The 32bit Preview panel's Display Transform needs to be set to ICC Display Transform. Now, when you export the JPEG, it will be in sRGB (the JPEG is written to the working RGB color space) and it will look like the preview that you see when you enable the ICC Display Transform. This is essentially what the video to which I linked specifies near then end. In the attached screenshot, the EXR displayed as a Preview is on the left, the output file, opened in AP is on the right. Note that it appears as if there is a very slight shift in the black point in the JPEG, but it is otherwise pretty much the same as the Preview - examine/compare your output at 100% to see if this is a real shift, or just a Preview rendering issue - in my output, the files look identical at 100% zoom. Kirk Quote Link to comment Share on other sites More sharing options...
kirkt Posted May 20, 2021 Share Posted May 20, 2021 Can you post a link (Dropbox, etc) to one of your EXRs so we can try to replicate your issues? kirk Quote Link to comment Share on other sites More sharing options...
Tsiky Posted May 21, 2021 Author Share Posted May 21, 2021 Kirkt, Yup you explained exactly my issue. I don't think it's an issue anymore, but I'll share here what I've learned through your answers and a few searches. For ACES to work properly, I need to work with ICC display transform (in my case srgb), convert from Acescg to srgb (linear) using OCIO, then manually tonemap it using curves. I was trying to avoid using luts or curves for tonemapping, but that's exactly what it needs. I just wish AP had an easier way to do it. Like in Davinci Resolve you just set your working color space, set the IDT and ODT and you are done Here's the exr file if you still want to take a peek: https://drive.google.com/file/d/1m5MC9O7JMjB3UKLCSgIAwKoA9v84UuWe/view?usp=sharing Quote Link to comment Share on other sites More sharing options...
johncido Posted October 13, 2021 Share Posted October 13, 2021 After check out the video in kirkt's answer, I came up with this setup to export ACEScg as sRGB png. First, set it to ICC display transform: Then create these two OCIO layers: This is the 'to Linear' layer: This is the 'to sRGB' layer: And this is the comparison (Blender exported PNG on the left, AP exported PNG on the right): Could use some further tweaks, but it seems working for me now. Tsiky 1 Quote Link to comment Share on other sites More sharing options...
Tsiky Posted October 31, 2021 Author Share Posted October 31, 2021 On 10/13/2021 at 10:47 AM, johncido said: After check out the video in kirkt's answer, I came up with this setup to export ACEScg as sRGB png. First, set it to ICC display transform: Then create these two OCIO layers: This is the 'to Linear' layer: This is the 'to sRGB' layer: And this is the comparison (Blender exported PNG on the left, AP exported PNG on the right): Could use some further tweaks, but it seems working for me now. This worked like a charm! Thank you so much Quote Link to comment Share on other sites More sharing options...
Thomas Helzle Posted January 4, 2023 Share Posted January 4, 2023 Thanks a ton johncido! I thought I tried everything but couldn't get the export from ACEScg EXRs to jpg or png to work. I'm using Octane for rendering in SideFX Houdini and so far used Fusion to convert ACEScg EXRs to 16 bit PNGs for further editing in AP for the web. Your solution is much faster, but I still think Affinity Photo (v2 in my case) should allow to export what it shows in the viewport without this workaround. With the 32 bit preview set to OCIO, sRGB and ACES (using ACES 1.2 globally here) I get a perfect match with the Octane preview in the viewport, but so far wasn't able to export anything usable. There should definitely be an option to "bake" what the 32bit preview shows to a 8 or 16 bit image and also have the export dialogue have an option to export what I see on the monitor. The current system feels somehow half baked in that regard - what else would I want for export/convert to such formats than what I see on the screen...? Come on Affinity, you can do better than that! Cheers and thanks again johncido, Tom Quote ScreenDream | Windows 8.1 x64 - 64 GB Ram - i7 6 core @ 4.1 GHz - GeForce GTX 1080 TI & GTX 980 Ti Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.